content
stringlengths
40
137k
"private void startNewDialogPage() {\n boolean isFriends = !DatabaseManager.getInstance().getFriendManager().getAll().isEmpty();\n if (isFriends) {\n NewDialogActivity.start(baseActivity);\n } else {\n DialogUtils.showLong(baseActivity, getResources().getString(R.string.ndl_no_friends_for_new_cha...
"private boolean isValidDirectory(File file) {\n if (!file.getName().startsWith(\"String_Node_Str\")) {\n IPath filePath = new Path(file.getAbsolutePath());\n for (EResourceConstant constant : EResourceConstant.getTopConstants()) {\n if (absolutePath.indexOf(constant.getPath()) > 0) {\n ...
"public final void updateFigure(ExtendedItemHandle eih, IFigure ifg) {\n try {\n eih.loadExtendedElement();\n final ChartReportItemImpl crii = (ChartReportItemImpl) eih.getReportItem();\n crii.setHandle(eih);\n final Chart cm = (Chart) crii.getProperty(ChartReportItemUtil.PROPERTY_CHART);...
"public Query getQueryImplementation(String jpaQuery, PersistenceDelegator persistenceDelegator, Class mappedClass, boolean isNative) {\n if (jpaQuery == null) {\n throw new QueryHandlerException(\"String_Node_Str\");\n }\n KunderaQuery kunderaQuery = null;\n ApplicationMetadata appMetadata = Kundera...
"public byte getUnknown() {\n return getByte(18 + getString16Length(5) + getString16Length(13 + getString16Length(5)));\n}\n"
"public void updateEntity() {\n if (selfDestruct) {\n fuse--;\n if (fuse % 20 == 0)\n destroyer.addChatComponentMessage(new ChatComponentText(\"String_Node_Str\" + fuse / 20));\n }\n if (fuse <= 0 && selfDestruct)\n byeBye();\n if (timer == 0) {\n sync();\n time...
"public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, AbstractSession executionSession) {\n Object value = row.get(this.field);\n if (value == null) {\n return value;\n }\n Object fieldValue = null;\n XMLUnmarshaller unmarshaller = ((XMLReco...
"private boolean containsWrongSymbols(String str) {\n int maxSymbol = ALPHABET_CODE_START + alphabetSize;\n for (int i = 0; i < str.length(); i++) {\n if (((int) str.charAt(i)) >= maxSymbol) {\n return true;\n }\n }\n return false;\n}\n"
"public Response updateApplicationPolicy(ApplicationPolicyBean applicationPolicy) throws RestAPIException {\n try {\n StratosApiV41Utils.updateApplicationPolicy(applicationPolicy);\n } catch (AutoscalerServiceInvalidApplicationPolicyExceptionException e) {\n String backendErrorMessage = e.getFaultMe...
"public void run() {\n Map<Long, Heritrix3JobMonitor> tmpJobMonitorMap;\n Iterator<Heritrix3JobMonitor> jobmonitorIter;\n byte[] tmpBuf = new byte[1024 * 1024];\n try {\n LOG.info(\"String_Node_Str\");\n File tmpFolder = environment.tempPath;\n ;\n File[] oldFiles = tmpFolder.lis...
"public Response registerServices(JSONArray serviceInfos) throws WebApplicationException, InterruptedException, JSONException {\n Long max = Long.valueOf(DSRServer.getProperty(ServerConstants.REGISTRY_MAX_REGISTRATIONS, \"String_Node_Str\"));\n if (serviceInfos.length() > max) {\n return Response.status(St...
"public ResponseEntity<?> register(RegisterRequest registerRequest, HttpServletRequest httpServletRequest) throws BaseException {\n String ipAddress = httpServletRequest.getHeader(\"String_Node_Str\");\n if (ipAddress == null)\n ipAddress = httpServletRequest.getRemoteAddr();\n LOG.info(\"String_Node_St...
"void addConnectType(String guarantee) {\n int b = connectTypeNone;\n if (guarantee != null) {\n Integer bit = connectHash.get(guarantee);\n if (bit == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n b = bit.intValue();\n }\n connectSet |= b;\n}\n"
"private static FieldMetadata getFieldMetadata(MetadataRepository repository, ComplexTypeMetadata type, Element appInfo, String path) {\n String typeName = getTypeName(type, path);\n String fieldPath = StringUtils.substringAfter(path, \"String_Node_Str\").trim();\n FieldMetadata fieldMetadata;\n if (!fieldP...
"public Object[][] data_unmarshalDeferrals() {\n return new Object[][] { { true, \"String_Node_Str\", 0, \"String_Node_Str\" }, { false, \"String_Node_Str\", 0, \"String_Node_Str\" }, { false, \"String_Node_Str\", 0, \"String_Node_Str\" }, { true, \"String_Node_Str\", 0, \"String_Node_Str\" }, { false, \"String_Node...
"public static void main(String[] args) {\n Gpio led = new Gpio(4);\n Aio lightSensor = new Aio(0);\n led.dir(Dir.DIR_OUT);\n int on = 0;\n long lightValue = 0;\n String command = \"String_Node_Str\";\n Socket clientSocket;\n BufferedReader in;\n try {\n clientSocket = new Socket(args[...
"public int locateInBlock(int block, CharSequence str) {\n if (block >= blocks.getNumberOfElements()) {\n return 0;\n }\n ReplazableString tempString = new ReplazableString();\n int idInBlock = 0;\n int cshared = 0;\n ByteBuffer buffer = buffers[block / BLOCKS_PER_BYTEBUFFER].duplicate();\n ...
"private synchronized boolean processNextLoader() {\n LoadListener loader = mLoaderQueue.peek();\n if (loader != null) {\n if (loader.cancelled()) {\n return true;\n }\n SslError error = loader.sslError();\n if (DebugFlags.SSL_ERROR_HANDLER) {\n Assert.assertNotNu...
"public final void go(Backstack entries, Flow.Direction direction, Flow.Callback callback) {\n Screen nextScreen = (Screen) entries.current().getScreen();\n if (direction == Flow.Direction.FORWARD) {\n if (entries.reverseIterator().hasNext()) {\n previousScreen = (Screen) entries.reverseIterator...
"private List<DirectedMultigraphWithRoot<Vertex<StringBuffer>, Edge<StringBuffer>>> copyGraphs(List<DirectedMultigraphWithRoot<Vertex<String>, Edge<String>>> oldGraphs) {\n List<DirectedMultigraphWithRoot<Vertex<StringBuffer>, Edge<StringBuffer>>> graphs = new ArrayList<DirectedMultigraphWithRoot<Vertex<StringBuffer...
"double normalize(double x, int p){\n\tif (p == 1){\n\t\tdouble v = Math.max(x, min);\n\t\tx = (v - min) / (max - min);\n\t\treturn x;\n\t} else if (p == 2) {\n\t\tdouble v = Math.max(x, min);\n\t\tx = Math.pow((v - min), 2) / Math.pow((max - min), 2);\n\t\treturn x;\n\t}\n}\n"
"protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n pullChildren();\n int maxHeight = 0;\n int maxWidth = 0;\n int childState = 0;\n int topInset = 0;\n int bottomInset = 0;\n measureChildWithMargins(mActionBarTop, widthMeasureSpec, 0, heightMeasureSpec, 0);\n LayoutParams...
"protected IStatus run(IProgressMonitor monitor) {\n if (isTableDisposed()) {\n return Status.OK_STATUS;\n }\n try {\n final List<Artifact> artifacts = provider.getMembers();\n worldComposite.load(provider.getItemName(), artifacts, (CustomizeData) null, TableLoadOption.None);\n } catch ...
"public void run() {\n setFocus();\n}\n"
"public String uploadMediaFile(MediaFile mf, Blog blog) {\n String content = \"String_Node_Str\";\n String curImagePath = mf.getFilePath();\n if (curImagePath == null)\n return null;\n if (curImagePath.contains(\"String_Node_Str\")) {\n XMLRPCClient client = new XMLRPCClient(blog.getUrl(), blo...
"private String getDebugPrefixMapFlag(Path realPath, String fakePath) {\n String realPathStr = realPath.toString();\n if (fakePath.isEmpty()) {\n realPathStr += \"String_Node_Str\";\n }\n return String.format(\"String_Node_Str\", realPathStr, fakePath);\n}\n"
"private boolean deleteExpired() throws CoreTokenException {\n Calendar nowTimestamp = Calendar.getInstance();\n Filter filter = adapter.buildFilter().and().beforeDate(nowTimestamp).build();\n Collection<Entry> entries = adapter.query().withFilter(filter).limitResultsTo(coreTokenConfig.getExpiredSessionsSearch...
"public void tickBloodlust(long ticks) {\n if (!this.isVampire())\n return;\n if (!this.isBloodlusting())\n return;\n Player me = this.getPlayer();\n if (me == null)\n return;\n Conf conf = Conf.get(me);\n if (me.getGameMode() == GameMode.CREATIVE)\n return;\n if (me.isD...
"private List<E> populateEntities(EntityMetadata m, Client client) throws Exception {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\", ((QueryImpl) query).getJPAQuery());\n }\n List<E> result = new ArrayList<E>();\n ApplicationMetadata appMetadata = KunderaMetadata.INSTANCE.getApplicati...
"public static void encodeHTML4DHTMLAttrs(ResponseWriter rw, Map<String, Object> attrs, String[] alist) throws IOException {\n for (String a : alist) {\n if (attrs.containsKey(a)) {\n if (attrs.get(a) != null) {\n String val = A.asString(attrs.get(a));\n if (val != nul...
"public long nextPos() {\n long pos = searchPos;\n while (true) {\n long entry = bytes.readLong(pos);\n if (entry == UNSET_ENTRY) {\n searchState.searchPos = pos;\n return -1L;\n }\n pos = step(pos);\n if (key(entry) == searchHash) {\n searchPos ...
"public void notifyWaitingThreads() {\n try {\n Set set = (Set) _waitingPlatforms.clone();\n Iterator it = set.iterator();\n while (it.hasNext()) {\n Thread thread = (Thread) it.next();\n if (_debugging)\n _debug(\"String_Node_Str\" + thread.getName() + \"Str...
"public void attach(View view, LoginModel model, final Screen host) {\n final EditText user = (EditText) view.findViewById(R.id.login_username);\n final EditText pass = (EditText) view.findViewById(R.id.login_password);\n final Button login = (Button) view.findViewById(R.id.login_submit);\n final CheckBox c...
"public boolean isInRangeToRenderDist(double var1) {\n return var1 < 256D * 256D;\n}\n"
"protected void drawShape(Canvas canvas, Bitmap image) {\n gPaint.setAntiAlias(true);\n gPaint.setFilterBitmap(true);\n gPaint.setDither(true);\n gPaint.setARGB(255, 255, 255, 255);\n if (mFirstDraw) {\n cropSetup();\n mFirstDraw = false;\n }\n float rotation = getLocalRotation();\n ...
"public boolean isTextResponse() {\n return contentType != null && contentType.startsWith(\"String_Node_Str\");\n}\n"
"public static void main(String[] args) {\n Stopwatch stopwatch = SimonManager.getStopwatch(\"String_Node_Str\");\n for (int i = 1; i <= 10; i++) {\n Split split = SimonManager.getStopwatch(\"String_Node_Str\").start();\n ExampleUtils.waitRandomlySquared(50);\n split.stop();\n System.o...
"public boolean isEnrollInfoSameAs(StudentAttributes otherStudent) {\n return (otherStudent != null) && otherStudent.email.equals(this.email) && otherStudent.course.equals(this.course) && otherStudent.name.equals(this.name) && otherStudent.comments.equals(this.comments) && otherStudent.team.equals(this.team) && othe...
"public double compute(int x, int y) {\n return IntegralImageOps.block_unsafe(input, x + x0, y + y0, x + x1, y + y1);\n}\n"
"public ColumnChunkPageReader readAllPages() throws IOException {\n List<DataPage> pagesInChunk = new ArrayList<DataPage>();\n DictionaryPage dictionaryPage = null;\n long valuesCountReadSoFar = 0;\n while (valuesCountReadSoFar < descriptor.metadata.getValueCount()) {\n PageHeader pageHeader = readPa...
"private <P, R> Response<R> sendRequestWebSocket(Request<P> request, Class<R> resultClass) {\n Future<Response<JsonElement>> responseFuture = null;\n if (request.getId() != null) {\n responseFuture = pendingRequests.prepareResponse(request.getId());\n }\n try {\n synchronized (wsSession) {\n ...
"public int read() throws IOException {\n if (remaining == 0) {\n return -1;\n }\n if (pageRemaining == 0) {\n renew();\n }\n pageRemaining--;\n workOffset++;\n remaining--;\n return (int) Unsafe.getUnsafe().getByte(blockAddress++) & 0xFF;\n}\n"
"private static void importFilesFromZip(ZipFile srcZipFile, IPath destPath, IProgressMonitor monitor, IOverwriteQuery query) throws CoreException {\n try {\n ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(srcZipFile);\n List list = prepareFileList(structureProvider, structure...
"public DataSetViewData[] populateAllCachedMetaData(DataSetHandle dataSetHandle, DataRequestSession session) throws BirtException {\n IResultMetaData metaData = session.getDataSetMetaData(dataSetHandle, true);\n DataSetViewData[] items = new DataSetViewData[metaData.getColumnCount()];\n for (int i = 0; i < met...
"public void addSelectionType(SelectionType selectionType) {\n if (!hashSelectionTypes.containsKey(selectionType)) {\n hashSelectionTypes.put(selectionType, new HashMap<Integer, Integer>());\n selectionTypes.add(selectionType);\n }\n}\n"
"private void openReportDocument() throws EngineException {\n try {\n if (archive == null) {\n openArchive();\n }\n writer = new ReportDocumentWriter(engine, archive);\n executionContext.setReportDocWriter(writer);\n } catch (IOException ex) {\n throw new EngineExcept...
"public boolean resourceExists(String jndiName, String target) {\n boolean exists = false;\n if (target.equals(DOMAIN)) {\n exists = true;\n } else if (configBeansUtilities.getServerNamed(target) != null) {\n Server server = configBeansUtilities.getServerNamed(target);\n exists = server.is...
"private void handleBackspace(final int spaceState) {\n if (mVoiceProxy.logAndRevertVoiceInput())\n return;\n final InputConnection ic = getCurrentInputConnection();\n if (ic == null)\n return;\n ic.beginBatchEdit();\n mVoiceProxy.handleBackspace();\n final boolean deleteChar = !mHasUnco...
"public void testXmlSchemaQualified() throws Exception {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n InputStream iStream = classLoader.getResourceAsStream(XMLSCHEMA_QUALIFIED);\n if (iStream == null) {\n fail(\"String_Node_Str\" + XMLSCHEMA_QUALIFIED + \"String_Node_Str...
"public static org.hl7.fhir.dstu2016may.model.Count convertCount(org.hl7.fhir.dstu3.model.Count src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Count tgt = new org.hl7.fhir.dstu2016may.model.Count();\n copyElement(src, tgt);\n tgt.setVal...
"public void onScreenTurnedOn(final ShowListener showListener) {\n if (mKeyguardService != null) {\n if (DEBUG)\n Log.v(TAG, \"String_Node_Str\" + showListener + \"String_Node_Str\");\n mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));\n } else {\n Slog.w(T...
"public String getMainGroup(IPlayer player) {\n String bpgroup = null;\n Plugin p = ProxyServer.getInstance().getPluginManager().getPlugin(\"String_Node_Str\");\n if (p != null) {\n BungeePerms bp = BungeePerms.getInstance();\n try {\n PermissionsManager pm = bp.getPermissionsManager()...
"public static ClassInfo getTestClassInfoFromTargetClass(IFile javaFile) throws Exception {\n IPreferenceStore store = Activator.getDefault().getPreferenceStore();\n ClassInfo classInfo = new ClassInfo();\n List<MethodInfo> testMethods = new ArrayList<MethodInfo>();\n boolean enabled = store.getBoolean(Pref...
"private static void disableWalkthroughStep(Step step, Activity activity) {\n DBAccessor dba = new DBAccessor(activity);\n WalkthroughStep ws = new WalkthroughStep(null);\n ws.set(step, true);\n dba.updateWalkthrough(ws);\n}\n"
"private void addPositionMetadata(Context cx, DefinitionNode def) {\n def.addMetaDataNode(makePositionMetadata(cx, def, false));\n}\n"
"boolean updateItems(Phone phone) {\n if (DBG)\n log(\"String_Node_Str\");\n if (phone.getState() == Phone.State.IDLE) {\n if (DBG)\n log(\"String_Node_Str\");\n return false;\n }\n final boolean hasRingingCall = !phone.getRingingCall().isIdle();\n final boolean hasActiveC...
"protected void prepareUserCas20(User user, String userId, String service, JsonObject data, Document doc, List<Element> additionalAttributes) {\n user.setUser(data.getString(principalAttributeName));\n try {\n String queryParams = new URI(service).getQuery();\n String[] pairs;\n if (queryPara...
"public PlotPlayer wrapPlayer(Object player) {\n if (player instanceof Player) {\n return BukkitUtil.getPlayer((Player) player);\n }\n if (player instanceof OfflinePlayer) {\n return BukkitUtil.getPlayer((OfflinePlayer) player);\n } else if (player instanceof String) {\n return UUIDHand...
"private void populateElement() {\n ItemRecord[] invalidRecords = writer.populate(getElements(), !overwriteBTN.getSelection());\n updateErrorList(invalidRecords);\n if (invalidRecords.length > 0) {\n removeInvalidRecords(invalidRecords);\n }\n}\n"
"public Graph getSpanningTree(Node root) {\n Graph result = new Graph(this.name + \"String_Node_Str\");\n Node[] resultNodes = new Node[this.nodes.length];\n int[] edges;\n int nodeCounter = 0;\n Node tempNodeFromList, tempNewNode;\n LinkedList<Node> todoList = new LinkedList<Node>();\n LinkedList<...
"public void setNotification(OpenNotification osbn) {\n mNotification = osbn;\n if (osbn == null) {\n return;\n }\n Notification n = osbn.getNotification();\n NotificationData data = osbn.getNotificationData();\n Bitmap bitmap = data.getCircleIcon();\n if (bitmap == null)\n bitmap = n...
"public void dropItem(IssuedCommand issuedCommand) {\n Item selectedItem = selectInventoryItem(issuedCommand);\n if (selectedItem != null) {\n if (selectedItem == getWeapon()) {\n totalTime += unequipWeapon();\n }\n getInventory().removeItem(selectedItem);\n getLocation().ad...
"public ExecutionResult execute(Project project) {\n try {\n URL p = MetadataTalendType.getProjectForderURLOfMappingsFile();\n changeSAPHanaMappingFile(p);\n URL s = MetadataTalendType.getSystemForderURLOfMappingsFile();\n changeSAPHanaMappingFile(s);\n String dirPath = \"String_No...
"public static boolean mightBeTIB(ObjectReference obj) throws InlinePragma, UninterruptiblePragma {\n return !obj.isNull() && Space.isImmortal(obj);\n}\n"
"public BuildPlanController getBuildPlans(final String csar, final String serviceTemplateId) {\n final CSARID csarId = this.serviceTemplateService.checkServiceTemplateExistence(csar, serviceTemplateId);\n return new BuildPlanController(csarId, QName.valueOf(serviceTemplateId), this.planService);\n}\n"
"public String checkUserAndPass(String username, String password) {\n String errorMessage = \"String_Node_Str\";\n if (username == null || \"String_Node_Str\".equals(username) || password == null || \"String_Node_Str\".equals(password)) {\n return errorMessage;\n }\n JSONObject tokenMessage = new JSO...
"public org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent convertSearchParameterContactComponent(org.hl7.fhir.dstu3.model.SearchParameter.SearchParameterContactComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.SearchPa...
"private String performTransmission(String data) throws IOException {\n Writer outputWriter = null;\n try {\n outputStream = connection.getOutputStream();\n outputWriter = new OutputStreamWriter(outputStream, Charset.forName(\"String_Node_Str\"));\n outputWriter.write(data);\n outputWr...
"public void addListener(int eventType, Listener listener) {\n super.addListener(eventType, listener);\n if (spinner != null) {\n spinner.addListener(eventType, this);\n }\n}\n"
"private String[] getEvalScoreHeader() throws IOException {\n PathFinder pathFinder = new PathFinder(modelConfig);\n SourceType sourceType = evalConfig.getDataSet().getSource();\n String pathHeader = null;\n boolean isDir = ShifuFileUtils.isDir(pathFinder.getEvalScorePath(evalConfig, sourceType), sourceType...
"public Constructor<T> getConstructor(Class<?>... parameterTypes) throws NoSuchMethodException, SecurityException {\n checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);\n return getReflectionFactory().copyConstructor(getConstructor0(parameterTypes, Member.PUBLIC));\n}\n"
"final SeriesQueries[] getSeriesQueryDefinitions(ChartWithoutAxes cwoa) {\n final ArrayList<SeriesQueries> alSeriesQueries = new ArrayList<SeriesQueries>(4);\n EList elSD = cwoa.getSeriesDefinitions();\n if (elSD.size() != 1) {\n return (SeriesQueries[]) alSeriesQueries.toArray(new SeriesQueries[alSerie...
"private void visitExpressions(ExprHolderNode node) {\n ResolveNamesExprVisitor exprVisitor = new ResolveNamesExprVisitor();\n for (ExprUnion exprUnion : node.getAllExprUnions()) {\n if (exprUnion.getExpr() != null) {\n exprVisitor.exec(exprUnion.getExpr());\n }\n }\n}\n"
"public void reLoad() {\n if (mPresenter != null) {\n mPresenter.getNavigationListData();\n }\n}\n"
"public void validate(UIFormInput uiInput) throws Exception {\n if ((uiInput.getValue() != null) && ((String) uiInput.getValue()).trim().length() > 0) {\n return;\n }\n UIComponent uiComponent = (UIComponent) uiInput;\n UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);\n String label;\n...
"private DEdge insertInTriangleRevertible(DTriangle container, DPoint pt) throws DelaunayError {\n LinkedList<DEdge> badEdges = new LinkedList<DEdge>();\n Deque<DEdge> swapMem = new LinkedList<DEdge>();\n DEdge ret;\n DEdge eMem0 = container.getEdge(0);\n DEdge eMem1 = container.getEdge(1);\n DEdge eM...
"private void deleteServerFromLBConfig(LbConfigs lbconfigs, String configName, String serverName) {\n LbConfig lbConfig = lbconfigs.getLbConfig(configName);\n ServerRef sRef = lbConfig.getRefByRef(ServerRef.class, serverName);\n if (sRef == null) {\n String msg = localStrings.getLocalString(\"String_Nod...
"public void editOpenOfferStart(OpenOffer openOffer, ResultHandler resultHandler, ErrorMessageHandler errorMessageHandler) {\n if (offersToBeEdited.containsKey(openOffer.getId())) {\n resultHandler.handleResult();\n return;\n }\n if (openOffer.isDeactivated()) {\n offersToBeEdited.put(open...
"public static int readHexInteger(ChannelBuffer buf, int length) {\n int result = 0;\n for (int i = 0; i < length / 2; i++) {\n int b = buf.readUnsignedByte();\n result *= 10;\n result += b >>> 4;\n result *= 10;\n result += b & 0x0f;\n }\n if (length % 2 != 0) {\n ...
"public List<ConanParameter> getConanParameters() {\n return new ArrayList<ConanParameter>(Arrays.asList(new ConanParameter[] { this.inputDir, this.outputDir, this.stage, this.dataset }));\n}\n"
"public final VirtualMachineExtensionImpl withoutTag(String key) {\n if (this.inner().getTags() != null) {\n this.inner().getTags().remove(key);\n }\n return this;\n}\n"
"public void handleMessage(Message msg) {\n String statusTitle = msg.getData().getString(\"String_Node_Str\");\n String status = msg.getData().getString(\"String_Node_Str\");\n String error = msg.getData().getString(\"String_Node_Str\");\n if (error == null)\n error = msg.getData().getString(\"String...
"public String readFully() {\n final StringBuilder stringBuilder = new StringBuilder();\n while (hasNext()) {\n stringBuilder.append(UTF_8.decode(next().content()));\n }\n return stringBuilder.toString();\n}\n"
"public void testGetBundleIdFromURL() {\n URLClassLoader loader = new URLClassLoader(new URL[] {}, null);\n IWeavingContext context = new TestWeavingContext(loader) {\n public String getBundleIdFromURL(URL url) {\n throw new UnsupportedOperationException();\n }\n };\n ClassLoaderWea...
"public void run() {\n Toast statusToast = new Toast(HookMethods.SnapContext);\n statusToast.setView(view);\n statusToast.setGravity(Gravity.BOTTOM | Gravity.START, offset, offset);\n statusToast.setDuration(longLength ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT);\n statusToast.show();\n}\n"
"private boolean isTitleEnabled() {\n return !getContext().getUIFactory().isSetInvisible(getChart().getTitle()) && getChart().getTitle().getLabel().getCaption().getValue() != null && !isAutoTitle();\n}\n"
"public void testInsertLong() throws ConnectorException {\n ClusterName clusterName = getClusterName();\n System.out.println(\"String_Node_Str\" + clusterName.getName() + \"String_Node_Str\");\n Object value4 = 1L;\n insertRow(clusterName, value4, ColumnType.BIGINT, VALUE_1, true);\n ResultSet resultIter...
"private void createHeader(SashForm allContentForm) {\n tabFolder = new CTabFolder(allContentForm, SWT.NONE);\n tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));\n wsdlTabItem = new CTabItem(tabFolder, SWT.NONE);\n wsdlTabItem.setText(ExternalWebServiceUIProperties.WSDL_LABEL);\n tabFolder.setSe...
"public Object updateJAXB(Object obj) {\n if (null == obj) {\n throw new IllegalArgumentException();\n }\n try {\n xmlBinder.updateObject((Node) obj);\n Object updatedObj = xmlBinder.getObject((Node) obj);\n boolean shouldWrapInJAXBElement = true;\n XMLDescriptor desc = (XMLD...
"public static void fixupImmChange(Block srcBlock, Block targetBlock, MakeImmChange change, List<Instruction> instBuffer, List<Var> newOutVars, List<Var> oldOutVars) {\n for (Instruction newInst : change.newInsts) {\n instBuffer.add(newInst);\n }\n if (!change.isOutVarSame()) {\n Var newOut = cha...
"public Tuple exec(Tuple input) throws IOException {\n if (input == null || input.size() < 2) {\n return null;\n }\n Integer columnId = (Integer) input.get(0);\n DataBag databag = (DataBag) input.get(1);\n ColumnConfig columnConfig = this.columnConfigList.get(columnId);\n List<Integer> negative...
"private void modifyMovedMethodInvocationInSourceClass() {\n ExpressionExtractor expressionExtractor = new ExpressionExtractor();\n List<TypeDeclaration> sourceTypeDeclarationList = new ArrayList<TypeDeclaration>();\n sourceTypeDeclarationList.add(sourceTypeDeclaration);\n TypeDeclaration[] types = sourceTy...
"private void updateActionModeTitle() {\n if (mActionMode != null) {\n int numSelected = getAdapter().getNumSelected();\n String cabSelected = getString(R.string.cab_selected);\n mActionMode.setTitle(String.format(cabSelected, numSelected));\n }\n}\n"
"private void computeSourceClass(JClassType type) {\n if (type == null || alreadyRan.contains(type)) {\n return;\n }\n alreadyRan.add(type);\n computeSourceClass(type.extnds);\n if (!program.typeOracle.isInstantiatedType(type) || program.isJavaScriptObject(type)) {\n return;\n }\n Set...
"private void sendMessageList(ID roomID, String target) {\n sendMessage(roomID, (target != null ? target + \"String_Node_Str\" : \"String_Node_Str\") + CustomMessages.getString(CustomMessages.MessageList));\n}\n"
"public void runGibbsSampler() {\n for (int sampleIndex = 0; sampleIndex < numberOfBurnInSamples; sampleIndex++) {\n samplePriors(0);\n sampleConfusionMatrix(0);\n sampleClusterAssignments(0);\n sampleLabels(0);\n }\n for (int sampleIndex = 1; sampleIndex < numberOfSamples; sampleIn...
"private void addPartitionContext(Instance parentInstanceContext, GroupLevelNetworkPartitionContext networkPartitionContext) {\n String networkPartitionId = parentInstanceContext.getNetworkPartitionId();\n List<GroupLevelPartitionContext> childPartitionContexts;\n ChildPolicy policy = PolicyManager.getInstance...
"private String translateUrls(String data) {\n JsonCommand command = gson.fromJson(data, JsonCommand.class);\n if (command.getCommand().equals(JsonCommand.CommandType.LOADTEST.getCommand())) {\n List<String> parameters = command.getParameters();\n String fileSourcesList = parameters.get(0);\n ...
"public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException {\n if (qName.compareTo(SUB_LOG_TAG) == 0) {\n scmClass = attrs.getValue(\"String_Node_Str\");\n buffer = new StringBuffer();\n }\n}\n"
"public void send(int code, String subId, String basicMsg) throws IOException {\n IMessageResource resource = fconfig.getMessageResource();\n String lang = request.getLanguage();\n String msg = null;\n if (resource != null) {\n msg = resource.getMessage(code, subId, lang);\n }\n if (msg == null...