content
stringlengths
40
137k
"public void close() {\n if (!disposed) {\n disposed = true;\n LwjglSubRegion region = subregionStack.pop();\n while (!region.equals(this)) {\n logger.error(\"String_Node_Str\");\n region.close();\n region = subregionStack.pop();\n }\n if (croppingR...
"protected Object execute(Object data) {\n if (data instanceof String) {\n try {\n Map<Object, Object> topLevelMap = new HashMap<Object, Object>();\n OMElement parentElement = AXIOMUtil.stringToOM(data.toString());\n topLevelMap.put(parentElement.getQName().toString(), getMapF...
"private int getLetterNumber(ContainerArea area) {\n int count = 0;\n Iterator iter = area.getChildren();\n while (iter.hasNext()) {\n AbstractArea child = (AbstractArea) iter.next();\n if (child instanceof TextArea) {\n String text = ((TextArea) child).getText();\n count = ...
"protected void onDestroy() {\n if (isFinishing())\n destroyPresenter();\n super.onDestroy();\n}\n"
"protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {\n rawBuffer.writeBytes(msg, 0, msg.readableBytes());\n Frame frame = null;\n do {\n frame = decode();\n if (frame != null) {\n resultCallback.onNext(frame);\n }\n } while (frame != null);\...
"protected org.eclipse.persistence.internal.helper.DatabaseType buildDatabaseTypeFromMetadataType(DatabaseType dType, String catalog) {\n if (dType instanceof ArgumentType) {\n dType = ((ArgumentType) dType).getDataType();\n }\n if (dType.isComposite()) {\n String typeName = dType.getTypeName();\...
"private void fling(int velocityY) {\n if (getChildCount() > 0) {\n int scrollRange = getScrollRange();\n float topAmount = getCurrentOverScrollAmount(true);\n float bottomAmount = getCurrentOverScrollAmount(false);\n if (velocityY < 0 && topAmount > 0) {\n mOwnScrollY -= (int)...
"public void renameTo(AbstractFile destFile) throws IOException, UnsupportedFileOperationException {\n checkRenamePrerequisites(destFile, true, false);\n destFile = destFile.getTopAncestor();\n File destJavaIoFile = ((LocalFile) destFile).file;\n if (IS_WINDOWS) {\n if (!getRoot().equals(destFile.get...
"public long getFilePointer() {\n try {\n return delegate.getFilePointer();\n } catch (IOException e) {\n logger.log(Level.FINE, e.getMessage(), e);\n return -1;\n }\n}\n"
"private static void formatVariableComponents(Set<VariableComponent> variableComponents, List<NamedProperty<QName>> properties) {\n for (VariableComponent variableComponent : variableComponents) {\n List<NamedProperty<QName>> list = new ArrayList<>();\n formatCommonIdentifiedData(list, variableComponen...
"private void tryToEnsureIAmNotABrokenMachine(Pair<Master, Machine> master) {\n if (master.other().getMachineId() == machineId) {\n return;\n } else if (master.first() == null) {\n RuntimeException cause = new RuntimeException(\"String_Node_Str\");\n shutdown(cause, false);\n throw cau...
"private void doRatioCalculation(String dirPath, String[] parameters) throws ProcessException {\n String ratioCalc = \"String_Node_Str\" + dirPath + \"String_Node_Str\" + parameters[6];\n try {\n logString = logString + executeScript(parse(ratioCalc));\n ErrorLogger.log(\"String_Node_Str\", \"String...
"public static final List<CommonTree> getBlockChildren(CommonTree ct) {\n return ScribParserUtil.toCommonTreeList(ct.getChildren());\n}\n"
"public void testFetchItemsForApplication() {\n DummyRestClient mockClient = new DummyRestClient(RestResult.success());\n ItemProvider provider = new ItemProvider(mockClient);\n ResultListener<Item.FilterResult> mockListener = Mockito.mock(ResultListener.class);\n provider.getAll(4L, mockListener, null, nul...
"protected void createContents() {\n shlYetAnotherLogcat = new Shell();\n shlYetAnotherLogcat.addShellListener(new ShellAdapter() {\n public void shellClosed(ShellEvent e) {\n if (logcat.isActive()) {\n logcat.stop();\n try {\n logcat.dispose();\n...
"private void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) {\n int wSize = MeasureSpec.getSize(widthMeasureSpec) - (getPaddingLeft() + getPaddingRight());\n if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED)\n wSize = Integer.MAX_VALUE;\n int count = getChildCount();...
"public void testTrailing5() throws IOException {\n int[] values = new int[] { 2011, 3, 9, 4, 39, 5, 22, 265 };\n String[] types = new String[] { TimeMember.TIME_LEVEL_TYPE_YEAR, TimeMember.TIME_LEVEL_TYPE_QUARTER, TimeMember.TIME_LEVEL_TYPE_MONTH, TimeMember.TIME_LEVEL_TYPE_WEEK_OF_MONTH, TimeMember.TIME_LEVEL_T...
"private void flushToTmpIndex() throws IOException {\n if (_documents.isEmpty()) {\n return;\n }\n _usingLocalTmpindex = true;\n if (_localTmpWriter == null) {\n String localDirPath = System.getProperty(JAVA_IO_TMPDIR);\n _localTmpPath = new File(localDirPath, UUID.randomUUID().toString...
"private void updateSchema() {\n Object updateObject = result.getUpdateObject();\n if (updateObject == null) {\n return;\n }\n if (updateObject instanceof Node) {\n Node node = (Node) updateObject;\n boolean builtIn = true;\n final IExternalNode externalNode = node.getExternalNod...
"private long convertToLong(String part) throws ParseException {\n Matcher m = pattern.matcher(String.valueOf(part));\n if (!m.matches())\n throw new IllegalArgumentException(String.format(Messages.CellEditor_NotANumber, part));\n String strBefore = m.group(1);\n Number before = strBefore.trim().leng...
"public ResourcesManager doUnify() throws TarException, ZipException, FileNotFoundException, IOException {\n final File originalFile = getOriginalFileResouce();\n Assert.isNotNull(originalFile);\n final String absolutePath = originalFile.getAbsolutePath();\n if (!originalFile.exists()) {\n throw new ...
"public Notification retrieveNotification(String notificationId) throws RequestNotValidException, GenericException, NotFoundException, AuthorizationDeniedException {\n StoragePath notificationPath = ModelUtils.getNotificationStoragePath(notificationId);\n Binary binary = storage.getBinary(notificationPath);\n ...
"protected CrawlDataItem parseLine(String line) {\n CrawlDataItem item;\n log.trace(\"String_Node_Str\" + line);\n try {\n item = super.parseLine(line);\n } catch (RuntimeException e) {\n log.debug(\"String_Node_Str\" + line + \"String_Node_Str\", e);\n return null;\n }\n if (item...
"void parseResponse(JSONObject response) throws JSONException {\n FollowersModel model = new FollowersModel(123456, response);\n assertEquals(model.getTotalEmail(), 2931);\n assertEquals(model.getTotalWPCom(), 7926165);\n assertEquals(model.getTotal(), 2931);\n assertEquals(model.getPage(), 1);\n asse...
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n try {\n String requestUri = request.getRequestURL().toString();\n requestUri = requestUri.replace(request.getPathInfo(), \"String_Node_Str\");\n UnsubscribeData data = UnsubscribeParser.createF...
"private List<String> installLinux(String expandedInstallDir) {\n LOG.info(\"String_Node_Str\", getEntity().getConfig(RiakNode.SUGGESTED_VERSION));\n isPackageInstall = true;\n String installBin = Urls.mergePaths(expandedInstallDir, \"String_Node_Str\");\n String apt = chainGroup(\"String_Node_Str\", \"Stri...
"public DeregisterImageResponseType deregister(DeregisterImageType request) throws EucalyptusCloudException {\n DeregisterImageResponseType reply = request.getReply();\n Context ctx = Contexts.lookup();\n try {\n ImageInfo imgInfo = EntityWrapper.get(ImageInfo.class).lookupAndClose(Images.exampleWithIma...
"private DeveloperProducts getDevProductMap(Consumer consumer, String sku) {\n List<String> devProductIds = new ArrayList<String>();\n devProductIds.add(sku);\n for (ConsumerInstalledProduct ip : consumer.getInstalledProducts()) {\n devProductIds.add(ip.getProductId());\n }\n Owner owner = consume...
"public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id) {\n case R.id.action_reset:\n if (!mwBoard.inMetaBootMode()) {\n mwBoard.getModule(Debug.class).resetAsync().continueWith(ignored -> {\n attemptReconnect(0);\n ...
"public void testOneMemberWriteBehindWithEvictions() throws Exception {\n final String mapName = \"String_Node_Str\";\n final TestEventBasedMapStore testMapStore = new TestEventBasedMapStore();\n testMapStore.loadAllLatch = new CountDownLatch(1);\n final Config config = newConfig(testMapStore, 2);\n fina...
"public void setCoupon(Coupon coupon) {\n if (coupon != null) {\n this.couponKeyString = coupon.getIdString();\n }\n}\n"
"final boolean checkFit(IDisplayServer xs, Label la, int iLabelLocation) throws GenerationException {\n if (iType == TEXT || bCategoryScale) {\n return true;\n }\n final double dAngleInDegrees = la.getCaption().getFont().getRotation();\n double x = 0, y = 0;\n int iPointToCheck = 0;\n if (iLabe...
"public void testUnmarshalLevelElement() throws Exception {\n if (null == xmlInputFactory) {\n return;\n }\n InputStream instream = ClassLoader.getSystemResourceAsStream(\"String_Node_Str\");\n XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(instream);\n xmlStreamReader.nex...
"protected final DeploymentContext configureDeployment() {\n configureProperties();\n String joinedPackages = Joiner.on(',').join(getResourcePackages()) + \"String_Node_Str\";\n return ServletDeploymentContext.builder(OryxApplication.class).initParam(\"String_Node_Str\", OryxApplication.class.getName()).contex...
"public void testFireAsynch() throws Exception {\n final IRemoteService service = registerAndGetRemoteService();\n System.out.println(\"String_Node_Str\");\n service.fireAsynch(createRemoteConcat(\"String_Node_Str\", \"String_Node_Str\"));\n System.out.println(\"String_Node_Str\");\n sleep(1500);\n}\n"
"public void testTranslateUrl() throws Exception {\n URLTranslator urlTranslator = new URLTranslator();\n urlTranslator.translate(ORIGINAL_URL);\n assertEquals(TRANSLATED_URL, urlTranslator.getTranslation(ORIGINAL_URL));\n}\n"
"private void flushTransactionalChanges() {\n if (VERBOSE_LOGGING) {\n Log.v(TAG, \"String_Node_Str\" + (inProfileMode() ? \"String_Node_Str\" : \"String_Node_Str\"));\n }\n final SQLiteDatabase db = mDbHelper.get().getWritableDatabase();\n for (long rawContactId : mTransactionContext.get().getInsert...
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_section);\n HSKBItem kbSectionItem = (HSKBItem) getIntent().getSerializableExtra(\"String_Node_Str\");\n if (savedInstanceState == null) {\n HSKBItem kbSectionItem = (HSKBIte...
"public static GxtEventsExecutor createExecutor(Component aComponent, JavaScriptObject aEventsThis) throws Exception {\n final GxtEventsExecutor executor = new GxtEventsExecutor(aComponent, aEventsThis);\n aComponent.setData(HANDLER_DATA_NAME, executor);\n if (aComponent instanceof HasSelectHandlers)\n ...
"private void compressGraphLabels(DirectedGraph<Vertex<Map<Integer, StringBuilder>>, Edge<Map<Integer, StringBuilder>>> graph) {\n String label;\n for (Edge<Map<Integer, StringBuilder>> edge : graph.getEdges()) {\n for (int i : edge.getLabel().keySet()) {\n label = labelMap.get(edge.getLabel().g...
"public SingleSelectionField<V> bind(ListProperty<V> itemsBinding, ObjectProperty<V> selectionBinding) {\n items.bindBidirectional(itemsBinding);\n selection.bindBidirectional(selectionBinding);\n return this;\n}\n"
"private boolean isAgentRunning(AgentInfo agentInfo) {\n if (agentInfo.getStatus() != null) {\n return agentInfo.getStatus().getState() == AgentLifeCycleState.RUNNING;\n } else {\n return false;\n }\n}\n"
"private String describeTypes(List<TypeRefComponent> types) throws Exception {\n if (types.isEmpty())\n return \"String_Node_Str\";\n StringBuilder b = new StringBuilder();\n if (types.size() == 1)\n describeType(b, types.get(0));\n else {\n boolean first = true;\n b.append(\"Str...
"public void setup() throws IOException {\n map2 = newUdpSocketShmIntString(1, 1234);\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n}\n"
"public Set<Utilization> registerUtilization(long facilityId, List<Utilization> utilization, User currentUser) {\n authorize(currentUser, repository.getFacilityInfo(facilityId), FACILITY_UTILIZATION_UPDATE);\n initUtilizationDefaults(facilityId, utilization);\n validateUtilizations(facilityId, utilization);\n ...
"public float getLongitude() {\n Object lng = entity.getProperty(LONGITUDE_KEY);\n if (lng instanceof Double) {\n lng = ((Double) lng).floatValue();\n }\n return (Float) lng;\n}\n"
"private double parseFinalEnergy(String lammpsOutput) {\n Double finalEnergy = Double.POSITIVE_INFINITY;\n int verbosity = GAParameters.getParams().getVerbosity();\n String[] lines = lammpsOutput.split(\"String_Node_Str\");\n int i;\n for (i = 0; i < lines.length; i++) {\n if (lines[i].matches(\"S...
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n XMLField field = null;\n Object value = this.getCharacters();\n Class attributeClassification = null;\n boolean isSwaRef = false;\n if (isCollection) {\n isSwaRef = ((XMLBinaryDataCollectionMapping...
"protected void createPopupWindow() {\n mPopupWindow = new CustomPopupWindow();\n mPopupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);\n mPopupWindow.setFocusable(true);\n mPopupWindow.setClippingEnabled(false);\n}\n"
"protected void checkInvoiceDate() throws AxelorException {\n if (Invoice.filter(\"String_Node_Str\", invoice.getInvoiceDate(), invoice.getOperationTypeSelect()).count() > 0) {\n throw new AxelorException(String.format(\"String_Node_Str\"), IException.CONFIGURATION_ERROR);\n }\n}\n"
"public void postBuild(Progress p, boolean buildPyramid) throws IOException, JobFailedException, JobCancelledException {\n if (buildPyramid) {\n MrsImagePyramid pyramid = MrsImagePyramid.open(_outputName, getProviderProperties());\n MrsImagePyramidMetadata metadata = pyramid.getMetadata();\n Agg...
"public void run() {\n keepRunning = true;\n _smsLogger.logStart(operator, cid + \"String_Node_Str\", lac + \"String_Node_Str\", new Date());\n do {\n Iterator<String> itMsgs = listMsgs.iterator();\n int count = 0;\n while (keepRunning && itMsgs.hasNext()) {\n String nextMsg = i...
"public boolean handleOpenStackLiberty12WithUbuntu1404(TemplatePlanContext context, AbstractNodeTemplate nodeTemplate) {\n AbstractNodeTemplate ubuntuNodeTemplate = this.findUbuntuNode(nodeTemplate);\n Variable ubuntuAMIIdVar = null;\n if (ubuntuNodeTemplate == null) {\n LOG.error(\"String_Node_Str\");\...
"private void writeHierarchies(final ModelConfiguration config, final String prefix, final ZipOutputStream zip) throws IOException {\n if (config.getInput() != null) {\n if (config.getInput().getDefinition() != null) {\n for (final String a : config.getInput().getDefinition().getQuasiIdentifyingAtt...
"public int hashCode() {\n return (consumerId == null) ? super.hashCode() : consumerId.hashCode();\n}\n"
"public void renderItem(ItemRenderType type, ItemStack item, Object... data) {\n String texture = ConstantValue.SYNTHESIS_MODEL;\n GL11.glPushMatrix();\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(texture));\n switch(type) {\n case EQUIPPED:...
"public void actionPerformed(ActionEvent e) {\n JMenuItem smileyItem = (JMenuItem) e.getSource();\n String buttonText = smileyItem.getToolTipText();\n for (Smiley smiley : imageList) {\n String smileyString = smiley.getSmileyStrings()[0];\n if (buttonText.equals(smileyString)) {\n chat...
"public HE_Mesh apply(final HE_Selection selection) {\n if (selection.parent.getNumberOfVertices() <= goal) {\n return selection.parent;\n }\n _mesh = selection.parent;\n _mesh.triangulate();\n _mesh.resetVertexInternalLabels();\n if (_mesh.getNumberOfVertices() <= 4) {\n return _mesh;\n...
"public void resetTable() {\n mTable = null;\n mSize = 0;\n mSequence = mParent.mSequence;\n}\n"
"public EventArgScoringAlignment<TypeRoleFillerRealis> score(ScoringData scoringData) {\n final ScoringData preprocessorResult = preprocessor.transform(scoringData);\n final Function<Response, TypeRoleFillerRealis> equivalenceClassFunction = TypeRoleFillerRealis.extractFromSystemResponse(preprocessorResult.answer...
"public boolean equals(final Object other) {\n if (other == this) {\n return true;\n }\n FontKey ors;\n try {\n ors = (FontKey) other;\n } catch (ClassCastException cce) {\n return false;\n }\n return (this.fontSize == ors.fontSize) && (this.fontFamily != null && this.fontFamil...
"public CameraFile waitForImage() {\n checkNotClosed();\n PointerByReference event = new PointerByReference();\n try {\n final PointerByReference event_data = new PointerByReference();\n CameraUtils.check(GPhoto2Native.INSTANCE.gp_camera_wait_for_event(camera, 0, event, event_data, CameraList.CON...
"public Configuration getParentConfiguration() {\n return parentConfigurationSet ? (Configuration) getParent() : null;\n}\n"
"public String generateInitializeCode() throws IllegalActionException {\n StringBuffer code = new StringBuffer();\n code.append(super.generateInitializeCode());\n ptolemy.actor.CompositeActor container = (ptolemy.actor.CompositeActor) getComponent().getContainer();\n NamedProgramCodeGeneratorAdapter contain...
"public void _refresh_All() throws java.rmi.RemoteException {\n if (robContainer != null) {\n robContainer.refreshAll();\n }\n}\n"
"public boolean isShutDown() {\n return this.isShutDown;\n}\n"
"public void displayWater() {\n String recipeUnitsAbrv = Quantity.getVolAbrv(myRecipe.getVolUnits());\n String mashUnitsAbrv = Quantity.getVolAbrv(myRecipe.mash.getMashVolUnits());\n totalWaterLbl.setText(myRecipe.getTotalWater());\n totalUnitsLbl.setText(recipeUnitsAbrv);\n usedMashLbl.setText(myRecipe....
"public void updateROMDesignerState(DesignerState designerState, OdaDataSourceHandle sourceHandle) throws SemanticException {\n if (designerState == null || sourceHandle == null)\n return;\n DesignerStateAdapter.updateROMDesignerState(designerState, sourceHandle);\n}\n"
"public void moveTaskToBack(int taskId) {\n enforceCallingPermission(android.Manifest.permission.REORDER_TASKS, \"String_Node_Str\");\n synchronized (this) {\n TaskRecord tr = recentTaskForIdLocked(taskId);\n if (tr != null) {\n if (tr == mStackSupervisor.mLockTaskModeTask) {\n ...
"private void assignMapReduceWorkingPath(TableDescriptor tableDescriptor) throws IOException {\n Map<String, String> tableProperties = tableDescriptor.getTableProperties();\n String mrIncWorkingPathStr = getProperty(tableProperties, BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH);\n if (mrIncWorkingPathStr == nul...
"public void onPermissionsGranted() {\n if (sketch != null) {\n sketch.onPermissionsGranted();\n}\n"
"private List<String> copyResources(String destination) throws IOException {\n final List<String> allCopiedPaths = newArrayList();\n for (final Resource resource : resources) {\n final File source = new File(resource.getDirectory());\n final List<String> includes = resource.getIncludes();\n f...
"public void startFlushTimer() {\n if (mFlushInterval <= 0 || mTimer != null) {\n return;\n }\n mTimer = new Timer();\n TimerTask task = new TimerTask() {\n Liquid instance = Liquid.getInstance();\n public void run() {\n instance.flush();\n }\n };\n mTimer.schedu...
"private int parseThreadNum() {\n int threads = 6;\n try {\n threads = Integer.parseInt(Environment.getProperty(Constants.SHIFU_CORRELATION_MULTI_THREADS, threads + \"String_Node_Str\"));\n } catch (Exception e) {\n log.warn(\"String_Node_Str\", threads);\n }\n if (threads <= 0) {\n ...
"public HeaderParamDeclList<RoleKind> reconstruct(List<? extends HeaderParamDecl<RoleKind>> decls) {\n ScribDel del = del();\n RoleDeclList rdl = AstFactoryImpl.FACTORY.RoleDeclList(castRoleDecls(decls));\n rdl = (RoleDeclList) rdl.del(del);\n return rdl;\n}\n"
"public Str append(String s) {\n if (\"String_Node_Str\".equals(s)) {\n return this;\n }\n if (EMPTY_STR.equals(this)) {\n return of(s);\n }\n return of(this.s.concat(s));\n}\n"
"public Data read() {\n synchronized (queue) {\n if (queue.size() == 0) {\n return null;\n } else {\n Object data = queue.remove(0);\n if (data == null) {\n return null;\n } else {\n return (Data) data;\n }\n }\...
"void addParameterArgs(List list) {\n Iterator iterator = paramValues.keySet().iterator();\n while (iterator.hasNext()) {\n String key = (String) iterator.next();\n Object obj = paramValues.get(key);\n if (obj instanceof Object[]) {\n Object[] temp = (Object[]) obj;\n fo...
"public WorkflowBuilder multiInput(String moduleName, String description, String name, List<Object> value, DataType type) {\n check();\n if (!workflow.modules.containsKey(moduleName))\n throw new IllegalArgumentException(\"String_Node_Str\" + moduleName + \"String_Node_Str\");\n ModuleImpl module = work...
"public void act(float delta) {\n super.act(delta);\n Text currentSubtitle = World.getInstance().getTextManager().getCurrentText();\n if (subtitle != currentSubtitle) {\n subtitle = currentSubtitle;\n if (currentSubtitle == null && isVisible()) {\n setVisible(false);\n } else if...
"private JPQLGrammar jpqlGrammar() {\n if (JPAQueryBuilderManager.systemQueryBuilderValidationLevel == ParserValidationType.EclipseLink) {\n return DefaultEclipseLinkJPQLGrammar.instance();\n }\n if (JPAQueryBuilderManager.systemQueryBuilderValidationLevel == ParserValidationType.JPA10) {\n retur...
"public void shouldEnrichTestMethod() throws NoSuchMethodException {\n HostIpTestEnricher hostIpTestEnricher = new HostIpTestEnricher();\n hostIpTestEnricher.hostUriContext = new Instance<HostIpContext>() {\n\n public HostUriContext get() {\n return new HostUriContext(\"String_Node_Str\");\n ...
"public Connection getConnection() throws SQLException {\n lock.lock();\n try {\n if (conn == null)\n conn = DriverManager.getConnection(dbUrl);\n while (connInUse) wait();\n connInUse = true;\n return conn;\n } catch (InterruptedException e) {\n throw new SeekInne...
"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) {\...
"long getOSGiTimeout() {\n long timeout = DEFAULT_TIMEOUT;\n Object timeoutval = reference.getProperty(OSGI_BASIC_TIMEOUT);\n if (timeoutval != null) {\n if (timeoutval instanceof Long) {\n timeout = ((Long) timeoutval).longValue();\n } else if (timeoutval instanceof Integer) {\n ...
"public void onReceiveComplete(SocketChannel channel, TCPMessage readRequest) {\n ByteBuffer data = readRequest.getByteBuffer();\n byte[] id = new byte[RequestID.ID_SIZE];\n data.get(id);\n String messageType = ByteUtils.unPackString(data);\n int clientId = data.getInt();\n RequestID requestID = Reque...
"public void openDoor(OpenDoorEvent event, EntityRef entity, DoorComponent door) {\n Side newSide = door.openSide;\n BlockRegionComponent regionComp = entity.getComponent(BlockRegionComponent.class);\n Block bottomBlock = door.bottomBlockFamily.getBlockForPlacement(worldProvider, blockEntityRegistry, regionCom...
"protected void startUp() throws Exception {\n runThread = Thread.currentThread();\n processExecutor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory(getServiceName() + \"String_Node_Str\"));\n}\n"
"private String getInstantiatedClassName(AstNode newExpr) {\n AstNode variable = newExpr.getFirstChild(PHPGrammar.VARIABLE);\n AstNode classNameNode = variable.getFirstChild();\n if (classNameNode.is(PHPKeyword.NAMESPACE)) {\n return getClassName(variable);\n } else if (classNameNode.is(PHPGrammar.CL...
"protected void visitRawTextNode(RawTextNode node) {\n currentRawTextNode = node;\n currentRawText = node.getRawText();\n currentRawTextOffset = 0;\n currentRawTextIndex = 0;\n while (currentRawTextIndex < currentRawText.length()) {\n int startIndex = currentRawTextIndex;\n if (currentRawTe...
"public void sendToken(Receiver receiver, Token token) throws IllegalActionException {\n Time currentTime = getDirector().getModelTime();\n if (_nextTimeFree == null || _tokens.size() == 0 || currentTime.compareTo(_nextTimeFree) != 0 || receiver != _nextReceiver) {\n receiver.put(null);\n }\n Token t...
"public static ArrayList<OrderDetail> getOrderDetail() {\n String reqUrl = getRequestUrl(null, ORDER_DETAIL_PAGE);\n String respStr = RequestHelper.doRequestPost(reqUrl, null);\n try {\n return ResponseParser.parseOrderDetail(respStr);\n } catch (JSONException e) {\n LogUtils.logE(e.getMessage...
"public void modelGroupAdded(NSNotification n) {\n EOModelGroup group = (EOModelGroup) n.object();\n if (group.modelNamed(\"String_Node_Str\") != null && group.modelNamed(\"String_Node_Str\") != null) {\n createRelationship(\"String_Node_Str\", ERCMailAddress.ENTITY_NAME, \"String_Node_Str\", SESComplaintN...
"public void computeSingleNBRBruteForce() {\n Set<QueryTree<String>> posExampleTrees = DBpediaExample.getPosExampleTrees();\n Set<QueryTree<String>> negExampleTrees = DBpediaExample.getNegExampleTrees();\n LGGGenerator<String> lggGenerator = new LGGGeneratorImpl<String>();\n NBRGenerator<String> nbrGenerato...
"public boolean usesVirtualAccess() {\n if (hasAccess()) {\n return getAccess().equals(MetadataConstants.VIRTUAL);\n } else {\n return m_classAccessor.usesVirtualAccess();\n }\n}\n"
"public void terminateInstance(MemberContext memberContext) throws InvalidCartridgeTypeException, InvalidMemberException, MemberTerminationFailedException {\n terminateContainer(memberContext);\n}\n"
"public Object get(String name, Scriptable start) {\n try {\n return this.cursor.getObject((String) measureMapping.get(name));\n } catch (OLAPException e) {\n throw new RuntimeException(new DataException(e.getLocalizedMessage()));\n }\n}\n"
"protected int wallsLeftWeight() {\n return 3;\n}\n"
"public void register(int recordId, TreeElement item) {\n long freeMemory = Runtime.getRuntime().freeMemory();\n double memory = freeMemory * 1.0 / totalMem;\n if (memory < .2) {\n Runtime.getRuntime().gc();\n freeMemory = Runtime.getRuntime().freeMemory();\n memory = freeMemory * 1.0 / to...
"public Location testPostWithReturn(final Location location, final String testdata) throws Exception {\n DefaultRiakObject ro = new DefaultRiakObject(location);\n ro.setContent(testdata.getBytes());\n PostOptions options = new DefaultPostOptions() {\n\n public boolean getReturnBody() {\n retu...