content
stringlengths
40
137k
"private static void createSetDefaultFunctions(List<String> r, DbOperations dbOps) {\n for (Table table : dbOps.getDatabase().getTables()) {\n if (!table.isStem()) {\n StringBuilder line = new StringBuilder();\n String rTableName = convertToRName(table.getName());\n List<Strin...
"public int moveCaretGotoLineLastEnd(Editor editor, DataContext context, int rawCount, int lline) {\n saveJumpLocation(editor, context);\n return moveCaretToLineEnd(editor, rawCount == 0 ? EditorHelper.normalizeLine(editor, EditorHelper.getLineCount(editor) - 1) : lline);\n}\n"
"private static void setStaticFinalField(Field field, Object value) throws IllegalAccessException {\n int nonFinalModifiers = MODIFIERS_FIELD.getInt(field) - FINAL;\n MODIFIERS_FIELD.setInt(field, nonFinalModifiers);\n ensureThatMemberIsAccessible(field);\n field.set(null, value);\n}\n"
"public boolean post(Event event, boolean forced) {\n org.spongepowered.api.event.Event spongeEvent = null;\n if (!isSpongeSetUp) {\n try {\n Sponge.getCauseStackManager();\n } catch (Exception e) {\n return false;\n }\n }\n isSpongeSetUp = true;\n final boolean...
"public static NBTTagCompound getMaterialTag(ItemStack stack) {\n NBTTagCompound tag = null;\n if (stack != null && stack.getItem() != null) {\n Block block = (((ItemBlock) stack.getItem()).block);\n if (block != null) {\n tag = new NBTTagCompound();\n tag.setString(AgriCraftNB...
"public void testSha512SignatureVerification() throws Exception {\n runTestSignatureVerification(factory.getInstance(true, new PssSignerParameters(privateKey, \"String_Node_Str\", -1)), factory.getInstance(false, new PssSignerParameters(publicKey, \"String_Node_Str\", -1)));\n}\n"
"public void setUp() throws IOException, DITAOTException {\n tempDir = TestUtils.createTempDir(getClass());\n final File inputDir = new File(\"String_Node_Str\", \"String_Node_Str\" + File.separator + \"String_Node_Str\");\n final File inputMap = new File(inputDir, \"String_Node_Str\");\n final File outDir ...
"public double filterOutput(double[] spectrum) {\n double output = 0.0f;\n int indexSpectrum;\n for (int i = 0; i < this.weight.length; i++) {\n indexSpectrum = this.initialFreqIndex + i;\n if (indexSpectrum < spectrum.length) {\n output += spectrum[indexSpectrum] * this.weight[i];\n ...
"private void doInvoke(String methodName, InstructionHandle stmt, Context context, Map<List<HashedString>, Map<Location, ValueMapping>> input, Interpreter<List<HashedString>, Map<Location, ValueMapping>> interpreter, Map<InstructionHandle, ContextMap<List<HashedString>, Map<Location, ValueMapping>>> state, Map<List<Has...
"public Collection<Object> getAddedObjects(C collection) {\n List<Object> objects = new ArrayList<>(elements.size());\n for (Object element : elements) {\n if (!collection.contains(element)) {\n objects.add(element);\n }\n }\n return objects;\n}\n"
"public boolean isTriggerActive(TileEntity tile, EnumFacing side, IStatementContainer container, IStatementParameter[] parameters) {\n ItemStack searchedStack = StackUtil.EMPTY;\n if (parameters != null && parameters.length >= 1 && parameters[0] != null) {\n searchedStack = parameters[0].getItemStack();\n ...
"public void setEndpoints(List<EndpointInfo> newEndpoints) {\n synchronized (endpointsSyncRoot) {\n endpoints = newEndpoints;\n updateSynchronizers();\n }\n}\n"
"public static List<String> injectWorldIDMap(Map<String, Integer> dataList, int[] blockedIds, Map<String, String> blockAliases, Map<String, String> itemAliases, boolean injectFrozenData, boolean isLocalWorld) {\n FMLLog.info(\"String_Node_Str\", FMLCommonHandler.instance().getEffectiveSide().isServer() ? \"String_No...
"private void insertGivenStories(Scenario scenario, Description scenarioDescription) {\n for (String path : scenario.getGivenStories().getPaths()) {\n String name = path.substring(path.lastIndexOf(\"String_Node_Str\") + 1, path.length());\n scenarioDescription.addChild(Description.createSuiteDescriptio...
"public Control createControl(final Composite subComposite, final IElementParameter param, final int numInRow, final int nbInRow, final int top, final Control lastControl) {\n this.curParameter = param;\n this.paramFieldType = param.getFieldType();\n FormData data;\n final DecoratedField dField = new Decora...
"private boolean syncDishesAndImages() {\n ArrayList<Dish> dishList = ServiceHelper.getDishes();\n if (dishList == null) {\n return false;\n } else {\n ServiceHelper.syncDishImage(dishList);\n for (Dish dish : dishList) {\n dbHelper.addDish(dish);\n }\n return resu...
"public Host updateHost(UpdateHostCmd cmd) throws NoTransitionException {\n Long hostId = cmd.getId();\n Long guestOSCategoryId = cmd.getOsCategoryId();\n HostVO host = _hostDao.findById(hostId);\n if (host == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + hostId + \"String_...
"public void stop() {\n for (Entry<String, BucketWriter> entry : sfWriters.entrySet()) {\n LOG.info(\"String_Node_Str\", entry.getKey());\n try {\n entry.getValue().close(true);\n } catch (Exception ex) {\n LOG.warn(\"String_Node_Str\" + entry.getKey() + \"String_Node_Str\"...
"public void start() {\n prussian = companyManager.getPublicCompany(PR_ID);\n phase = getCurrentPhase();\n startPr = !prussian.hasStarted();\n forcedMerge = phase.getName().equals(\"String_Node_Str\");\n forcedStart = phase.getName().equals(\"String_Node_Str\") || forcedMerge;\n mergePr = !prussianIsC...
"protected final double adjustHorizontal(double dBlockX, double dBlockWidth, AllAxes aax, OneAxis orthogonalAxis) throws ChartException, IllegalArgumentException {\n final OneAxis axPH = aax.areAxesSwapped() ? orthogonalAxis : aax.getPrimaryBase();\n final OneAxis axPV = aax.areAxesSwapped() ? aax.getPrimaryBase(...
"public Resource loadResource(URI uri) {\n final URIConverter theURIConverter = getURIConverter();\n final URI normalizedURI = theURIConverter.normalize(uri);\n Resource result = null;\n result = uriCache.get(normalizedURI);\n if (result == null) {\n result = delegatedGetResource(uri, true);\n ...
"public String getSessionId() {\n return null;\n}\n"
"public void testUltrapeerPong() throws Exception {\n drain(ULTRAPEER_2);\n drain(LEAF);\n byte[] guid = GUID.makeGuid();\n byte[] ip = { (byte) 18, (byte) 239, (byte) 0, (byte) 143 };\n Message m = new PingReply(guid, (byte) 7, 7399, ip, 0, 0, true);\n ULTRAPEER_1.send(m);\n ULTRAPEER_1.flush();\n...
"public static CQLStatementIterator makeCQLforUpdate(String keyspace, CDefinition def, UUID key, Map<String, Object> oldValues, Map<String, Object> newValues) throws CQLGenerationException {\n List<CQLStatement> ret = Lists.newArrayList();\n List<CIndex> effectedIndexes = getEffectedIndexes(def, oldValues, newVal...
"public void should_MakeSuccessfulRequest_WhenJsonRegexMatchesPostJson() throws Exception {\n final String requestUrl = String.format(\"String_Node_Str\", STUBS_URL, \"String_Node_Str\");\n final String content = \"String_Node_Str\";\n final HttpRequest request = HttpUtils.constructHttpRequest(HttpMethods.POST...
"public void restoreLastRevision() {\n try {\n this.sharedLock.lock();\n if (persistenceStore != null) {\n String revision = persistenceStore.getLastRevision(queryPlanIdentifier);\n if (revision != null) {\n restoreRevision(revision);\n }\n } else ...
"private void generateOutputParmsBindings(DataSetHandle datasetHandle) {\n List<DataSetParameterHandle> outputParams = new ArrayList<DataSetParameterHandle>();\n for (Iterator iter = datasetHandle.parametersIterator(); iter.hasNext(); ) {\n Object obj = iter.next();\n if ((obj instanceof DataSetPara...
"private void binarySearch(int start, PriorityQueue<Integer> queue) {\n NodeAction triggerSkip = config.getBinaryPhaseConfiguration().getTriggerSkip();\n queue.add(start);\n while (!queue.isEmpty()) {\n Integer head = queue.poll();\n if (!skip(triggerSkip, solutionSpace.getTransformation(head))) ...
"public void testFindAllResourcesUnpaginated() {\n this.request(\"String_Node_Str\").xmlPost(new Sample(\"String_Node_Str\"));\n this.request(\"String_Node_Str\").xmlPost(new Sample(\"String_Node_Str\"));\n Response response = this.request(\"String_Node_Str\").setQueryParameter(\"String_Node_Str\", \"String_No...
"public void makeTopLevelShell() throws IOException {\n String permutationId = getPermutationId();\n PrintWriter outFile = new PrintWriter(getOutFile(\"String_Node_Str\" + \"String_Node_Str\" + getPermutationId() + \"String_Node_Str\"));\n addStandardHtmlProlog(outFile, \"String_Node_Str\" + permutationId, \"S...
"private State buildDefaultState() {\n State state = new State();\n final Intent intent = getIntent();\n state.action = State.ACTION_BROWSE_ALL;\n state.acceptMimes = new String[] { \"String_Node_Str\" };\n state.allowMultiple = true;\n state.acceptMimes = new String[] { intent.getType() };\n Preco...
"public void onGifLoaded() {\n AndroidApi.UI_THREAD_HANDLER.post(new Runnable() {\n\n public void run() {\n if (mIsDestroyed)\n return;\n mRequest = null;\n imageView = new ImageView(context);\n imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);\...
"protected <R> R proxyReturnObject(final Class<R> rClass, final E eventId, Object field) {\n final long startTime = System.currentTimeMillis();\n final long tid = sendEvent(startTime, eventId, out -> out.object(o));\n if (eventReturnsNull(eventId))\n return null;\n if (rClass == vClass)\n retu...
"public long insertWithOnConflict(String table, String nullColumnHack, ContentValues initialValues, int conflictAlgorithm) {\n if (!isOpen()) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n StringBuilder sql = new StringBuilder(152);\n sql.append(\"String_Node_Str\");\n sql.append(...
"public void onExplode(EntityExplodeEvent event) {\n for (Arena a : pli.getArenas()) {\n if (a.getArenaType() == ArenaType.REGENERATION) {\n Cuboid c = a.getBoundaries();\n if (c != null) {\n if (event.getEntity() != null) {\n if (c.containsLocWithoutY(e...
"private void appendPValueColumns(String[] inputFiles, ObjectSet<String> selection) {\n String firstFile = inputFiles[0];\n try {\n VCFParser parser = new VCFParser(firstFile);\n parser.readHeader();\n GroupAssociations groupAssociations = parser.getGroupAssociations();\n ObjectArraySe...
"public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {\n super.messageReceived(ctx, e);\n if (ctx.getAttachment() instanceof DiscardEvent) {\n ctx.getChannel().setReadable(false);\n return;\n } else if (ctx.getAttachment() instanceof Callable<?>) {\n Htt...
"public <T extends ServiceConfiguration> T store(T t) throws ServiceRegistrationException {\n EntityWrapper<T> db = EntityWrapper.get(t);\n try {\n db.add(t);\n t = db.getUnique(t);\n db.commit();\n EventRecord.here(ServiceConfigurationProvider.class, EventClass.COMPONENT, EventType.CO...
"public void testFilter4() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = columnEdge.c...
"public static PositionList getMoves(Piece p, PositionList list) {\n int x = p.getPosition().x;\n int y = p.getPosition().y;\n while (x >= 0) {\n x--;\n Position pos = new Position(x, y);\n if (!list.addMove(pos, p.getSide())) {\n break;\n }\n if (!p.getBoard().isF...
"boolean adjustWallpaperWindowsLocked() {\n boolean changed = false;\n final int dw = mDisplay.getWidth();\n final int dh = mDisplay.getHeight();\n final ArrayList localmWindows = mWindows;\n int N = localmWindows.size();\n WindowState w = null;\n WindowState foundW = null;\n int foundI = 0;\n ...
"public void addChild(Integer index, Component c) {\n if (index == null)\n return;\n if (index < 1 || index > 2)\n throw new IndexOutOfBoundsException(\"String_Node_Str\" + index + \"String_Node_Str\");\n if (!(c instanceof Container))\n getChildren().put(index, null);\n else\n g...
"public V get(K key) {\n Node<K, V> currentNode = root;\n while (currentNode instanceof InternalNode) {\n currentNode = currentNode.getChild(key).left();\n }\n if (currentNode instanceof LeafNode) {\n return currentNode.getChild(key).right();\n } else {\n return null;\n }\n}\n"
"protected void getQueryString1(StringBuilder sbSelectFrom) {\n sbSelectFrom.append(\"String_Node_Str\");\n sbSelectFrom.append(entityType.getName()).append(' ');\n sbSelectFrom.append(entityAlias);\n sbSelectFrom.append(\"String_Node_Str\");\n for (Map.Entry<String, String> attributeEntry : setAttribute...
"public void clearChanges() {\n lock.lock();\n try {\n changes.clear();\n } finally {\n lock.unlock();\n }\n}\n"
"public void onBlockBreak(BlockBreakEvent event) {\n if (event.isCancelled())\n return;\n if (JailZoneManager.isInsideJail(event.getBlock().getLocation()) && (!Util.permission(event.getPlayer(), \"String_Node_Str\", event.getPlayer().isOp()) || Jail.prisoners.containsKey(event.getPlayer().getName().toLower...
"public DisplayMode getDefaultDisplayMode() {\n try {\n if (checkService()) {\n return sService.getDefaultDisplayMode();\n }\n } catch (RemoteException e) {\n }\n return null;\n}\n"
"private void refreshChart() {\n for (ISeries s : chart.getSeriesSet().getSeries()) chart.getSeriesSet().deleteSeries(s.getId());\n if (getClient().getConsumerPriceIndeces() == null || getClient().getConsumerPriceIndeces().isEmpty())\n return;\n List<ConsumerPriceIndex> indeces = new ArrayList<ConsumerP...
"private Tree addTreeItems(ClusterView cv) {\n Tree tree = new Tree();\n memberTreeItem = addTreeItem(tree, \"String_Node_Str\", cv.getMembers(), clusterId, null);\n itemMap.put(InstanceType.MAP, new InstanceWidgets(InstanceType.MAP, addTreeItem(tree, \"String_Node_Str\", cv.getMaps(), clusterId, InstanceType....
"private void addWsdlNeedLib(RoutineItem routineItem) {\n List<IMPORTType> wsdlNeedImport = new ArrayList<IMPORTType>();\n IMPORTType type1 = ComponentFactory.eINSTANCE.createIMPORTType();\n type1.setMODULE(\"String_Node_Str\");\n type1.setREQUIRED(true);\n type1.setNAME(routineItem.getProperty().getLabe...
"public void play(float x, float y, boolean loop) {\n this.soundSystem.setPosition(sourceName, x, y, 0);\n this.soundSystem.setLooping(sourceName, loop);\n this.soundSystem.play(sourceName);\n}\n"
"public void attribute(UnmarshalRecord unmarshalRecord, String namespaceURI, String localName, String value) {\n unmarshalRecord.removeNullCapableValue(this);\n XMLDescriptor referenceDescriptor = (XMLDescriptor) getMapping().getReferenceDescriptor();\n TreeObjectBuilder treeObjectBuilder = (TreeObjectBuilder)...
"public static List<Object> getTopParent(Object son) {\n if (!((son instanceof XSDElementDeclaration))) {\n return null;\n }\n XSDElementDeclaration elem = null;\n elem = (XSDElementDeclaration) son;\n if (elem.getSchema() == null) {\n return null;\n }\n EList<XSDSchemaContent> parent...
"public Map<String, String> getRuntimeArgs(ProgramId program) throws IOException, UnauthenticatedException, ProgramNotFoundException, UnauthorizedException {\n String path = String.format(\"String_Node_Str\", program.getApplication(), program.getVersion(), program.getType().getCategoryName(), program.getProgram());\...
"public void clear() {\n if (!getDB().isClosed()) {\n dbMap.clear();\n this.getDB().delete(mapName);\n this.getDB().getEngine().clearCache();\n }\n}\n"
"public void setLine(String line) {\n this.line = new TextLine(line, this.line.bounds);\n}\n"
"private String convert() {\n final StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\" + Globals.APP_NAME + \"String_Node_Str\");\n sb.append(Globals.APP_VERSION_STRING);\n sb.append('\\n');\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\" + \"String_Node_Str\" + ...
"public void handleMultiMap(Node node) {\n BeanDefinitionBuilder multiMapConfigBuilder = createBeanBuilder(MultiMapConfig.class);\n final Node attName = node.getAttributes().getNamedItem(\"String_Node_Str\");\n final String name = getValue(attName);\n fillAttributeValues(node, multiMapConfigBuilder);\n f...
"public VFSLeaf execute() {\n Feed reloadedFeed = getFeed(feed, false);\n if (item.getPublishDate() == null)\n item.setPublishDate(new Date());\n setEnclosure(file, item, reloadedFeed);\n VFSContainer itemContainer = createItemContainer(feed, item);\n VFSLeaf itemFile = itemContainer.createChildLe...
"public void startSheet(int[] coordinates) throws IOException {\n if (writer == null) {\n initializeWriterAsTempWriter();\n }\n writer.startSheet(coordinates, pageHeader, pageFooter);\n sheetIndex++;\n}\n"
"public int onProvidePower(int units) {\n ArrayList<CoordTriplet> deadCoords = null;\n if (!isConnected) {\n return units;\n }\n if (deadCoords != null && deadCoords.size() > 0) {\n powerConnections.removeAll(deadCoords);\n if (powerConnections.size() <= 0) {\n worldObj.setBl...
"public void execute(Event<UIPage> event) throws Exception {\n UIPage uiPage = event.getSource();\n UIPortalApplication uiPortalApp = uiPage.getAncestorOfType(UIPortalApplication.class);\n UIMaskWorkspace uiMaskWorkspace = uiPortalApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);\n UIAddNewApplication ui...
"public NATFeatureRealization executeTest() {\n NATFeatureRealization result = NATFeatureRealization.DONT_CARE;\n Socket toStunServer = null;\n try {\n toStunServer = this.createConnectedSocket(this.primaryStunServerAddress);\n final Message responseTestI = this.executeTestI(toStunServer);\n ...
"public DirectoryEntries readDir(UserCredentials userCredentials, String path, int offset, int count, boolean namesOnly) throws IOException, PosixErrorException, AddressToUUIDNotFoundException {\n DirectoryEntries result = null;\n result = metadataCache.getDirEntries(path, offset, count);\n if (result != null)...
"public List<BusinessGroup> findBusinessGroupsOfAreaAttendedBy(Identity identity, String areaName, OLATResource resource) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\").append(BusinessGroupImpl.class.getName()).append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_N...
"static void w(String message) {\n if (!warning || message == null || message.isEmpty())\n return;\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + message);\n}\n"
"public void onDroneEvent(DroneInterfaces.DroneEventsType event, Drone drone) {\n final IDroidPlannerApiCallback callback = getCallback();\n Bundle extrasBundle;\n try {\n switch(event) {\n case DISCONNECTED:\n callback.onDroneEvent(Event.EVENT_DISCONNECTED, emptyBundle);\n ...
"public static <T> Class<?> getTypeArgument(Class<? extends T> clazz, TypeVariable<? extends GenericDeclaration> tv) {\n Map<Type, Type> resolvedTypes = new HashMap<Type, Type>();\n Type type = clazz;\n while (!getClass(type).equals(Object.class)) {\n if (type instanceof Class) {\n type = ((C...
"private void handlePreExisting(File targetWin32Exe, File targetXml, boolean force) {\n if (targetWin32Exe.exists() || targetXml.exists()) {\n if (force) {\n if (!targetWin32Exe.delete())\n trace(\"String_Node_Str\");\n if (!targetXml.delete())\n trace(\"Str...
"private Collection<URI> extractExternalResources(Collection<URI> allResources) throws OpenRDFException {\n Collection<URI> validExternalResources = new HashSet<>();\n for (URI uri : allResources) {\n if (isExternalResource(uri) && isNonSkosURL(uri)) {\n validExternalResources.add(uri);\n ...
"public DataSet<Boolean> equalsByGraphData(GraphCollection<G, V, E> other) {\n return new CollectionEquality<>(new GraphHeadDataLabeler<G>(), new VertexDataLabeler<V>(), new EdgeDataLabeler<E>()).execute(this, other);\n}\n"
"public void onRemoveItem(ISplitTransactionsDataset object) {\n if (mSplitDeleted == null) {\n mSplitDeleted = new ArrayList<>();\n }\n if (object.getSplitTransId() != -1) {\n mSplitDeleted.add(object);\n}\n"
"public void appendSignature(StringBuilder buffer) {\n if (this.lowerBound != null) {\n buffer.append('-');\n this.lowerBound.appendSignature(buffer);\n } else if (this.upperBound != null) {\n buffer.append('+');\n this.upperBounds[0].appendSignature(buffer);\n } else {\n buf...
"private void teardown(final Throwable t) {\n if ((t != null) && !this.response.isDone()) {\n Logs.extreme().debug(\"String_Node_Str\" + t.getMessage() + \"String_Node_Str\" + ((this.request.get() != null) ? this.request.get().getClass() : \"String_Node_Str\"));\n if (t instanceof RetryableConnectionEx...
"private synchronized Connection getConnection(String dbDriver, String url, String dbConnectionName) throws ClassNotFoundException, SQLException {\n debugSharedConnections();\n Connection connection = sharedConnections.get(dbConnectionName);\n if (connection == null) {\n if (DEBUG) {\n System...
"public Analysis findAnalysis(IFile file) {\n if (checkFile(file)) {\n Analysis analysisEntity = allAnalysisMap.get(file);\n if (analysisEntity == null) {\n analysisEntity = readFromFile(file);\n }\n return analysisEntity;\n }\n return readFromFile(file);\n}\n"
"public static void setIsFollowedBlogUrl(String url, boolean isFollowed) {\n if (TextUtils.isEmpty(url))\n return;\n }\n String normUrl = UrlUtils.normalizeUrl(url);\n long sqlIsFollowed = SqlUtils.boolToSql(isFollowed);\n SQLiteStatement stmt = ReaderDatabase.getWritableDb().compileStatement(\"St...
"public void setHexModel(MapHex model) {\n this.model = model;\n currentTile = model.getCurrentTile();\n hexName = model.getName();\n currentTileId = model.getCurrentTile().getId();\n currentTileOrientation = model.getCurrentTileRotation();\n currentGUITile = new GUITile(currentTileId, model);\n cu...
"public void setUserPropertyDefn(UserPropertyDefn prop) throws UserPropertyException, PropertyValueException {\n UserPropertyCommand cmd = new UserPropertyCommand(elementHandle.getModule(), getElement());\n cmd.setPropertyDefn(propDefn, prop);\n}\n"
"public void conferenceInviteReceived(SessionConferenceEvent ev) {\n logger.debug(\"String_Node_Str\" + ev.toString());\n try {\n AdHocChatRoom chatRoom = getLocalChatRoomInstance(ev.getRoom());\n if (chatRoom == null) {\n chatRoom = createLocalChatRoomInstance(ev.getRoom(), ev.getFrom())...
"public void switchAbc(int index) {\n listIndex = index;\n classTree.setSwf(swf);\n if (index != -1) {\n this.abc = swf.abcList.get(index).getABC();\n }\n updateConstList();\n}\n"
"public boolean onVolumeDown() {\n if (openHABWidgetAdapter != null) {\n return openHABWidgetAdapter.onVolumeDown();\n }\n return false;\n}\n"
"private void availability(Endpoint ep, AAnalyser a) {\n TreeSet<AResult> res = new TreeSet<AResult>(new Comparator<AResult>() {\n public int compare(AResult o1, AResult o2) {\n int diff = o1.getEndpointResult().getStart().compareTo(o2.getEndpointResult().getStart());\n return diff;\n ...
"public static TextEncodingDetails calcTextEncodingDetails(CharSequence msg, boolean force7BitEncoding) {\n TextEncodingDetails ted;\n int septets = countAsciiSeptets(msg, force7BitEncoding);\n if (septets != -1 && septets <= SmsMessage.MAX_USER_DATA_SEPTETS) {\n ted = new TextEncodingDetails();\n ...
"static boolean cancel() {\n if (Dungeon.hero != null || Dungeon.hero.curAction != null || Dungeon.hero.resting) {\n Dungeon.hero.curAction = null;\n Dungeon.hero.resting = false;\n return true;\n } else {\n return cancelCellSelector();\n }\n}\n"
"private void handleAt(String first) {\n if (first.length() == 1) {\n println(\"String_Node_Str\");\n return;\n }\n File f = new File(first.substring(1));\n println(\"String_Node_Str\" + f.getAbsolutePath());\n if (f.exists()) {\n try {\n br = new BufferedReader(new InputS...
"public KeyDefinitionBuilder<S, K> asChild(int currentIndex) {\n return new KeyDefinitionBuilder<S, K>(keys, keySourceGetter, this, currentIndex, false);\n}\n"
"public boolean pushMaterial(ISPosition2D position, EMaterialType materialType) {\n return getPartitionObject(position.getX(), position.getY()).pushMaterial(position, materialType);\n}\n"
"private void solve() {\n initialize();\n int maxSymOps = subunits.getSubunitCount();\n boolean isSpherical = isSpherical();\n if (maxSymOps % 60 == 0 && isSpherical) {\n maxSymOps = 60;\n }\n AxisAngle4d sphereAngle = new AxisAngle4d();\n Matrix4d transformation = new Matrix4d();\n int n...
"public double Compute(int n, int m, double[] x, double[] con, boolean[] terminate) throws IllegalActionException {\n double evalX = 0;\n DoubleToken[] xTokens = new DoubleToken[x.length];\n for (int i = 0; i < xTokens.length; i++) {\n xTokens[i] = new DoubleToken(x[i]);\n }\n ArrayToken xAsToken ...
"private Map<ScrambleMeta, String> addTierColumnToSelectListAndGroupBy(SelectQuery query, List<SelectItem> newSelectList, ScrambleMetaSet scrambleMetaSet, List<ProjectionNode> projectionNodeSources) {\n Map<ScrambleMeta, String> scrambleMetaAnditsAlias = new HashMap<>();\n for (AbstractRelation table : query.getF...
"private PropertySource<?> loadPropertySource(Resource resource, String path) {\n if (resource.exists()) {\n try {\n PropertySource<?> source = new YamlPropertySourceLoader().load(path, resource, null, this.environment::acceptsProfiles);\n if (source != null) {\n logger.in...
"public String getRevisionNr() {\n return versions.getRevisionNr();\n}\n"
"private String generateDeleteMessage(final List<DocumentInfo> docs) {\n String message;\n int dirsCount = 0;\n for (DocumentInfo doc : docs) {\n if (doc.isDirectory()) {\n ++dirsCount;\n }\n }\n if (docs.size() == 1) {\n String displayName = BidiFormatter.getInstance().un...
"private void commitBatch(Region region, List<Mutation> mutations, long blockingMemstoreSize) throws IOException {\n if (mutations.isEmpty()) {\n return;\n }\n Mutation[] mutationArray = new Mutation[mutations.size()];\n for (int i = 0; (region.getMemStoreHeapSize() + region.getMemStoreOffHeapSize())...
"public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {\n if (convertView == null) {\n convertView = inflater.inflate(R.layout.stats_list_cell, parent, false);\n StatsViewHolder viewHolder = new StatsViewHolder(convertView);\n convertView.setTag(vie...
"public <T extends VMInstanceVO> boolean advanceStop(T vm, boolean forced, User user, Account account) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException {\n State state = vm.getState();\n if (state == State.Stopped) {\n if (s_logger.isDebugEnabled()) {\n ...
"public Task getTask() {\n if (this.getRecordOwner() != null)\n return this.getRecordOwner().getTask();\n Task task = super.getTask();\n if (task == null) {\n if (this.getTable() != null)\n if (this.getTable().getDatabase() != null)\n if (this.getTable().getDatabase().ge...
"public void testUnidirectionalManyToMany() {\n Session session = openSession();\n Transaction tx = session.beginTransaction();\n Student john = new Student(\"String_Node_Str\", \"String_Node_Str\");\n Student kate = new Student(\"String_Node_Str\", \"String_Node_Str\");\n Student mario = new Student(\"S...
"public boolean visitNode(ExecutionContext context) {\n MethodInfo method = context.getMethodInfo();\n MethodCode code = method.getCode();\n long ec = getExecCount(method);\n if (ec == 0)\n return false;\n ControlFlowGraph cfg = method.getCode().getControlFlowGraph(false);\n for (CFGNode node :...