Gets the align format according to the longest mount point/under storage path.
@param mountTable the mount table to get information from
@return the align format for printing mounted info
355370
private static String getAlignFormat(Map<String, MountPointInfo> mountTable) {
    int mountPointLength = mountTable.entrySet().stream().map(w -> w.getKey().length())
        .max(Comparator.comparing(Integer::intValue)).get();
    int usfLength = mountTable.entrySet().stream().map(w -> w.getValue().getUfsUri().length())
        .max(Comparator.comparing(Integer::intValue)).get();

    String leftAlignFormat = "%-" + usfLength + "s  on  %-" + mountPointLength
        + "s  (%s, capacity=%s, used=%s, %sread-only, %sshared, ";
    return leftAlignFormat;
  }
1173266
public boolean checkForRWPaths() {

        boolean result = false;

        String[] lines = mountReader();

        if (lines == null){
            // Could not read, assume false;
            return false;
        }

        for (String line : lines) {

            // Split lines into parts
            String[] args = line.split(" ");

            if (args.length < 4){
                // If we don't have enough options per line, skip this and log an error
                QLog.e("Error formatting mount line: "+line);
                continue;
            }

            String mountPoint = args[1];
            String mountOptions = args[3];

            for(String pathToCheck: Const.pathsThatShouldNotBeWrtiable) {
                if (mountPoint.equalsIgnoreCase(pathToCheck)) {

                    // Split options out and compare against "rw" to avoid false positives
                    for (String option : mountOptions.split(",")){

                        if (option.equalsIgnoreCase("rw")){
                            QLog.v(pathToCheck+" path is mounted with rw permissions! "+line);
                            result = true;
                            break;
                        }
                    }
                }
            }
        }

        return result;
    }
266266
public String getRowsWithColumnsAsString() {
		StringBuffer sb = new StringBuffer();
		int lvSize = rows.size();
		for (int i=0; i<lvSize; i++) {
			String lvRow = row2String(i); 
			sb.append(lvRow);
			if (i < (lvSize-1) && lvRow.endsWith(CsvParser.CRLF) == false) {
				sb.append(CsvParser.CRLF);
			}
		}
		return sb.toString();
	}
1353431
public Optional<SectionHeader> maybeGetSectionTableEntry(SectionTable table) {
        checkArgument(table != null, "table must not be null");
        List<SectionHeader> sections = table.getSectionHeaders();
        // loop through all section headers to check if entry is within section
        for (SectionHeader header : sections) {
            long vSize = header.getAlignedVirtualSize();
            // corkami: "a section can have a null VirtualSize: in this case,
            // only the SizeOfRawData is taken into consideration. "
            // see: https://code.google.com/p/corkami/wiki/PE#section_table
            if (vSize == 0) {
                vSize = header.getAlignedSizeOfRaw();
            }
            long vAddress = header.getAlignedVirtualAddress();
            logger.debug("check if rva is within " + vAddress + " and "
                    + (vAddress + vSize));
            // return header if data entry va points into it
            if (rvaIsWithin(new VirtualLocation(vAddress, vSize))) {
                return Optional.of(header);
            }
        }
        logger.warn("there is no entry that matches data dir entry RVA "
                + virtualAddress);
        return Optional.absent();
    }
544685
public static final long alignedPosition(SeekableByteChannel ch, long align) throws IOException
    {
        long position = ch.position();
        long mod = position % align;
        if (mod > 0)
        {
            return position + align - mod;
        }
        else
        {
            return position;
        }
    }
1055588
function (table) {
        var finalLine = '+';
        for (var i = 0; i < table.maxWidth.length; i++) {
            finalLine += Array(table.maxWidth[i] + 3).join('-') + '+';
        }
        return finalLine;
    }
1034000
public final String getFinishFormattedMedium() {
        Granularity finishGran = this.interval.getFinishGranularity();
        return formatFinish(finishGran != null ? finishGran.getMediumFormat()
                : null);
    }
