content
stringlengths
40
137k
"public void run() {\n mHttpQueuer.addToHttpQueue(LQRequestFactory.createDataPointRequest(datapoint));\n}\n"
"public static void main(String[] args) {\n new RobobuggyLogicNotification(\"String_Node_Str\", RobobuggyMessageLevel.NOTE);\n try {\n JNISetup.setupJNI();\n } catch (NoSuchFieldException | SecurityException | IllegalAccessException | IllegalArgumentException e1) {\n e1.printStackTrace();\n }\...
"public void widgetSelected(SelectionEvent e) {\n JdbcDriverManagerDialog dlg = new JdbcDriverManagerDialog(getShell());\n manageButton.setEnabled(false);\n testButton.setEnabled(false);\n if (dlg.open() == Window.OK) {\n BusyIndicator.showWhile(getShell() == null ? null : getShell().getDisplay(), ne...
"public V put(final K key, final V value) {\n final V oldValue = get(key);\n mObject.property(key, value);\n return oldValue;\n}\n"
"void redirect(Method method, URL url, RequestInfo info) {\n HttpRequest nue;\n if (method.toString().equals(info.req.getMethod().toString())) {\n if (info.req instanceof DefaultFullHttpRequest) {\n DefaultFullHttpRequest dfrq = (DefaultFullHttpRequest) info.req;\n FullHttpRequest rq;...
"public List<OperatorInstance> createInstance(SuspiciousModificationPoint modificationPoint, AstorOperator astorOperator) throws Exception {\n List<OperatorInstance> ops = new ArrayList<>();\n List<Ingredient> ingredients = new ArrayList<>();\n if (astorOperator.needIngredient()) {\n if (astorOperator i...
"public static Map<Integer, MutablePair<String, Double>> computeTreeModelFeatureImportance(List<BasicML> models) {\n List<Map<Integer, MutablePair<String, Double>>> importanceList = new ArrayList<Map<Integer, MutablePair<String, Double>>>();\n for (BasicML basicModel : models) {\n if (basicModel instanceof...
"protected Marker createAndRegisterDecorator(Diff diff, View referenceView, IFigure referenceFigure, MergeViewerSide targetSide) {\n Marker marker = createMarker(diff, referenceView, referenceFigure, targetSide);\n if (marker != null) {\n fMarkerRegistry.put(diff, marker);\n }\n return marker;\n}\n"
"public void annotationsOnlyNonEmpty(final TypeRoleFillerRealis answerable, final Set<AssessedResponse> annotatedResponses) {\n if (checkForFalseNegative(answerable, annotatedResponses)) {\n } else {\n textOut.append(\"String_Node_Str\");\n }\n}\n"
"public Set<QueryableEntry> getSubRecordsBetween(Comparable from, Comparable to) {\n MultiResultSet results = new MultiResultSet();\n if (attributeType != null) {\n indexStore.getSubRecordsBetween(results, convert(from), convert(to));\n }\n return results;\n}\n"
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (xmlCompositeDirectCollectionMapping.hasValueConverter()) {\n if (xmlCompositeDirectColl...
"public NIONode startWorker() throws InitNodeException {\n String name = nw.getName();\n String user = nw.getUser();\n int minPort = nw.getConfiguration().getMinPort();\n int maxPort = nw.getConfiguration().getMaxPort();\n int port = minPort;\n NIONode n = null;\n int pid = -1;\n while (port <= ...
"void sanityCheck(Environment env) throws TemplateException {\n boolean resolvedAnArg, hasUnresolvedArg;\n Expression firstUnresolvedExpression;\n InvalidReferenceException firstReferenceException;\n do {\n firstUnresolvedExpression = null;\n firstReferenceException = null;\n resolvedAn...
"public void testSantaFeTrail() {\n final int LOWER_SUCCESS = 0;\n final int UPPER_SUCCESS = 0;\n final AntTrail model = new SantaFeTrail(getEvolver(), 600);\n setupModel(model);\n int noSuccess = getNoSuccesses(model, false, false);\n assertBetween(\"String_Node_Str\", LOWER_SUCCESS, UPPER_SUCCESS, n...
"public static List<GeoImageReader> createReaderForName(String file, String geoAlgorithm) {\n List<GeoImageReader> girList = new ArrayList<GeoImageReader>();\n try {\n File f = new File(file);\n String parent = f.getParent();\n if (parent != null && (parent.contains(\"String_Node_Str\") || fi...
"private Vector getFactTableFKs(String sname, String factTable) {\n Vector f = new Vector();\n if (sname == null || sname.equals(\"String_Node_Str\")) {\n boolean duplicate = (tablesCount.containsKey(factTable)) && ((tablesCount.get(factTable)).intValue() > 1);\n for (DbTable t : tables) {\n ...
"public void createWithInvalidEnrichment() {\n UnitUtil uu = new UnitUtil();\n Map<String, String> config = uu.createTaskConfig();\n config.put(SplunkSinkConnectorConfig.ENRICHMENT_CONF, \"String_Node_Str\");\n SplunkSinkConnectorConfig connectorConfig = new SplunkSinkConnectorConfig(config);\n}\n"
"public void endDraw() {\n if (!clear || !primarySurface) {\n if (fboSupported) {\n if (drawFramebuffer != null) {\n popFramebuffer();\n if (primarySurface) {\n gl.glClearColor(0, 0, 0, 0);\n gl.glClear(GL10.GL_COLOR_BUFFER_BIT | G...
"public void savePlayerKnowledgeToDisk(UUID playerUUID) {\n if (playerUUID != null && playerKnowledgeDirectory != null) {\n if (playerKnowledgeMap.containsKey(playerUUID) && playerKnowledgeMap.get(playerUUID) != null) {\n if (playerKnowledgeMap.get(playerUUID).hasBeenModified()) {\n ...
"private void removeOld() throws SQLException {\n int i = 0;\n ObjectArray<CacheObject> changed = ObjectArray.newInstance();\n int mem = sizeMemory;\n int rc = recordCount;\n while (mem * 4 > maxSize * 3 && rc > Constants.CACHE_MIN_RECORDS) {\n i++;\n if (i == recordCount) {\n wr...
"boolean insertType(Char o1, Char o2){\n\tif (o1 == o2)\n\t\treturn true;\n\tChar r = o1 - o2;\n\tswitch (o){\n\t\tcase 'A':\n\t\tcase 'B':\n\t\tcase 'C': data.append(\"Neg\"); break;\n\t\tcase 'D':\n\t\tcase 'E':\n\t\tcase 'F': data.append(\"Same\"); break;\n\t\tcase 'L': data.append(\"Pos\");\n\t\tcase 'M': return fa...
"private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {\n if (baseURL == null)\n throw new MalformedURLException();\n StringBuffer buffer = new StringBuffer(prefix);\n if (!\"String_Node_Str\".equals(prefix))\n buffer.append('/');\n buffer.append(name);\n...
"public List<String> getReferencingContentsId(String pageCode) {\n List<String> referencingContentsId = null;\n try {\n referencingContentsId = ((PageUtilizer) this.getContentManager()).getPageUtilizers(pageCode);\n } catch (Throwable t) {\n logger.error(\"String_Node_Str\", pageCode, t);\n ...
"public static SelfServiceOptionWrapper generateSelfServiceOption(final BPELPlan buildPlan) throws IOException {\n final String id = String.valueOf(System.currentTimeMillis());\n final ApplicationOption option = new ApplicationOption();\n final File tmpDir = new File(System.getProperty(\"String_Node_Str\") + S...
"public boolean apply(Game game, Ability source) {\n Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));\n if (targetPlayer != null) {\n targetPlayer.drawCards(source.getManaCostsToPay().getX(), game);\n targetPlayer.loseLife(source.getManaCostsToPay().getX(), game, false);\n...
"public void update(String notification) {\n String[] elements = notification.split(\"String_Node_Str\");\n currentTileId = Integer.parseInt(elements[0]);\n currentTileOrientation = Integer.parseInt(elements[1]);\n currentGUITile = new GUITile(currentTiled, this);\n currentGUITile.setRotation(currentTile...
"public void serialize(final SphereEnumeration sphereEnumeration, final JsonGenerator jsonGenerator, final SerializerProvider serializerProvider) throws IOException {\n final String sphereName = sphereEnumeration.toSphereName();\n jsonGenerator.writeString(sphereName);\n}\n"
"public void updateSecurityFile(File securityFile) {\n ArgumentNotValid.checkNotNull(securityFile, \"String_Node_Str\");\n if (isType(Type.bitarchive) && properties.get(Constants.BITARCHIVE_FILEDIR_PROPERTY) != null) {\n FileUtils.appendToFile(securityFile, \"String_Node_Str\");\n List<String> fileD...
"public Conditional<Instruction> execute(FeatureExpr ctx, final ThreadInfo ti) {\n Conditional<Integer> allRefs = ti.getCalleeThis(ctx, getArgSize());\n Map<Integer, FeatureExpr> map = allRefs.toMap();\n Map<String, List<FeatureExpr>> classes = new TreeMap<>();\n if (JPF.SHARE_INVOCATIONS && map.size() > 1)...
"private static String updateBootclasspathForSourceVersion(String sourceVersion, String compilerName, ArrayList toAdd) {\n if (null == sourceVersion) {\n return null;\n }\n if (3 != sourceVersion.length()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + sourceVersion);\n }\n if...
"private void dematerialize() {\n long dematStartTime = System.currentTimeMillis();\n logger.debug(\"String_Node_Str\");\n Set<NamedClass> classes = rc.getNamedClasses();\n int i = 1;\n for (NamedClass atomicConcept : classes) {\n SortedSet<Individual> pos = rc.getIndividuals(atomicConcept);\n ...
"public void changeExecuted(ChangeRequest change) {\n if ((change != null) && (change.getSource() == this)) {\n return;\n }\n if (_update()) {\n dispatchGraphEvent(new GraphEvent(AbstractBasicGraphModel.this, GraphEvent.STRUCTURE_CHANGED, getRoot()));\n }\n}\n"
"protected static TimeSpec readTimeSpecElement(final XMLExtendedStreamReader reader) throws XMLStreamException {\n TimeUnit unit = null;\n long qty = -1L;\n final int count = reader.getAttributeCount();\n for (int i = 0; i < count; i++) {\n switch(Attribute.forName(reader.getAttributeLocalName(i))) {...
"protected ServiceFunctionType readServiceFunctionType(Class<? extends ServiceFunctionTypeIdentity> serviceFunctionType) {\n printTraceStart(LOG);\n ServiceFunctionType sft = null;\n InstanceIdentifier<ServiceFunctionType> sftIID;\n ServiceFunctionTypeKey serviceFunctionTypeKey = new ServiceFunctionTypeKey(...
"public static List<List<int[]>> getValidPlacements(List<int[]> positions, World world, int x, int y, int z, int blockSide, ItemStack itemStack, EntityPlayer player, Block block) {\n Block var11 = world.getBlock(x, y, z);\n if (var11 == Blocks.snow_layer && (world.getBlockMetadata(x, y, z) & 7) < 1) {\n bl...
"public boolean add(E element) {\n return this.map.put(element, VALUE) == null;\n}\n"
"protected IRemoteService getRemoteService(IRemoteServiceContainerAdapter adapter, String clazz, String filter) {\n final IRemoteServiceReference[] refs = getRemoteServiceReferences(adapter, clazz, filter);\n if (refs == null || refs.length == 0)\n return null;\n return adapter.getRemoteService(refs[0])...
"public String getReference(TypedIOPort port, String[] channelAndOffset, boolean forComposite, boolean isWrite, NamedProgramCodeGeneratorAdapter target) throws IllegalActionException {\n boolean dynamicReferencesAllowed = allowDynamicMultiportReference();\n int channelNumber = 0;\n boolean isChannelNumberInt =...
"public static List<String> getNumbers(String spaceSepIds) {\n synchronized (sInstance) {\n List<String> numbers = new ArrayList<String>();\n String[] ids = spaceSepIds.split(\"String_Node_Str\");\n for (String id : ids) {\n String number = sInstance.mCache.get(id);\n if (n...
"public Boolean doWork() throws Exception {\n String fullRoleName = authorityService.getName(AuthorityType.GROUP, getFullRoleName(role, rmRootNode));\n String zone = getZoneName(rmRootNode);\n Set<String> roles = authorityService.getAllAuthoritiesInZone(zone, AuthorityType.GROUP);\n return Boolean.valueOf(r...
"public ChartBuilder save(ChartBuilder chartBuilder) throws ValidationException {\n if (chartBuilder.getName().contains(\"String_Node_Str\")) {\n throw new ValidationException(I18n.get(\"String_Node_Str\"));\n }\n chartBuilder = super.save(chartBuilder);\n try {\n chartBuilderService.build(cha...
"public static javax.xml.bind.JAXBContext createContext(String contextPath, ClassLoader classLoader) throws JAXBException {\n try {\n XMLContext xmlContext = new XMLContext(contextPath, classLoader);\n return new org.eclipse.persistence.jaxb.JAXBContext(xmlContext);\n } catch (Exception ex) {\n }...
"public void start() {\n super.start();\n final Renders render = new Renders(vertx, container);\n rm.get(\"String_Node_Str\", new Handler<HttpServerRequest>() {\n public void handle(HttpServerRequest request) {\n render.renderView(request, new JsonObject());\n }\n });\n rm.get(\"...
"private long extractForkToStream(FSFork theFork, OutputStream os, ProgressMonitor pm) throws IOException {\n ReadableRandomAccessStream forkFilter = theFork.getReadableRandomAccessStream();\n final long originalLength = theFork.getLength();\n long bytesToRead = originalLength;\n byte[] buffer = new byte[40...
"private void commitInternalAndStopSelf() {\n if (DBG) {\n Log.e(TAG, \"String_Node_Str\");\n }\n commitInternal();\n LatinIME ime = ((LatinIME) mContext);\n ime.hideWindow();\n ime.stopSelf();\n}\n"
"protected void addMethods() {\n IOAction a = curr.getTakeable().iterator().next();\n EndpointState succ = curr.take(a);\n ClassBuilder futureClass = new InputFutureGenerator(this.apigen, this.cb, a).generateType();\n this.apigen.addTypeDecl(futureClass);\n makeReceiveMethod(a, succ);\n makeAsyncMetho...
"public void testSeedExampleKaliAddReturnVoid() throws Exception {\n this.testSeedExampleKali(\"String_Node_Str\");\n validatePatchExistence(ConfigurationProperties.getProperty(\"String_Node_Str\") + File.separator + \"String_Node_Str\");\n}\n"
"protected CrossJoinArg[] checkCrossJoinArg(RolapEvaluator evaluator, Exp exp) {\n if (exp instanceof NamedSetExpr) {\n NamedSet namedSet = ((NamedSetExpr) exp).getNamedSet();\n exp = namedSet.getExp();\n }\n if (!(exp instanceof ResolvedFunCall)) {\n return null;\n }\n final Resolve...
"private void editOrderXML_maxBytesPerDomain(long forceMaxBytesPerDomain) {\n String xpath = HeritrixTemplate.GROUP_MAX_ALL_KB_XPATH;\n Node groupMaxSuccessKbNode = orderXMLdoc.selectSingleNode(xpath);\n if (groupMaxSuccessKbNode != null) {\n if (forceMaxBytesPerDomain != Constants.HERITRIX_MAXBYTES_INF...
"private void computeCasesAndLabels() {\n casesAndLabels = pad.getLabelsAndOffsets();\n for (int i = 1; i < casesAndLabels.length; i += 2) casesAndLabels[i] = pc + casesAndLabels[i];\n defaultLabel = pc + pad.getDefaultOffset();\n}\n"
"private void setUpHlaPublisher(RTIambassador rtia) throws NameNotFound, ObjectClassNotDefined, FederateNotExecutionMember, RTIinternalError, AttributeNotDefined, SaveInProgress, RestoreInProgress, ConcurrentAccessAttempted {\n Iterator<Entry<String, Object[]>> it = _hlaAttributesToPublish.entrySet().iterator();\n ...
"public void remove(Problem problem) {\n try {\n IMarker problemMarker = m_problems.get(problem);\n if (problemMarker != null) {\n IMarker marker = m_res.findMarker(problemMarker.getId());\n marker.delete();\n m_markers.remove(marker);\n }\n m_problems.rem...
"public void registerAppInThunder() {\n String token = sendDataHTTP(\"String_Node_Str\", CoreEngine.getInstance().getConfig());\n CoreEngine.getInstance().getConfig().setToken(token);\n LOGGER.info(\"String_Node_Str\", token, CoreEngine.getInstance().getConfig().getNameApplication());\n}\n"
"public static DatabaseQuery buildEJBQLDatabaseQuery(String queryName, String jpql, Session session, Enum lockMode, Map<String, Object> hints, ClassLoader classLoader) {\n boolean isCacheable = (queryName == null) && (hints == null);\n DatabaseQuery databaseQuery = null;\n if (isCacheable) {\n databaseQ...
"private PinpointRouteResponse getResponse(Future<ResponseMessage> future, long timeout) {\n if (future == null) {\n return new FailedPinpointRouteResponse(TRouteResult.NOT_FOUND, null);\n }\n boolean completed = future.await(timeout);\n if (completed) {\n DefaultPinpointRouteResponse response...
"private int calculatePartitionCount() {\n if (partitionMin == Long.MAX_VALUE) {\n return 0;\n } else {\n return maxTimestamp == Numbers.LONG_NaN ? 1 : (int) (intervalLengthMethod.calculate(partitionMin, timestampFloorMethod.floor(maxTimestamp)) + 1);\n }\n}\n"
"public void setNextInThread(TextFrame nextTextFrame) {\n if (nextTextFrame == null) {\n if (this.nextInThread != null) {\n this.nextInThread.setPreviousInThread(null);\n }\n } else {\n nextTextFrame.setPreviousInThread(this);\n }\n}\n"
"public boolean shouldOverrideUrlLoading(WebView webView, String url) {\n Log.v(\"String_Node_Str\", \"String_Node_Str\" + url);\n if (url != null && url.startsWith(OAUTH_CALLBACK)) {\n handleTwitterCallback(url);\n } else if (url.equals(\"String_Node_Str\")) {\n webView.loadUrl(requestUrl);\n ...
"public void reboot(String reason) {\n mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REBOOT, null);\n if (mHandler == null || !ActivityManagerNative.isSystemReady()) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n final String finalReason = reason;\n Runnable ...
"private static String[] getInfo(String hash, long size, String imdb, String query, RendererConfiguration r) throws IOException {\n if (!login()) {\n return null;\n }\n String lang = UMSUtils.getLangList(r, true);\n URL url = new URL(OPENSUBS_URL);\n String hashStr = \"String_Node_Str\";\n Stri...
"private Compression getCompressionResponseHeader() {\n String encoding = urlConnection.getContentEncoding();\n if (null == encoding) {\n return Compression.NONE;\n } else if (encoding.equalsIgnoreCase(CONTENT_ENCODING_GZIP) && !targetHasGzSuffix(remoteFileName)) {\n return Compression.GZIP;\n ...
"protected ClassLoader createClassLoaderFromDesign(ClassLoader parent) {\n IReportRunnable runnable = context.getRunnable();\n if (runnable != null) {\n ModuleHandle module = (ModuleHandle) runnable.getDesignHandle();\n ArrayList urls = new ArrayList();\n Iterator iter = module.scriptLibsIter...
"public JarURI unmarshal(String uri) throws Exception {\n JarURI jarURI = new JarURI(uri);\n if (uri != null) {\n String moduleName = jarURI.getModuleName();\n String assetPath = jarURI.getAssetPath();\n jarURI = new JarURI(moduleName, hostNameAndPort, assetPath);\n }\n return jarURI;\n...
"private void addField0(String accessorTypeName, String initValExp) throws InstrumentException {\n try {\n Class<?> accessorType = pluginContext.injectClass(classLoader, accessorTypeName);\n final AccessorAnalyzer accessorAnalyzer = new AccessorAnalyzer();\n final AccessorDetails accessorDetails...
"public void testKeyMismatchServerUnsuccessfullyDecrypts() throws Exception {\n settingsStub.serverPublicKey = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String json = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Nod...
"public static Collection getSelectedColumns(HttpServletRequest request) {\n ArrayList<String> columns = new ArrayList<String>();\n int columnCount = getParameterAsInt(request, PARAM_SELECTEDCOLUMNNUMBER);\n for (int i = 0; i < columnCount; i++) {\n String paramName = PARAM_SELECTEDCOLUMN + String.value...
"public Result<Boolean> alias(String alias, AccountAliasForm form) {\n if (!Address.validAddress(form.getAddress())) {\n return Result.getFailed(AccountErrorCode.ADDRESS_ERROR);\n }\n if (StringUtils.isBlank(alias)) {\n return Result.getFailed(AccountErrorCode.PARAMETER_ERROR);\n }\n return...
"public void eatFood() {\n if (timesteps >= maxTimesteps) {\n return;\n }\n foodEaten++;\n}\n"
"public void testListStreams() throws Exception {\n StreamAdmin streamAdmin = getStreamAdmin();\n NamespaceId nsId = new NamespaceId(FOO_NAMESPACE);\n grantAndAssertSuccess(nsId, USER, EnumSet.allOf(Action.class));\n StreamId s1 = nsId.stream(\"String_Node_Str\");\n StreamId s2 = nsId.stream(\"String_Nod...
"public static boolean writePropertyNameColonIfFound(StringBuffer buffer, Node nd, String propertyName, boolean prependComma) {\n if (nd.hasProperty(propertyName)) {\n if (prependComma) {\n buffer.append(\"String_Node_Str\");\n } else {\n buffer.append(\"String_Node_Str\");\n ...
"public static void loadEntities(World worldIn, Chunk chunk, NBTTagCompound compound) {\n compound = compound.getCompoundTag(\"String_Node_Str\");\n NBTTagList nbttaglist1 = compound.getTagList(\"String_Node_Str\", 10);\n for (int j1 = 0; j1 < nbttaglist1.tagCount(); ++j1) {\n NBTTagCompound nbttagcompo...
"public void setSourceId(UUID sourceId) {\n if (this.sourceId == null) {\n this.sourceId = sourceId;\n } else if (!(this instanceof MageSingleton)) {\n this.sourceId = sourceId;\n }\n if (subAbilities != null) {\n for (Ability subAbility : subAbilities) {\n subAbility.setSour...
"private final void renderOutline(IPrimitiveRenderer ipr, LineAttributes lia, Rectangle2D.Double r2d) {\n if (lia != null && lia.isVisible() && lia.getColor() != null) {\n SVGGraphics2D g2d = (SVGGraphics2D) ((IDeviceRenderer) ipr).getGraphicsContext();\n Stroke sPrevious = null;\n final ColorDe...
"public void onEnable() {\n File backupDir = new File(\"String_Node_Str\".concat(FILE_SEPARATOR).concat(\"String_Node_Str\"));\n if (!backupDir.exists())\n backupDir.mkdirs();\n backupDir = new File(\"String_Node_Str\");\n if (!backupDir.exists())\n backupDir.mkdirs();\n backupDir = new Fil...
"protected void updateDataFile(int testament, long ordinal) throws IOException {\n StringBuffer buf = new StringBuffer();\n buf.append(new DecimalFormat(\"String_Node_Str\").format(ordinal));\n buf.append(\"String_Node_Str\");\n String fileName = buf.toString();\n BufferedOutputStream bos = null;\n tr...
"private void drawDrawable(Canvas canvas, Drawable d) {\n int iw = d.getIntrinsicWidth();\n int ih = d.getIntrinsicHeight();\n int w = getIntrinsicWidth();\n int h = getIntrinsicHeight();\n int wp = (w - iw) / 2;\n int hp = (h - ih) / 2;\n Rect b = copyBounds();\n int w = b.width();\n int h =...
"public int setBackLight(int val) throws IOException {\n if (val < 0 || val > 100) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return writeToSysfs(new File(BRIGHTNESS_SYSFS), String.valueOf(val));\n}\n"
"public double calculateDesirability(Brain brain) {\n double desirability = 0;\n if (brain.getTargetingSystem().hasTarget()) {\n final double tweaker = 1.0;\n desirability = tweaker * Math.max(Evaluators.healthScore(brain.getEntityOwner()), 0.7) * Math.max(Evaluators.currentWeaponAmmoScore(brain.get...
"private void receivedMessageWithCorrelationIdTestImpl(Object correlationIdForAmqpMessageClass, boolean appSpecific) throws Exception {\n try (TestAmqpPeer testPeer = new TestAmqpPeer(testFixture.getAvailablePort())) {\n Connection connection = testFixture.establishConnecton(testPeer);\n connection.sta...
"public ImportKeyResult serialKeyRingImport(Iterator<ParcelableKeyRing> entries, int num, String keyServerUri, Progressable progressable, Proxy proxy) {\n if (progressable != null) {\n progressable.setProgress(R.string.progress_importing, 0, 100);\n }\n OperationLog log = new OperationLog();\n log.ad...
"private String waitFor(Set<String> states, int timeout) throws IOException {\n long startTime = System.currentTimeMillis();\n long remainingTime = timeout * 60000;\n String state = null;\n do {\n JSONObject instance = (JSONObject) doGet(instanceUrl, false);\n state = instance.getString(\"Stri...
"public void updateImage(boolean resize) {\n BufferedImage image = renderer.renderViews(selectedRoot);\n imagePanel.setImage(image);\n if (resize) {\n Dimension size = new Dimension((int) (imagePanel.getPreferredSize().getWidth() + 310), (int) imagePanel.getPreferredSize().getHeight());\n splitPa...
"private void updateConfigGroup(ApiConfigGroupInfo apiConfigGroupInfo, String clusterName, ApiHostGroup apiHostGroupFromClusterSpec) {\n try {\n boolean needUpdate = false;\n ApiConfigGroup newApiConfigGroup = new ApiConfigGroup();\n ApiConfigGroupInfo newApiConfigGroupInfo = new ApiConfigGroupI...
"private List<P> createInitialPoints() {\n int numTimeslots = (int) this.timeWindow.getWindowRangeCount();\n List<P> points = new ArrayList<>(numTimeslots);\n for (long timestamp : this.timeWindow) {\n points.add(uncollectedPointCreator.createUnCollectedPoint(timestamp));\n }\n return points;\n}\n...
"public void testNestedCrossTab1() 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 = colu...
"public String selectCaseInstance() {\n try {\n String frontEndCaseDataIn = extractWidgetConfig(\"String_Node_Str\");\n JSONObject frontEndCaseDataInjs = new JSONObject(frontEndCaseDataIn);\n this.setKnowledgeSourceId(frontEndCaseDataInjs.getString(\"String_Node_Str\"));\n this.setContain...
"public GroupZipper up() {\n if (!canUp()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n this.index = parent.index;\n this.node = parent.node;\n this.parent = parent.parent;\n return this;\n}\n"
"public void readData() {\n try {\n if ((inputDataLength = fileInputStream.read(inputData)) != -1) {\n String toSet = new String(inputData, encoding);\n if (inputDataLength < toSet.length())\n toSet = toSet.substring(0, (int) inputDataLength);\n setText(new Stri...
"private void onSelectionCommand(SelectionCommandEvent event) {\n IDCategory idCategory = event.getIdCategory();\n SelectionCommand cmd = event.getSelectionCommand();\n for (SelectionManager selectionManager : selectionManagers) {\n final IDType sidType = selectionManager.getIDType();\n if ((idCa...
"public InputStream export() {\n return new ByteArrayInputStream(toSpot(allResults).getBytes());\n}\n"
"public void addCastedProposal(final LinkedList<IChainElement> workingChain, final IClass expectedType) {\n synchronized (proposals) {\n proposals.add(new ChainTemplateProposal(workingChain, expectedType));\n }\n}\n"
"public int[] stride() {\n int[] ret = new int[Shape.rank(shapeInformation)];\n DataBuffer buffer = Shape.stride(shapeInformation);\n for (int i = 0; i < ret.length; i++) ret[i] = buffer.getInt(i);\n return ret;\n}\n"
"public MemberContext[] startContainers(ContainerClusterContext containerClusterContext) throws UnregisteredCartridgeException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\");\n }\n handleNullObject(containerClusterContext, \"String_Node_Str\");\n String clusterId = containerClusterC...
"public static boolean writeChangeLog(File file, SimpleClearCaseChangeLogSet set, TaskListener listener) throws IOException {\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n Document doc;\n try {\n doc = factory.newDocumentBuilder().newDocument();\n } catch (ParserConfigura...
"protected IRemoteServiceRegistration registerService(IRemoteServiceContainerAdapter adapter, String serviceInterface, Object service, int sleepTime) {\n final IRemoteServiceRegistration result = adapter.registerRemoteService(new String[] { serviceInterface }, service, null);\n sleep(sleepTime);\n return resul...
"public ActionResult execute() throws EntityDoesNotExistException {\n String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID);\n Assumption.assertNotNull(courseId);\n String instructorEmail = getRequestParamValue(Const.ParamsNames.INSTRUCTOR_EMAIL);\n String index = getRequestParamValue(Const.Pa...
"public void run() {\n try {\n active = true;\n HTTPProxyHost = System.getProperty(\"String_Node_Str\");\n if ((HTTPProxyHost != null) && HTTPProxyHost.equals(\"String_Node_Str\")) {\n HTTPProxyHost = null;\n }\n if (HTTPProxyHost != null) {\n String tmp = Sys...
"public void setExpression(String expression) throws IllegalActionException {\n super.setExpression(expression);\n if (expression == null)\n return;\n _destinationNames = new LinkedList();\n _numbers = new LinkedList();\n _variables = new LinkedList();\n _destinationsListVersion = -1;\n Stri...
"protected void onDataChanged() {\n if (!mSeries.isEmpty()) {\n int usableGraphHeight = (int) (mGraphHeight - Utils.dpToPx(1.f));\n int seriesCount = mSeries.size();\n float maxValue = 0.f;\n float minValue = Float.MAX_VALUE;\n mNegativeValue = 0.f;\n mNegativeOffset = 0.f;\...
"public Object getEmitter() {\n return emitter != null ? emitter.get() : null;\n}\n"