code
stringlengths
160
48.7k
prompt
stringlengths
55
1.51k
Of course, here is the Java code you requested: ```java public void marshall(CheckDomainTransferabilityRequest checkDomainTransferabilityRequest, ProtocolMarshaller protocolMarshaller) { if (checkDomainTransferabilityRequest == null) { throw new SdkClientException("Invalid argument passed to marsh...
Create a Java method that does the following: "marshalls the given checkDomainTransferabilityRequest to the given protocolMarshaller.".
Of course, here is the Java code you requested: ```java public static boolean isNull(Object s) { if (s == null) { return true; } if (!(s instanceof String)) { return false; } return NULL_LITERALS.contains(((String) s).toLowerCase(Loc...
Create a Java method that does the following: "Checks if the string is null.".
Of course, here is the Java code you requested: ```java public void readFrom(InputStream is, long length) throws IOException { int segmentSize = 1 << log2OfSegmentSize; int segment = 0; byte scratch[] = new byte[segmentSize]; while(length > 0) { ensureCapacity(segment); ...
Create a Java method that does the following: "Read from the specified input stream.".
Of course, here is the Java code you requested: ```java private static String toXMLString(Collection<TypedDependency> dependencies) { StringBuilder buf = new StringBuilder("<dependencies style=\"typed\">\n"); for (TypedDependency td : dependencies) { String reln = td.reln().toString(); String g...
Create a Java method that does the following: "Converts a collection of typed dependencies to an XML string.".
Of course, here is the Java code you requested: ```java public int compareNext() throws FetchException { if (mCompareResult != 0) { return mCompareResult; } try { while (true) { if (mNextLeft == null && mLeftCursor.hasNext()) { ...
Create a Java method that does the following: "Compare the next records in the sequence.".
Of course, here is the Java code you requested: ```java public static Point getCorner (Point center, Point size) { return new Point(center.x - size.x/2, center.y - size.y/2); } ``` Hope this helps!
Create a Java method that does the following: "Get the corner of the image.".
Of course, here is the Java code you requested: ```java public ActionResult getActionResult(String actionId) { if (actionId == null) { return null; } for (ListIterator<ContentResult> iterator = listIterator(size()); iterator.hasPrevious();) { ContentResult contentResult ...
Create a Java method that does the following: "Get the actionResult for the given actionId.".
Of course, here is the Java code you requested: ```java public List<AroundInvokeType<MessageDrivenBeanType<T>>> getAllAroundInvoke() { List<AroundInvokeType<MessageDrivenBeanType<T>>> list = new ArrayList<AroundInvokeType<MessageDrivenBeanType<T>>>(); List<Node> nodeList = childNode.get("around-invoke")...
Create a Java method that does the following: "Get all AroundInvokeType".
Of course, here is the Java code you requested: ```java static String calculateUserId(String csId) { try { // Try to hash based on default interface InetAddress ip = InetAddress.getLocalHost(); NetworkInterface netIf = NetworkInterface.getByInetAddress(ip); byte[] mac = netIf.getHardwareAdd...
Create a Java method that does the following: "This method is used to calculate the user - id for a credential store.".
Of course, here is the Java code you requested: ```java public static QuantityFeature<AbstractSequence<NucleotideCompound>, NucleotideCompound> createErrorProbabilities(final Fastq fastq) { if (fastq == null) { throw new IllegalArgumentException("fastq must not be null"); } QuantityFeature<AbstractSequence...
Create a Java method that does the following: "Create an error probabilities feature from a FASTQ sequence.".
Of course, here is the Java code you requested: ```java public static boolean checkMultipleBitSet(int flags) { boolean set = false; while (flags != 0) { if ((flags & 0x01) != 0) { if (set) { return false; } else { set = true; } } flags = flags >> 1; } return f...
Create a Java method that does the following: "Check if multiple bits of flags are set.".
Of course, here is the Java code you requested: ```java protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { audit_stats[] resources = new audit_stats[1]; audit_response result = (audit_response) service.get_payload_formatter().string_to_resource(audit_response.cl...
Create a Java method that does the following: "Use this API to fetch resources of given name.".
Of course, here is the Java code you requested: ```java private JobType getJobTypeToProcess() { double denominator = migrationConfiguration.getConsistencyCheckerWeight() + migrationConfiguration.getMigratorWeight(); if (random.nextDouble() <= migrationConfiguration.getConsistencyCheckerWeight() / deno...
Create a Java method that does the following: "get the type of the job to process".
Of course, here is the Java code you requested: ```java public short getShort(String key, short defaultValue) { if (containsKey(key)) { return Short.parseShort(get(key)); } else { return defaultValue; } } ``` Hope this helps!
Create a Java method that does the following: "Get the short value for the specified key.".
Of course, here is the Java code you requested: ```java private static String resolveEnvVar(String envVarName, String mode, boolean bc) { final String envVarValue = System.getenv(envVarName); if(envVarValue == null || envVarValue.isEmpty()) { if(mode != null && mode.startsWith(":-") && mode...
Create a Java method that does the following: "Resolves the environment variable name.".
Of course, here is the Java code you requested: ```java public static void registerProvider( String providerName, Class<? extends StorageProvider> providerClass ) { if ( PROVIDERS.containsKey( providerName ) ) { throw new IllegalArgumentException( "A provider already exists with the name " + pr...
Create a Java method that does the following: "Registers a new provider class.".
Of course, here is the Java code you requested: ```java private void initializePasswordRepetitionEditText() { passwordRepetitionEditText = (EditText) findViewById(R.id.password_repetition_edit_text); passwordRepetitionEditText.addValidator( Validators.equal(this, R.string.equal_validato...
Create a Java method that does the following: "Initializes the password repetition edit text.".
Of course, here is the Java code you requested: ```java public boolean isWithinActiveScope(final QName unitId) { final Node<Scope> self = dialog.getScopeModel().findNode( dialog.findUnit(unitId).getScopeId() ); final Scope scopeOfUnit = self.getData(); int parentScopeId...
Create a Java method that does the following: "Check if a unit is within the active scope.".
Of course, here is the Java code you requested: ```java @Deprecated public static Map<String, Deque<String>> parseQueryString(final String newQueryString) { return parseQueryString(newQueryString, null); } ``` Hope this helps!
Create a Java method that does the following: "Parse a query string into a map of key - value pairs.".
Of course, here is the Java code you requested: ```java public JvmType getType() { if (type != null && type.eIsProxy()) { InternalEObject oldType = (InternalEObject)type; type = (JvmType)eResolveProxy(oldType); if (type != oldType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(...
Create a Java method that does the following: "Replies the type of the type.".
Of course, here is the Java code you requested: ```java public static double elementMinAbs( DMatrix5 a ) { double min = Math.abs(a.a1); double tmp = Math.abs(a.a1); if( tmp < min ) min = tmp; tmp = Math.abs(a.a2); if( tmp < min ) min = tmp; tmp = Math.abs(a.a3); if( tmp < min ) min = tm...
Create a Java method that does the following: "Returns the minimum absolute value of the matrix.".
Of course, here is the Java code you requested: ```java public static void cloneTheme(Intent sourceIntent, Intent intent) { ThemeManager.cloneTheme(sourceIntent, intent, false); } ``` Hope this helps!
Create a Java method that does the following: "Clones the theme from the sourceIntent to the targetIntent.".
Of course, here is the Java code you requested: ```java public String getNamespaceOfNode(Node n) { String namespaceOfPrefix; boolean hasProcessedNS; NSInfo nsInfo; short ntype = n.getNodeType(); if (Node.ATTRIBUTE_NODE != ntype) { Object nsObj = m_NSInfos.get(n); // return value ...
Create a Java method that does the following: "Get the namespace of the node.".
Of course, here is the Java code you requested: ```java private IValue makeValue(String value, boolean ipAddress) throws FilterException { if (ipAddress) return new ValueAddressRange(value); return new ValueString(value); } ``` Hope this helps!
Create a Java method that does the following: "Make a value from a string.".
Of course, here is the Java code you requested: ```java protected String buildModelName(String tableName) { // 移除表名前缀仅用于生成 modelName、baseModelName,而 tableMeta.name 表名自身不能受影响 if (removedTableNamePrefixes != null) { for (String prefix : removedTableNamePrefixes) { if (tableName.startsWith(prefix)) { ...
Create a Java method that does the following: "Build the model name from the table name".
Of course, here is the Java code you requested: ```java @Override public int getIsotopeCount(IIsotope isotope) { int count = 0; Iterator<IMolecularFormula> componentIterator = components.iterator(); while (componentIterator.hasNext()) { count += componentIterator.next().getIsoto...
Create a Java method that does the following: "Gets the number of isotope in this MolecularFormula.".
Of course, here is the Java code you requested: ```java @Override public final void onModuleLoad() { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void onUncaughtException(Throwable e) { HtmlPlatform.log.error("Uncaught Exception: ", e); } }); ...
Create a Java method that does the following: "Called when the application loads the application.".
Of course, here is the Java code you requested: ```java @XmlElementDecl(namespace = "http://schema.intuit.com/finance/v3", name = "OtherName", substitutionHeadNamespace = "http://schema.intuit.com/finance/v3", substitutionHeadName = "IntuitObject") public JAXBElement<OtherName> createOtherName(OtherName value) { ...
Create a Java method that does the following: "Create an instance of OtherName".
Of course, here is the Java code you requested: ```java private void endPerformanceSnapshot() { // Stop the timing. This must be done first before any other counting is // stopped. mSnapshotCpuTime = Process.getElapsedCpuTime() - mSnapshotCpuTime; mSnapshotExecTime = SystemClock.uptimeM...
Create a Java method that does the following: "End the performance snapshot of the current audit log.".
Of course, here is the Java code you requested: ```java public void addLast(E e) { if (e == null) throw new NullPointerException(); elements[tail] = e; if ( (tail = (tail + 1) & (elements.length - 1)) == head) doubleCapacity(); } ``` Hope this helps!
Create a Java method that does the following: "Add an element to the end of the list.".
Of course, here is the Java code you requested: ```java public static <T> T dtoFromScratch(T entity, DTO dtoTemplate) throws HyalineException { return dtoFromScratch(entity, dtoTemplate, "Hyaline$Proxy$" + System.currentTimeMillis()); } ``` Hope this helps!
Create a Java method that does the following: "Creates a new DTO from scratch.".
Of course, here is the Java code you requested: ```java protected void disableSessionDelivery() { bugsnag.setSessionDelivery(new Delivery() { @Override public void deliver(Serializer serializer, Object object, Map<String, String> headers) { // Do nothing } ...
Create a Java method that does the following: "Disable session delivery.".
Of course, here is the Java code you requested: ```java public static Result ok(Path content, boolean inline) { return ok(content, inline, StaticFileMimeTypes.fileMimeTypes()); } ``` Hope this helps!
Create a Java method that does the following: "Check if content is ok.".
Of course, here is the Java code you requested: ```java public static void copyFileToDir(File file, File rel, File dir, AbstractWisdomMojo mojo, MavenResourcesFiltering filtering, Properties additionalProperties) throws IOException { if (filtering == null) { File out = compu...
Create a Java method that does the following: "Copy a file to a directory.".
Of course, here is the Java code you requested: ```java public boolean hasPermissionForPackage(UsbDevice device, String packageName) { List<UsbDevice> usbDevices = grantedPermissions.get(packageName); return usbDevices != null && usbDevices.contains(device); } ``` Hope this helps!
Create a Java method that does the following: "Check if the device has the permission for the given package".
Of course, here is the Java code you requested: ```java public Path getPath (Sprite sprite, int x, int y, boolean loose) { // sanity check if (sprite == null) { throw new IllegalArgumentException( "Can't get path for null sprite [x=" + x + ", y=" + y + "."); } ...
Create a Java method that does the following: "Get the path of the specified sprite on the merry way.".
Of course, here is the Java code you requested: ```java public Matrix4f orthoSymmetricLH(float width, float height, float zNear, float zFar, Matrix4f dest) { return orthoSymmetricLH(width, height, zNear, zFar, false, dest); } ``` Hope this helps!
Create a Java method that does the following: "Symmetric L - H transformation.".
Of course, here is the Java code you requested: ```java @Deprecated public static ObjectId massageToObjectId(Object o) { if (o == null) return null; if (o instanceof ObjectId) return (ObjectId) o; if (o instanceof String) { String s = o.toString(); if (isValid(s)) return...
Create a Java method that does the following: "Convert a object to a ObjectId.".
Of course, here is the Java code you requested: ```java public void init(HttpInboundConnection conn, SessionManager sessMgr) { this.connection = conn; this.request = conn.getRequest(); this.sessionData = new SessionInfo(this, sessMgr); } ``` Hope this helps!
Create a Java method that does the following: "Initialize this class with the data from the connection and session manager.".
Of course, here is the Java code you requested: ```java public <VALUE, KEY extends Key<CoreMap, VALUE>> boolean has(Class<KEY> key) { for (int i = 0; i < size; i++) { if (keys[i] == key) { return true; } } return false; } ``` Hope this helps!
Create a Java method that does the following: "Returns true if the key is in the array.".
Of course, here is the Java code you requested: ```java public void execBackwards(Map<String,INDArray> placeholders){ if (getFunction("grad") == null) { createGradFunction(); } //Collect (unique) list of gradient names... Set<String> varGradNames = new HashSet<>(); ...
Create a Java method that does the following: "Execute the gradient function for all variables in the graph.".
Of course, here is the Java code you requested: ```java private Method getDelegateMethod(String title, Context ctxt) { Method m = delegateMethods.get(title); if (m == null) { List<PPattern> plist = null; String mname = title.substring(0, title.indexOf('(')); // FIXME: this is to handle inheritance in...
Create a Java method that does the following: "Get the delegate method for the given title.".
Of course, here is the Java code you requested: ```java private void logExceptionSimple(String location, Exception e) { StringBuilder bldr = new StringBuilder(); bldr.append("ERROR UPDATING CACHE"); if (location != null) { bldr.append(" for "); bldr.append(location); ...
Create a Java method that does the following: "Report an exception in the reportable.".
Of course, here is the Java code you requested: ```java public final AOValue persistLockAndTick(TransactionCommon t, AOStream stream, long tick, SIMPMessage msg, int storagePolicy, long waitTime, long prevTick) throws Exception { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr....
Create a Java method that does the following: "This method is called by the AOStream when a message is locked. It is called by the AOStream when a message is locked. It is called by the AOStream when a message is added to the AOStream.".
Of course, here is the Java code you requested: ```java public static <K> double estimatePenalty(double l1, Map<K, Double> weights) { double penalty = 0.0; if(l1 > 0.0) { double sumAbsWeights = 0.0; for(double w : weights.values()) { sumAbsWeights += Math.abs(w);...
Create a Java method that does the following: "Estimate penalty of a class based on a set of weights.".
Of course, here is the Java code you requested: ```java public static AnnotationTypeBuilder getInstance(Context context, AnnotationTypeDoc annotationTypeDoc, AnnotationTypeWriter writer) throws Exception { return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);...
Create a Java method that does the following: "Gets an instance of the AnnotationTypeBuilder class.".
Of course, here is the Java code you requested: ```java @Deprecated public ConfigurationRequest newConfigurationRequest(String orgToken, String product, String productVersion, ...
Create a Java method that does the following: "Create a new ConfigurationRequest object with the parameters.".
Of course, here is the Java code you requested: ```java public static Optional<CmsResource> getDetailOnlyResource( CmsObject cms, String contentLocale, CmsResource detailContentRes, CmsResource pageRes) { Optional<CmsResource> detailOnlyRes = getDetailOnlyPage( cms,...
Create a Java method that does the following: "Gets the detail only resource.".
Of course, here is the Java code you requested: ```java @Override public EClass getIfcColourSpecification() { if (ifcColourSpecificationEClass == null) { ifcColourSpecificationEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(103); } return ifcCol...
Create a Java method that does the following: "Get the IfcColourSpecificationEClass attribute of the interface.".
Of course, here is the Java code you requested: ```java @Override public synchronized void processClose(WebSocketChannel channel, int code, String reason) { nextHandler.processClose(channel, code, reason); } ``` Hope this helps!
Create a Java method that does the following: "Process close.".
Of course, here is the Java code you requested: ```java public void setValue(FieldContainer container, byte[] data) { if (data != null) { container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue); } } ``` Hope this helps!
Create a Java method that does the following: "Set the value of this field from the byte array.".
Of course, here is the Java code you requested: ```java protected static String getMapAsString(Map<String, String> map, String separator) { if (map != null && !map.isEmpty()) { StringBuilder str = new StringBuilder(); boolean isFirst = true; for (Entry<String, String> entry : map.entrySet() ) { ...
Create a Java method that does the following: "Get the map as string.".
Of course, here is the Java code you requested: ```java public static Class<?> compileInMemory(final String className, final Map<String, CharSequence> sources) throws ClassNotFoundException { final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); if (null == compiler) {...
Create a Java method that does the following: "Compile a class in memory.".
Of course, here is the Java code you requested: ```java protected FileList parseFilesMetaData(final ParserData parserData, final String value, final int lineNumber, final String line) throws ParsingException { int startingPos = StringUtilities.indexOf(value, '['); if (startingPos != -1) { ...
Create a Java method that does the following: "Parses the files meta data.".
Of course, here is the Java code you requested: ```java public CmsRelationFilter filterStructureId(CmsUUID structureId) { CmsRelationFilter filter = (CmsRelationFilter)clone(); filter.m_structureId = structureId; return filter; } ``` Hope this helps!
Create a Java method that does the following: "Returns a clone of this filter with the given structure id.".
Of course, here is the Java code you requested: ```java protected Principal checkExternalAuthentication(final HttpServletRequest request, final HttpServletResponse response) throws FrameworkException { final String path = PathHelper.clean(request.getPathInfo()); final String[] uriParts = PathHelper.getParts(path)...
Create a Java method that does the following: "Check if the request is an external authentication request.".
Of course, here is the Java code you requested: ```java public boolean matches(final Node node) { if (node.getNodeType() == Node.ELEMENT_NODE) { return matches(((Element) node).getAttribute(ATTRIBUTE_NAME_CLASS)); } return false; } ``` Hope this helps!
Create a Java method that does the following: "Checks if the node matches this class.".
Of course, here is the Java code you requested: ```java protected void addPackageList(Content contentTree) { Content caption = getTableCaption(configuration.getContent( "doclet.ClassUse_Packages.that.use.0", getPackageLink(packageElement, utils.getPackageName(packageElement))));...
Create a Java method that does the following: "Add the package list.".
Of course, here is the Java code you requested: ```java @Override public String sqlRegex(String columnname, String pattern, boolean caseinSensitive, boolean multiLine, boolean dotAllMode) { if(quotes.matcher(pattern).matches() ) { pattern = pattern.substring(1, pattern.length() - 1); // remove th...
Create a Java method that does the following: "This method is used to generate SQL regex for a single SQL statement.".
Of course, here is the Java code you requested: ```java @Override public Session connectToServer(Class<? extends Endpoint> endpointClass, ClientEndpointConfig endpointConfig, URI path) throws DeploymentException, IOException { Object theObject = null; if (endpointClass == null || path == null) { ...
Create a Java method that does the following: "Connect to server.".
Of course, here is the Java code you requested: ```java @Override public java.util.concurrent.Future<DescribeFlowLogsResult> describeFlowLogsAsync( com.amazonaws.handlers.AsyncHandler<DescribeFlowLogsRequest, DescribeFlowLogsResult> asyncHandler) { return describeFlowLogsAsync(new DescribeFlow...
Create a Java method that does the following: "Simplified method form for invoking the DescribeFlowLogs operation with an AsyncHandler.".
Of course, here is the Java code you requested: ```java public FlakeIdGeneratorConfig setPrefetchCount(int prefetchCount) { checkTrue(prefetchCount > 0 && prefetchCount <= MAXIMUM_PREFETCH_COUNT, "prefetch-count must be 1.." + MAXIMUM_PREFETCH_COUNT + ", not " + prefetchCount); this.pre...
Create a Java method that does the following: "Sets the prefetch - count.".
Of course, here is the Java code you requested: ```java boolean doFileNames(Stream<String> filenames) throws IOException { return doClassNames( filenames.filter(name -> name.endsWith(".class")) .filter(name -> !name.endsWith("package-info.class")) .filter(n...
Create a Java method that does the following: "This method is used to check if the file names are valid.".
Of course, here is the Java code you requested: ```java protected ServerSocket newServerSocket(InetAddrPort address, int acceptQueueSize) throws java.io.IOException { if (address == null) return new ServerSocket(0, acceptQueueSize); return new ServerSocket(address.getPort(), acceptQueu...
Create a Java method that does the following: "Create a new ServerSocket object from the given address.".
Of course, here is the Java code you requested: ```java public static CouchbaseCluster create(final CouchbaseEnvironment environment, final String... nodes) { return create(environment, Arrays.asList(nodes)); } ``` Hope this helps!
Create a Java method that does the following: "Create a new cluster with the given configuration and nodes.".
Of course, here is the Java code you requested: ```java @Override public void init(final TemplateData templateData) { super.init(templateData); if (entity != null) { ded = lookupType(entity); } else { Object object = templateData.getObjectReference(entityName); if (object != null) { ded = lookupTyp...
Create a Java method that does the following: "Initializes the object.".
Of course, here is the Java code you requested: ```java public void step () { if (rootTask.status == Status.RUNNING) { rootTask.run(); } else { rootTask.setControl(this); rootTask.start(); if (rootTask.checkGuard(this)) rootTask.run(); else rootTask.fail(); } } ``` Hope this helps!
Create a Java method that does the following: "Step method.".
Of course, here is the Java code you requested: ```java public static void getNetTable(String strRecordClass, String strTableName, String strLanguage, ThinPhysicalDatabaseOwner databaseOwner, ThinPhysicalTableOwner tableOwner, RecordOwner recordOwner, OutputStream ostream) throws IOException { String ol...
Create a Java method that does the following: "Get the Net Table.".
Of course, here is the Java code you requested: ```java private void copyFromRfs(String folder) throws CmsException { // get the corresponding folder in the FS File[] res; File fsFile = getFileInRfs(folder); // first of all, test if this folder existis in the VFS. If not, create it ...
Create a Java method that does the following: "Copy the VFS from the folder in the RFS.".
Of course, here is the Java code you requested: ```java protected void expandClusterOrder(DBID ipt, ClusterOrder order, DistanceQuery<V> dq, FiniteProgress prog) { UpdatableHeap<OPTICSHeapEntry> heap = new UpdatableHeap<>(); heap.add(new OPTICSHeapEntry(ipt, null, Double.POSITIVE_INFINITY)); while(!heap.is...
Create a Java method that does the following: "Expands the cluster order.".
Of course, here is the Java code you requested: ```java @Override public UserIdentity login(String username, Object password, ServletRequest request) { UserIdentity user = super.login(username,password,request); if (user!=null) { HttpSession session = ((HttpServletRequest)r...
Create a Java method that does the following: "Override login method to allow for session authentication.".
Of course, here is the Java code you requested: ```java @Override protected void initGraphics() { super.initGraphics(); LocalDateTime now = LocalDateTime.now(); ZonedDateTime zdt = now.atZone(tile.getZoneId()); try { smc = new SunMoonCalculator(zdt.getYear(), zdt.getMonthV...
Create a Java method that does the following: "Initialize the graphics.".
Of course, here is the Java code you requested: ```java public List<Notification> getByStep(int step) { List<Notification> found = new ArrayList<Notification>(); for (Notification n: NotificationManager.notifications) if (n.getWhen() == step){ logger.fine("...found a match f...
Create a Java method that does the following: "Gets the list of notifications for a given step.".
Of course, here is the Java code you requested: ```java public void setHistoryReference(HistoryReference historyReference) { if (getHistoryReference() != null) { // if (getHistoryReference().getHistoryType() == HistoryReference.TYPE_SPIDER) { // getHistoryReference().delete(...
Create a Java method that does the following: "Sets the value of the HistoryReference property.".
Of course, here is the Java code you requested: ```java protected void writeCoveralls(final JsonWriter writer, final SourceCallback sourceCallback, final List<CoverageParser> parsers) throws ProcessingException, IOException { try { getLog().info("Writing Coveralls data to " + writer.getCoverallsFil...
Create a Java method that does the following: "Write Coveralls data to a JSON writer.".
Of course, here is the Java code you requested: ```java public String getFiltersString() { StringBuffer result = new StringBuffer(); Iterator<String> i = m_filters.iterator(); while (i.hasNext()) { String filter = i.next(); result.append(filter); if (i.hasNe...
Create a Java method that does the following: "Get the filters string.".
Of course, here is the Java code you requested: ```java protected File findFile(List<String> loadPaths, String moduleName) { String fileName = normalizeName(moduleName); File file = new File( moduleName ); if ( file.isAbsolute() ) { if ( file.exists() ) { return file...
Create a Java method that does the following: "Find file in the load paths.".
Of course, here is the Java code you requested: ```java private Map<String,List<JavaFileObject>> searchSubPackages( List<String> subPackages, ListBuffer<String> packages, List<String> excludedPackages) throws IOException { Map<String,List<JavaFileObject>> package...
Create a Java method that does the following: "Search subPackages.".
Of course, here is the Java code you requested: ```java @Override public Geometry next() { Geometry geometry; if ((geometry = m_inputGeometryCursor.next()) != null)// if (geometry = // m_inputGeometryCursor->Next()) { m_index = m_inputGeometryCursor.getGeometryID(); if ((m_progressTracker ...
Create a Java method that does the following: "Returns the next Geometry in the GeometryCursor.".
Of course, here is the Java code you requested: ```java public Build getBuildInfo(String appName, String buildId) { return connection.execute(new BuildInfo(appName, buildId), apiKey); } ``` Hope this helps!
Create a Java method that does the following: "Get build information".
Of course, here is the Java code you requested: ```java public CRCResourceManagementFmtQual createCRCResourceManagementFmtQualFromString(EDataType eDataType, String initialValue) { CRCResourceManagementFmtQual result = CRCResourceManagementFmtQual.get(initialValue); if (result == null) throw new IllegalArgumentExc...
Create a Java method that does the following: "Create a CRCResourceManagementFmtQual value from a String.".
Of course, here is the Java code you requested: ```java String build() throws IOException { if (built) { // Can call build only once per instance throw new IllegalStateException(); } built = true; Map<String, String> moduleCacheInfo = null; if (request.getAttribute(LayerImpl.LAYERCACHEINFO_P...
Create a Java method that does the following: "Builds the network.".
Of course, here is the Java code you requested: ```java private void processProperties() { state = true; try { exporterServiceFilter = getFilter(exporterServiceFilterProperty); } catch (InvalidFilterException invalidFilterException) { LOG.debug("The value of the Property...
Create a Java method that does the following: "Process the properties of the class.".
Of course, here is the Java code you requested: ```java public String asString() { final StringBuilder builder = new StringBuilder(); boolean first = true; for (int i = 1; i < this.nodeList.size(); i++) { final NodeImpl nodeImpl = (NodeImpl) this.nodeList.get(i); final String name = nodeImpl.as...
Create a Java method that does the following: "Returns the path of the node list as a string.".
Of course, here is the Java code you requested: ```java private void obtainButtonBarBackground() { try { int color = ThemeUtil.getColor(getActivity(), R.attr.restoreDefaultsButtonBarBackground); setButtonBarBackgroundColor(color); } catch (NotFoundException e...
Create a Java method that does the following: "Obtains the background color of the button bar from the activity s theme.".
Of course, here is the Java code you requested: ```java public String find(RemoteBaseSession obj) { for (String strKey : this.keySet()) { BaseHolder value = this.get(strKey); if (value.getRemoteObject() == obj) return strKey; } ret...
Create a Java method that does the following: "Find the first record in the cache.".
Of course, here is the Java code you requested: ```java @Override protected void resizeDynamicText() { double maxWidth = unitText.isVisible() ? size * 0.725 : size * 0.9; double fontSize = size * 0.24; valueText.setFont(Fonts.latoRegular(fontSize)); if (valueText.getLayoutBounds().getWi...
Create a Java method that does the following: "Resize the dynamic text.".
Of course, here is the Java code you requested: ```java @Nonnull public BugInstance addSourceLineRange(ClassContext classContext, PreorderVisitor visitor, int startPC, int endPC) { SourceLineAnnotation sourceLineAnnotation = SourceLineAnnotation.fromVisitedInstructionRange(classContext, visitor, ...
Create a Java method that does the following: "Add a SourceLineAnnotation to this BugInstance.".
Of course, here is the Java code you requested: ```java public static boolean doesSecurityGroupExist(AmazonEC2 ec2, String securityGroupName) throws AmazonClientException, AmazonServiceException { DescribeSecurityGroupsRequest securityGroupsRequest = new DescribeSecurit...
Create a Java method that does the following: "Checks if a security group exists in the EC2 service.".
Of course, here is the Java code you requested: ```java public BinaryTag setValue(byte[] value) { this.value = value; size = VINT.fromValue(value.length); return this; } ``` Hope this helps!
Create a Java method that does the following: "Sets the value of the tag.".
Of course, here is the Java code you requested: ```java public static void checkNotNull(Object o, String message, Object... args) { if (o == null) { throwStateEx(message, args); } } ``` Hope this helps!
Create a Java method that does the following: "Check that o is not null.".
Of course, here is the Java code you requested: ```java private void initStrokeWidth(TypedArray attrs) { int index = R.styleable.ActionButton_stroke_width; if (attrs.hasValue(index)) { strokeWidth = attrs.getDimension(index, strokeWidth); LOGGER.trace("Initialized Action Button stroke width: {}", getStrokeWi...
Create a Java method that does the following: "Initialize the stroke width.".
Of course, here is the Java code you requested: ```java public void setPreviousElement(String element, String value) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, InstantiationException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException { ...
Create a Java method that does the following: "Sets the value of the previous element of the document.".
Of course, here is the Java code you requested: ```java public JButton addButton(String strLink, String strIcon, String strParam) { return this.addButton(strLink, strIcon, strParam, LAST); } ``` Hope this helps!
Create a Java method that does the following: "Add this button to the page.".
Of course, here is the Java code you requested: ```java public static Label html(String value) { return new Label(value, true, false, false, false, null, null); } ``` Hope this helps!
Create a Java method that does the following: "Create a new HTML label.".
Of course, here is the Java code you requested: ```java @Override public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) { return commercePriceListPersistence.findWithDynamicQuery(dynamicQuery); } ``` Hope this helps!
Create a Java method that does the following: "Executes a dynamic query on the database.".
Of course, here is the Java code you requested: ```java public JsonParserBuilder numberHandler(@Nullable NumberHandler numberHandler) { checkNoConflict(integerHandler, "integer", numberHandler, "number"); checkNoConflict(floatingHandler, "floating", numberHandler, "number"); this.numberHandler ...
Create a Java method that does the following: "Sets the number handler.".
Of course, here is the Java code you requested: ```java public static List<ElementConfig> getElements(Class clazz) { if (!cacheEC.containsKey(clazz)) { cacheEC.put(clazz, new ArrayList<>(1)); Element e = (Element) clazz.getAnnotation(Element.class); if (e != null) { cacheEC...
Create a Java method that does the following: "Get the elements from the given class.".
Of course, here is the Java code you requested: ```java public static KeyFile parse(byte[] serialized) { try (InputStream in = new ByteArrayInputStream(serialized); // Reader reader = new InputStreamReader(in, UTF_8); // JsonReader jsonReader = GSON.newJsonReader(reader)) { JsonObject jsonObj = new JsonPa...
Create a Java method that does the following: "Parses the given serialized byte array into a KeyFile object.".
Of course, here is the Java code you requested: ```java @Nullable public final JSType findPropertyType(String propertyName) { @Nullable JSType propertyType = findPropertyTypeWithoutConsideringTemplateTypes(propertyName); if (propertyType == null) { return null; } // Do templatized type replaci...
Create a Java method that does the following: "Find the property type for the given property name.".