558859
@SuppressWarnings({"unused", "unchecked"})
    @Internal
    protected final Object getValueForMethodArgument(BeanResolutionContext resolutionContext, BeanContext context, int methodIndex, int argIndex) {
        MethodInjectionPoint injectionPoint = methodInjectionPoints.get(methodIndex);
        Argument argument = injectionPoint.getArguments()[argIndex];
        BeanResolutionContext.Path path = resolutionContext.getPath();
        path.pushMethodArgumentResolve(this, injectionPoint, argument);
        if (context instanceof ApplicationContext) {
            // can't use orElseThrow here due to compiler bug
            try {
                String valueAnnStr = argument.getAnnotationMetadata().getValue(Value.class, String.class).orElse(null);
                Class argumentType = argument.getType();

                if (isInnerConfiguration(argumentType)) {
                    Qualifier qualifier = resolveQualifier(resolutionContext, argument, true);
                    return ((DefaultBeanContext) context).getBean(resolutionContext, argumentType, qualifier);
                } else {
                    String argumentName = argument.getName();
                    String valString = resolvePropertyValueName(resolutionContext, injectionPoint.getAnnotationMetadata(), argument, valueAnnStr);


                    ApplicationContext applicationContext = (ApplicationContext) context;
                    ArgumentConversionContext conversionContext = ConversionContext.of(argument);
                    Optional value = resolveValue(applicationContext, conversionContext, valueAnnStr != null, valString);
                    if (argumentType == Optional.class) {
                        return resolveOptionalObject(value);
                    } else {
                        if (value.isPresent()) {
                            return value.get();
                        } else {
                            if (argument.isDeclaredAnnotationPresent(Nullable.class)) {
                                return null;
                            }
                            throw new DependencyInjectionException(resolutionContext, injectionPoint, conversionContext, valString);
                        }
                    }
                }
            } finally {
                path.pop();
            }
        } else {
            path.pop();
            throw new DependencyInjectionException(resolutionContext, argument, "BeanContext must support property resolution");
        }
    }
873787
public boolean isLowAlignmentMode() {
		long fileAlign = get(FILE_ALIGNMENT);
		long sectionAlign = get(SECTION_ALIGNMENT);
		return 1 <= fileAlign && fileAlign == sectionAlign
				&& fileAlign <= 0x800;
	}
115978
protected static LineAndColumn getLineAndColumn(INode anyNode, int documentOffset) {
		INode rootNode = anyNode.getRootNode();
		int[] lineBreaks = getLineBreakOffsets(rootNode);
		String document = rootNode.getText();
		return getLineAndColumn(document, lineBreaks, documentOffset);
	}
1208681
public static String getImagePath(String imageTag) {
        int indexOfSlash = imageTag.indexOf("/");
        int indexOfLastColon = imageTag.lastIndexOf(":");
        String imageName;
        String imageVersion;

        if (indexOfLastColon < 0 || indexOfLastColon < indexOfSlash) {
            imageName = imageTag.substring(indexOfSlash + 1);
            imageVersion = "latest";
        } else {
            imageName = imageTag.substring(indexOfSlash + 1, indexOfLastColon);
            imageVersion = imageTag.substring(indexOfLastColon + 1);
        }
        return imageName + "/" + imageVersion;
    }
100191
public String getTableName(String table, Number shardKey) {
        if (orMapping.getShardCount() <= 1 || shardKey == null || shardKey.longValue() <= 0) {
            return table;
        }

        return table + calShardNum(shardKey.longValue());
    }
1115374
public static String getImageFileFormat(File imageFile) {
        String imageFileName = imageFile.getName();
        String imageFormat = imageFileName.substring(imageFileName.lastIndexOf('.') + 1);
        if (imageFormat.matches("(pbm|pgm|ppm)")) {
            imageFormat = "pnm";
        } else if (imageFormat.matches("(jp2|j2k|jpf|jpx|jpm)")) {
            imageFormat = "jpeg2000";
        }
        return imageFormat;
    }
54097
private static String getDefaultNamedOutputFormatInstanceFile(JobContext job) {
		return job.getConfiguration().get(DEFAULT_MO_PREFIX + FORMAT_INSTANCE_FILE, null);
	}
1343268
protected String calcTableName(String table) {
        return StringUtils.isBlank(defaultKeyspace) || table.indexOf('.') >= 0 ? table
                : defaultKeyspace + "." + table;
    }
25809
public String getFormat(CmsObject cms) {

        if (m_format == null) {
            if (m_element.element(PARAM_FORMAT) != null) {
                m_format = m_element.element(PARAM_FORMAT).getText();
            }
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_format)) {
                m_format = getParameterValue(cms, PARAM_FORMAT);
            }
        }
        return m_format;
    }
707901
public String getCaption() {
    if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_caption == null)
      jcasType.jcas.throwFeatMissing("caption", "ch.epfl.bbp.uima.types.DataTable");
    return jcasType.ll_cas.ll_getStringValue(addr, ((DataTable_Type)jcasType).casFeatCode_caption);}