content
stringlengths
40
137k
"private ASTSlice[] getTable() {\n if (selectedPackage != null)\n astReader = new ASTReader(selectedPackage);\n else\n astReader = new ASTReader(selectedProject);\n SystemObject systemObject = astReader.getSystemObject();\n List<PDGSliceUnion> extractedSliceUnions = new ArrayList<PDGSliceUnion...
"private boolean addRandomEdges(Node[] nodes, Edges edges, int toAdd) {\n ArrayList<Node> listDst = new ArrayList<Node>();\n ArrayList<Node> listSrc = new ArrayList<Node>();\n for (int i = 0; i < DEGREE; i++) {\n listDst.addAll(Arrays.asList(nodes));\n listSrc.addAll(Arrays.asList(nodes));\n }...
"public void saveAnalysis() throws DataprofilerCoreException {\n IRepositoryViewObject reposObject = null;\n analysisHandler.clearAnalysis();\n ModelElementIndicator[] modelElementIndicators = this.getCurrentModelElementIndicators();\n Connection tdProvider = null;\n Analysis analysis = analysisHandler.g...
"public static boolean isWeapon(Material mat) {\n return mat != null && (mat == Material.WOOD_AXE || mat == Material.WOOD_PICKAXE || mat == Material.WOOD_SPADE || mat == Material.WOOD_SWORD || mat == Material.STONE_AXE || mat == Material.STONE_PICKAXE || mat == Material.STONE_SPADE || mat == Material.STONE_SWORD || ...
"public static Sequence deepRule(String symbol, List<? extends Expression> inputs, int[] depths, boolean[] isFile, Expression action, TaskMode mode, Expression priority, ExecContext execCx) {\n assert (inputs.size() == depths.length);\n assert (inputs.size() == isFile.length);\n List<Expression> depthExprs = n...
"public List<? extends ProjectInvitation> listProjectInvitations(Long id, Long projectId, String accountName, Long domainId, String state, boolean activeOnly, Long startIndex, Long pageSizeVal, boolean isRecursive, boolean listAll) {\n Account caller = UserContext.current().getCaller();\n List<Long> permittedAcco...
"private void synDuplicatedRoutine(RoutineItem item) {\n ICodeGeneratorService codeGenService = (ICodeGeneratorService) GlobalServiceRegister.getDefault().getService(ICodeGeneratorService.class);\n if (codeGenService != null) {\n codeGenService.createRoutineSynchronizer().renameRoutineClass(item);\n ...
"private void createMeasureMenu(IMenuManager menu, Object firstSelectedObj, IContributionItem beforeThis) {\n DesignElementHandle element = null;\n String firstId = beforeThis.getId();\n if (firstSelectedObj instanceof DesignElementHandle) {\n element = (DesignElementHandle) firstSelectedObj;\n } els...
"public void testSetEventCall() {\n setting.subscribe(listener);\n Random random = new FastRandom();\n final int maxSetValueCount = 50;\n int expectedEventCallCount = 0;\n for (int i = 0; i < MAX_SET_VALUE_COUNT; i++) {\n int randomInt = random.nextInt(-50, 150);\n expectedEventCallCount +=...
"public Date getDateValue() {\n if (getType() == null || !\"String_Node_Str\".equals(getType())) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Date res;\n if (values == null && values.isEmpty()) {\n res = null;\n } else {\n res = (Date) values.iterator().next();\...
"private void updateTarget() {\n if (!this.hasAttacked && this.targetEntity != null) {\n this.path = this.world.findPath(this, this.targetEntity, pathingRange);\n }\n if (targetEntity != null) {\n if (this.targetEntity.dead) {\n resetTarget();\n }\n if (targetEntity != nu...
"public Class[] toClassObjects(String[] names) throws ClassNotFoundException {\n Class[] classes = new Class[names.length];\n for (int i = 0; i != names.length; ++i) {\n Class<?> c = ReflectionHelper.primitiveToClass(names[i]);\n classes[i] = c != null ? c : classForName(names[i]);\n }\n retur...
"public void run() {\n isPreprocessEnabled = preprocessEnabled.getSelection();\n pp_outputPath = CommonUiActivator.getDefault().getPreferenceStore().getString(\"String_Node_Str\");\n if (isPreprocessEnabled && pp_outputPath.isEmpty()) {\n form.getMessageManager().addMessage(\"String_Node_Str\", \"String...
"private EntityManagerFactoryImpl getEntityManagerFactory() {\n Map<String, Object> props = new HashMap<String, Object>();\n String persistenceUnit = \"String_Node_Str\";\n props.put(Constants.PERSISTENCE_UNIT_NAME, persistenceUnit);\n props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY, \"String_Node_St...
"public void onLoadFinished(Loader<Cursor> loader, Cursor messagesCursor) {\n if (messagesAdapter == null) {\n initListView(messagesCursor);\n } else {\n messagesAdapter.changeCursor(messagesCursor);\n if (totalEntries > 0) {\n messagesListView.setSelection(totalEntries - 1);\n ...
"public static String getCurrentVersion(RepositoryNode repositoryNode) {\n try {\n List<IRepositoryNode> nodeChildren = repositoryNode.getChildren();\n if ((repositoryNode.getId() == \"String_Node_Str\") && (nodeChildren != null) && (nodeChildren.size() == 1)) {\n return ProxyRepositoryFacto...
"public void notifyChanged(Notification notification) {\n int type = notification.getEventType();\n int featureId = notification.getFeatureID(XmlmapPackage.class);\n switch(type) {\n case Notification.ADD:\n case Notification.REMOVE:\n case Notification.REMOVE_MANY:\n switch(fea...
"public ScorePosNeg computeScore(Description concept) {\n if (useOldDIGOptions) {\n if (useRetrievalForClassification) {\n SortedSet<Individual> posClassified = reasoner.getIndividuals(concept);\n SortedSet<Individual> posAsPos = Helper.intersection(positiveExamples, posClassified);\n ...
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n HlaManager newObject = (HlaManager) super.clone(workspace);\n newObject._hlaAttributesToPublish = new HashMap<String, Object[]>();\n newObject._hlaAttributesSubscribedTo = new HashMap<String, Object[]>();\n newObject._fromFedera...
"public void decodeDescriptionPacket(NBTTagCompound data) {\n readFromNBT(data);\n onFuelStatusChanged();\n}\n"
"public final void rowProcessed(String[] row, ParsingContext context) {\n splitter.addValuesToColumns(row, context);\n batchCount++;\n if (batchCount >= rowsPerBatch) {\n batchProcessed(batchCount);\n batchCount = 0;\n splitter.clearValues();\n batchesProcessed++;\n }\n}\n"
"private static void serveDefaultErrorPage(HttpServletRequest request, HttpServletResponse response, int statusCode) throws IOException, ServletException {\n RequestFacadeHelper reqFacHelper = RequestFacadeHelper.getInstance(request);\n if (response.isCommitted() || statusCode < 400 || (reqFacHelper != null && re...
"public static byte[] cryptoBoxSealOpen(byte[] cipherText, byte[] pk, byte[] sk) throws SodiumLibraryException {\n byte[] decrypted = new byte[(int) (cipherText.length - sodium().crypto_box_sealbytes().intValue())];\n int rc = sodium().crypto_box_seal_open(decrypted, cipherText, cipherText.length, pk, sk);\n i...
"public String regexLike(String element, String regex) {\n if (null == regularExpressionFunction || PluginConstant.EMPTY_STRING.equals(regularExpressionFunction) || existEmptyInParameter(element, regex)) {\n return null;\n }\n String functionNameSQL = functionName + \"String_Node_Str\";\n if (null !=...
"private <P, R> Response<R> internalSendRequestWebSocket(Request<P> request, Class<R> resultClass) throws IOException {\n connectIfNecessary();\n Future<Response<JsonElement>> responseFuture = null;\n if (request.getId() != null) {\n responseFuture = pendingRequests.prepareResponse(request.getId());\n ...
"private <X extends Class, T extends Object> void populateMetadata(EntityMetadata metadata, Class<X> clazz) {\n Table table = clazz.getAnnotation(Table.class);\n boolean isEmbeddable = false;\n metadata.setTableName(table.name());\n addNamedNativeQueryMetadata(clazz);\n String schemaStr = table.schema();...
"public void hostedInstanceBasedUpdatePool() {\n Subscription s = createInstanceBasedSub(\"String_Node_Str\", 100, 2, false);\n Pool p = TestUtil.copyFromSub(s);\n List<Pool> pools = poolRules.createAndEnrichPools(p, new LinkedList<Pool>());\n assertEquals(1, pools.size());\n Pool pool = pools.get(0);\n ...
"protected SearchRequestResult parse_search(String html, int page) throws OpacErrorException, NotReachableException {\n Document doc = Jsoup.parse(html);\n if (doc.select(\"String_Node_Str\").size() > 0) {\n if (doc.select(\"String_Node_Str\").text().trim().startsWith(\"String_Node_Str\")) {\n r...
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n Sleep newObject = (Sleep) super.clone(workspace);\n newObject.output.setTypeAtLeast(newObject.input);\n return newObject;\n}\n"
"public List<Task> getActiveTasks() {\n HttpResponse response = null;\n HttpGet get = new HttpGet(buildUri(getBaseUri()).path(\"String_Node_Str\").build());\n try {\n response = executeRequest(get);\n return getResponseList(response, client.getGson(), Task.class, new TypeToken<List<Task>>() {\n ...
"public boolean apply(Game game, Ability source) {\n List<FixedTarget> detainedObjects = new ArrayList<>();\n for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {\n game.informPlayers(\"String_Node_Str\" + permanent.getName())...
"public void testHistoricalNone() {\n lastContentPath.initialize(channelName, ContentKey.NONE, HISTORICAL_FIRST_UPDATED);\n lastContentPath.initialize(channelName, ContentKey.NONE, HISTORICAL_LAST_UPDATED);\n ChannelConfig channel = getHistoricalChannel(channelName);\n localChannelService.updateChannel(chan...
"public void setDateFilter() {\n Blog blog = WordPress.getCurrentBlog();\n if (blog == null)\n return;\n String blogId = String.valueOf(blog.getBlogId());\n GregorianCalendar startDate = new GregorianCalendar(mStartYear, mStartMonth, mStartDay);\n GregorianCalendar endDate = new GregorianCalendar(...
"public void deletePortProfile(String name) throws CloudRuntimeException {\n String command = VsmCommand.getDeletePortProfile(name);\n if (command != null) {\n command = command.concat(SSH_NETCONF_TERMINATOR);\n parseOkReply(sendAndReceive(command));\n } else {\n throw new CloudRuntimeExce...
"protected UrlMapping evalUrlMapping(NutConfig config, Class<?> mainModule, Ioc ioc) throws Exception {\n UrlMapping mapping = createUrlMapping(config);\n if (log.isInfoEnabled())\n log.infof(\"String_Node_Str\", mapping.getClass().getName());\n ViewMaker[] makers = createViewMakers(mainModule, ioc);\n ...
"public Response search(final HttpServletRequest request, final Set<String> sources, final String searchKey, final Set<String> inverseAttributes, final Set<String> includeTags, final Set<String> excludeTags, final Set<String> types, final Set<String> flags) {\n validateSources(request, sources);\n validateSearchK...
"public void removeConflict(String txId, String path) {\n Optional<RocksDBReference> dbRefOpt = getDb(txId);\n if (!dbRefOpt.isPresent()) {\n return;\n }\n try (RocksDBReference dbRef = dbRefOpt.get()) {\n dbRef.db().delete(key(path));\n } catch (RocksDBException e) {\n propagate(e);...
"public void mark() throws IOException {\n ensureOpen();\n int index = currentIt.previousIndex();\n markIt = index >= 0 ? list.listIterator(currentIt.previousIndex()) : list.listIterator(0);\n if (markIt.hasNext()) {\n markIt.next();\n }\n}\n"
"public void propertyChange(PropertyChangeEvent event) {\n if (!event.getPropertyName().equals(ERepositoryActionName.CREATE.getName()) && !event.getPropertyName().equals(ERepositoryActionName.IMPORT.getName())) {\n return;\n }\n if (!(event.getNewValue() instanceof ProcessItem) && !(event.getNewValue() ...
"public VcTask execute(IVcTaskBody taskObj) throws Exception {\n Exception catchedException = null;\n for (int i = 0; i < MaxRetryNum; i++) {\n try {\n return executeInternal(taskObj);\n } catch (Exception e) {\n catchedException = e;\n if (VcUtil.isRecoverableExcept...
"void fireRead(FMLProxyPacket msg, ChannelHandlerContext ctx) {\n FMLNetworkEvent.CustomPacketEvent<?> event = null;\n if (msg.handler() instanceof NetHandlerPlayClient) {\n NetHandlerPlayClient client = (NetHandlerPlayClient) msg.handler();\n event = new FMLNetworkEvent.ClientCustomPacketEvent(clie...
"public void testNeedExcludeGroup() {\n final Map<FilterKey, Action> fm = new HashMap<FilterKey, Action>();\n fm.put(new FilterKey(\"String_Node_Str\", \"String_Node_Str\"), Action.INCLUDE);\n fm.put(new FilterKey(\"String_Node_Str\", null), Action.EXCLUDE);\n fm.put(new FilterKey(\"String_Node_Str\", null)...
"private void generateJobProperties() {\n File file = new File(this.dir, \"String_Node_Str\");\n try {\n FileWriter fw = new FileWriter(file);\n fw.write(\"String_Node_Str\" + this.dataModel.getEnv().getOOZIE_NAMENODE() + \"String_Node_Str\");\n fw.write(\"String_Node_Str\" + this.dataModel.g...
"public synchronized void updateDocumentAttributes(Object o, long rev, String id, String key) {\n if (o != null) {\n if (o instanceof java.util.Map) {\n java.util.Map m = (java.util.Map) o;\n m.put(BaseDocument.ID, id);\n m.put(BaseDocument.KEY, key);\n m.put(BaseDo...
"protected void assignItem(Player player, StartItem item, int price, int sharePrice) {\n Certificate primary = item.getPrimary();\n String priceText = Currency.toBank(player, price);\n ReportBuffer.add(LocalText.getText(\"String_Node_Str\", player.getId(), primary.getName(), priceText));\n transferCertifica...
"protected void layout() {\n super.layout();\n icon.x = x + (width - icon.width) / 2f;\n icon.y = y + (height - icon.height) / 2f;\n PixelScene.align(icon);\n if (topLeft != null) {\n topLeft.x = x;\n topLeft.y = y;\n }\n if (topRight != null) {\n topRight.x = x + (width - topR...
"public static void dispatchAll(BaseMessage message) throws EucalyptusCloudException {\n for (ServiceConfiguration service : Components.lookup(Storage.class).enabledServices()) {\n try {\n service.lookupService().getDispatcher().dispatch(message);\n } catch (NoSuchServiceException ex) {\n ...
"public void get(HttpExchange exchange, boolean internalCall, JSONObject internalResp) {\n String links_to = database.getSymlinkAlias(URI);\n links_to = cleanPath(links_to);\n logger.info(\"String_Node_Str\" + links_to);\n if (links_to.startsWith(\"String_Node_Str\")) {\n logger.info(\"String_Node_St...
"protected void shiftColumnBand(int sourceColumn, int destColumn) throws SemanticException {\n ColumnBandData data = getShiftData(sourceColumn);\n int newPosn = adjustDestPosn(sourceColumn, destColumn);\n if (newPosn == -1)\n return;\n if (!checkTargetColumn(sourceColumn, destColumn))\n throw ...
"public void registerSubscriber(ConsumingSubscriber<IndexedValue<V>> sub, IndexQuery<V> vanillaIndexQuery) {\n final AtomicBoolean isClosed = new AtomicBoolean();\n activeSubscriptions.put(sub, isClosed);\n final long from = vanillaIndexQuery.from() == 0 ? lastIndexRead : vanillaIndexQuery.from();\n Iterato...
"protected void addEntityClassToDocument(EntityMetadata metadata, Object object, Document document) {\n try {\n Field luceneField;\n String id;\n id = PropertyAccessorHelper.getId(object, metadata);\n luceneField = getLuceneField(ENTITY_ID_FIELD, id);\n document.add(luceneField);\n...
"public static Date parse(String date) {\n SimpleDateFormat format = new SimpleDateFormat(\"String_Node_Str\");\n format.setTimeZone(TimeZone.getTimeZone(\"String_Node_Str\"));\n Date ret;\n try {\n ret = format.parse(date);\n return ret;\n } catch (ParseException e) {\n format = new...
"public void readEntitiesFromWorld(IBuilderContext context, TileEntity anchorTile) {\n BptContext bptContext = (BptContext) context;\n Vec3 transform = new Vec3(0, 0, 0).subtract(context.surroundingBox().pMin());\n for (Object o : context.world().loadedEntityList) {\n Entity e = (Entity) o;\n if ...
"public void press(int cell, Char ch) {\n if (ch != null && pit[cell] && !ch.flying) {\n if (ch == Dungeon.hero) {\n Chasm.heroFall(cell);\n } else if (ch instanceof Mob) {\n Chasm.mobFall((Mob) ch);\n }\n return;\n }\n TimekeepersHourglass.timeFreeze timeFreez...
"private Point getTokenOrigin(int numTokens, int currentToken, int numStations, int currentStation) {\n Point p = new Point();\n switch(numStations) {\n case 1:\n switch(numTokens) {\n case 1:\n p.x = (center.x - 9);\n p.y = (center.y - 9);\n ...
"public static org.talend.core.model.metadata.builder.connection.MetadataColumn convertFromAvro(Schema.Field field) {\n org.talend.core.model.metadata.builder.connection.MetadataColumn col = ConnectionFactory.eINSTANCE.createMetadataColumn();\n Schema in = field.schema();\n col.setId(field.name());\n col.se...
"public void setUp() {\n xmlComparer = new SDOXMLComparer();\n if (customContext) {\n aHelperContext = new SDOHelperContext();\n } else {\n aHelperContext = HelperProvider.getDefaultContext();\n }\n typeHelper = aHelperContext.getTypeHelper();\n xmlHelper = aHelperContext.getXMLHelper();...
"private void checkURI() {\n ontologieURI = new HashSet<String>();\n Set<OWLOntology> ont = editor.getModelManager().getActiveOntologies();\n Set<Individual> indi = reasoner.getIndividuals();\n for (Individual ind : indi) {\n int ontURI = ind.toString().lastIndexOf(\"String_Node_Str\");\n int ...
"private void fileRecordStartStop(String confRoom, String participant, String startRecordfile, String stopRecordFile) {\n log.debug(\"String_Node_Str\" + confRoom + \"String_Node_Str\" + participant + \"String_Node_Str\" + startRecordfile + \"String_Node_Str\" + stopRecordFile);\n System.err.println(\"String_Node...
"protected void configureColumns(TableFacade tableFacade, Locale locale) {\n tableFacade.setColumnProperties(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"...
"protected boolean assignRoomType() {\n int specialRooms = 0;\n boolean pitMade = false;\n for (Room r : rooms) {\n if (r.type == Type.NULL && r.connected.size() == 1) {\n if (specials.size() > 0 && r.width() > 3 && r.height() > 3 && Random.Int(specialRooms * specialRooms + 2) == 0) {\n ...
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n WebSocketReader newObject = (WebSocketReader) super.clone(workspace);\n newObject._connection = null;\n newObject._connectionManager = WebSocketConnectionManager.getInstance();\n newObject._initializeModelTime = null;\n newOb...
"protected static String getCatalog(Connection connection) throws SQLException {\n try {\n return connection.getCatalog();\n } catch (SQLException exception) {\n throw exception;\n } catch (Throwable throwable) {\n return null;\n }\n return connection.getCatalog();\n}\n"
"public void loadDBValue() {\n ResponseSetBean rsb = getMetadata().getResponseSet();\n org.akaza.openclinica.bean.core.ResponseType rt = rsb.getResponseType();\n String dbValue = data.getValue();\n if (rt.equals(org.akaza.openclinica.bean.core.ResponseType.CHECKBOX) || rt.equals(org.akaza.openclinica.bean.c...
"public void handleEvent(Event event) throws ClientException {\n EventContext context = event.getContext();\n if (!(context instanceof DocumentEventContext)) {\n return;\n }\n DocumentEventContext documentContext = (DocumentEventContext) context;\n DocumentModel sourceDocument = documentContext.ge...
"public Member get(int index) {\n return list.get(index).get(column);\n}\n"
"public static IpInterval<?> parseReverseDomain(String reverse) {\n String result = removeTrailingDot(reverse).toLowerCase();\n if (result.endsWith(Ipv4Resource.IPV4_REVERSE_DOMAIN)) {\n return Ipv4Resource.parseReverseDomain(result);\n }\n return Ipv6Resource.parseReverseDomain(reverse);\n}\n"
"public static CourseEnvironment getPreviewCourseEnvironment(boolean isCoach, boolean isCourseAdmin, ICourse course) {\n final OLATResource courseResource = course.getCourseEnvironment().getCourseGroupManager().getCourseResource();\n final CourseGroupManager cgm = new PreviewCourseGroupManager(courseResource, new...
"public void onAfterInvocation(Method m, Object[] args, Object result) {\n if (m.getReturnType() == Integer.TYPE) {\n int returnValue = (Integer) result;\n switch(returnValue) {\n case NO_ERROR:\n return;\n case PERMISSION_DENIED:\n throw new Security...
"default <T> T get(final Class<T> entityClass, final Object id) throws DocumentDoesNotExistException {\n return async().get(entityClass, id).switchIfEmpty(notFound(entityClass, id)).toBlocking().single();\n}\n"
"private void createGroupListAndDefaultTreeFromClusterSizes(PerspectiveInitializationData data) {\n GroupType groupList = createGroupList();\n int groupCounter = 0;\n isTreeDefaultTree = true;\n tree = new ClusterTree(idType, data.getIndices().size());\n int clusterNr = 0;\n ClusterNode root = new Clu...
"public static CodeBlock.Builder getLoadFromCursorMethod(String elementName, BaseColumnAccess columnAccess, TypeName elementTypeName, String columnName, boolean isModelContainerAdapter) {\n String method = \"String_Node_Str\";\n if (SQLiteType.containsMethod(elementTypeName)) {\n method = SQLiteType.getMet...
"public float getTotal() {\n float total = 0;\n for (APPLine line : lines) total += line.getAmount();\n return DecimalRounder.roundOff(total, 2);\n}\n"
"public void testGetLocales() throws InterruptedException, ExecutionException, TimeoutException {\n try {\n handler.getLocales().get(1, MINUTES);\n } catch (RequestException ex) {\n if (isNotServerside(ex))\n throw ex;\n }\n}\n"
"public void onNameChanged(String name) {\n finalEditText.setText(name);\n notifyDataSetChanged();\n}\n"
"public void setRouting(int mode, int routes, int mask) {\n int incallMask = 0;\n int ringtoneMask = 0;\n int normalMask = 0;\n if (!checkAudioSettingsPermission(\"String_Node_Str\")) {\n return;\n }\n synchronized (mSettingsLock) {\n if (mode == AudioSystem.MODE_INVALID) {\n ...
"public void resizeMaps() {\n if (parent.blockLives.size() > 1000000) {\n parent.blockLives.clear();\n }\n}\n"
"public Observable<QBUser> call(final QBUser user) {\n UserCustomData userCustomData = Utils.customDataToObject(user.getCustomData());\n if (TextUtils.isEmpty(userCustomData.getAvatarUrl())) {\n CoreSharedHelper.getInstance().saveUsersImportInitialized(false);\n getFBUserWithAvatar(user);\n }\n ...
"public void testStudentConstructor() throws TeammatesException {\n verifyExceptionForStudentCreation(\"String_Node_Str\", null, \"String_Node_Str\", Common.ERRORCODE_NULL_PARAMETER);\n verifyExceptionForStudentCreation(\"String_Node_Str\", \"String_Node_Str\", null, Common.ERRORCODE_NULL_PARAMETER);\n verifyE...
"public void headMoved(BoardHistoryNode oldHead, BoardHistoryNode newHead) {\n int lastMoveNumberInTable = histogramEntryList.get(histogramEntryList.size() - 1).getMoveNumber();\n if (newHead.getData().getMoveNumber() > lastMoveNumberInTable) {\n BoardHistoryNode node;\n do {\n addHistogr...
"public void onNPCRightCLick(NPCRightClickEvent event) {\n if (!isEconomyNpc(event.getNPC()))\n return;\n final Player player = event.getClicker();\n if (tempOpening.contains(player.getName()))\n return;\n tempOpening.add(player.getName());\n TimerTask task = new TimerTask() {\n publ...
"public boolean isValid() {\n return distance.value() <= Math.abs(value);\n}\n"
"private void renderItems(float[][] lightMap) {\n ImmutableArray<Entity> entities = engine.getEntitiesFor(Family.all(ItemComponent.class, PositionComponent.class, VisualComponent.class).get());\n for (Entity entity : entities) {\n PositionComponent position = ComponentMappers.position.get(entity);\n ...
"CodeBlock getContentValuesStatement(boolean isModelContainerAdapter) {\n String shortAccess = tableColumnAccess.getShortAccessString(foreignKeyFieldName, isModelContainerAdapter);\n String columnShortAccess = columnAccess.getShortAccessString(foreignColumnName, isModelContainerAdapter);\n String combined = sh...
"private void dumpHistoryLocked(PrintWriter pw, int flags, long histStart, boolean checkin) {\n final HistoryPrinter hprinter = new HistoryPrinter();\n final HistoryItem rec = new HistoryItem();\n long lastTime = -1;\n long baseTime = -1;\n boolean printed = false;\n HistoryEventTracker tracker = null...
"private void a(World world, int i, int j, int k, int l, Random random) {\n int i1 = this.b[world.getTypeId(i, j, k)];\n if (random.nextInt(l) < i1) {\n boolean flag = world.getTypeId(i, j, k) == Block.TNT.id;\n Server server = ((WorldServer) world).getServer();\n CraftWorld cworld = ((WorldS...
"public int doWork(final List<String> args) {\n if (this.regionStr == null) {\n LOG.error(\"String_Node_Str\");\n return -1;\n }\n if (this.WIDTH < 100) {\n LOG.info(\"String_Node_Str\");\n this.WIDTH = 100;\n }\n SamReader samFileReader = null;\n try {\n final SamRe...
"public Expression implement(RexToLixTranslator translator, RexCall call, NullAs nullAs) {\n final RexCall call2 = call2(false, translator, call);\n final List<Expression> expressions = translator.translateList(call2.getOperandList(), nullAs);\n return Expressions.foldAnd(expressions);\n}\n"
"public boolean willProcessResponse(HttpResponse response) throws Exception {\n if (!isAcceptableResponse(response))\n return false;\n if ((response.getContent() != null) && (response.getContent().readableBytes() > 0)) {\n result = convertBufferToResult(response.getContent());\n finished = tr...
"public boolean isBluetoothScoOn() {\n IAudioService service = getService();\n try {\n return service.isBluetoothScoOn();\n } catch (RemoteException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n return false;\n }\n}\n"
"public void testLatticeDemo() {\n try {\n Transcriber.main(new String[] {});\n } catch (Throwable t) {\n Assert.fail();\n }\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main_activity);\n findView();\n init();\n conversationBtn.performClick();\n initBaiduLocClient();\n CacheService.registerUser(AVUser.getCurrentUser(LeanchatUser.class));\n}\n"
"public View getView(int position, View convertView, ViewGroup parent) {\n if (!mDataValid) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (position == 0 && (mMode & MODE_MASK_SHOW_NUMBER_OF_CONTACTS) != 0) {\n return getTotalContactCountView(parent);\n }\n if (isShowAll...
"private boolean isTresholdValidForMessageGroups(PRQAComplianceStatus currentComplianceStatus, int thresholdLevel) {\n boolean isValidTreshold = true;\n List<MessageGroup> messageGroups = currentComplianceStatus.getMessagesGroups();\n if (messageGroups == null || messageGroups.isEmpty()) {\n isValidTres...
"public void testLargePackets() throws Exception {\n makePayloads(10000);\n testPackets((10 * 60 * 1000) - (WRITER_THREAD_RUNNING_TIME_IN_SECONDS * 1000));\n}\n"
"public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {\n if (!event.isCancelled()) {\n Player player = event.getPlayer();\n Entity entity = event.getRightClicked();\n if (entity instanceof Wolf) {\n Wolf wolf = (Wolf) entity;\n if (wolf.isTamed() && wolf.get...
"public ProductDraft get() {\n final ProductVariantDraft masterVariant = ProductVariantDraftBuilder.of().attributes(Sizes.ATTRIBUTE.draftOf(Sizes.S), Colors.ATTRIBUTE.draftOf(Colors.GREEN)).sku(UUID.randomUUID().toString()).build();\n final LocalizedString slug = en(name).slugifiedUnique();\n return ProductDra...
"public void controller(Patient patient, Visit visit, PageModel model, Session session) {\n PatientService ps = Context.getPatientService();\n AppUiUtil.startApp(\"String_Node_Str\", session);\n model.addAttribute(\"String_Node_Str\", new MetadataConstants());\n model.addAttribute(\"String_Node_Str\", patie...
"protected void copyReference(EReference eReference, EObject eObject, EObject copyEObject) {\n if (!eObject.eIsSet(eReference))\n return;\n if (eReference.isMany()) {\n final List<?> referencedObjectsList = (List<?>) eObject.eGet(eReference, resolveProxies);\n if (referencedObjectsList == nul...
"public void run() {\n try {\n if (TRACE)\n System.out.println(\"String_Node_Str\" + host + \"String_Node_Str\" + port);\n this.connection = (SocketConnection) Connector.open(\"String_Node_Str\" + host + \"String_Node_Str\" + port);\n this.inStream = connection.openDataInputStream();\...