Combines lines which end with a backslash with the next line
@param lines {String[]}
@returns {String[]}
341921
function combineMultiLines(lines) {
    return lines.reduce((acc, cur) => {
        const line = acc[acc.length - 1];
        if (acc.length && isLineContinued(line)) {
            acc[acc.length - 1] = line.replace(/\\$/, '');
            acc[acc.length - 1] += cur;
        } else {
            acc.push(cur);
        }
        return acc;
    }, []);
}
1242195
private String printTeaStackTraceLines(TeaStackTraceLine[] lines) {

        String result = "";
        for (int line = 0; line < lines.length; line++) {
            if (line > 0) {
                result += '\n';
            }
            result += lines[line].toString();
        }

        return result;
    }
286646
function parseLine(line){
  var len = line.length;
  var i = 0;
  var lineArr = [];
  var preIndex = 0;
  var isEmpty = false;
  for(; i < len; i++){
    if(/\s/.test(line[i])){
      if(!isEmpty){
        lineArr.push(line.substr(preIndex, i - preIndex));
        isEmpty = true; 
      }
    }else{
      if(isEmpty){
        if(lineArr.length === FIXED_LEN){
          lineArr.push(line.substr(i));
          break;
        }else{
          isEmpty = false;
          preIndex = i;
        }
      }
    }
  }
  return lineArr;
}
961507
public List<String> replaceAbstractClasses(List<String> lines) {
        List<String> result = new LinkedList<String>();
        for (int i = 0; i < lines.size(); i++) {
            result.add(removeAbstract(lines.get(i)));
        }
        return result;
    }
597672
function next_line() {

// Put the next line of source in source_line. If the line contains tabs,
// replace them with spaces and give a warning. Also warn if the line contains
// unsafe characters or is too damn long.

            let at;
            column = 0;
            line += 1;
            source_line = lines[line];
            if (source_line !== undefined) {
                at = source_line.search(rx_tab);
                if (at >= 0) {
                    if (!option.white) {
                        warn_at("use_spaces", line, at + 1);
                    }
                    source_line = source_line.replace(rx_tab, " ");
                }
                at = source_line.search(rx_unsafe);
                if (at >= 0) {
                    warn_at(
                        "unsafe",
                        line,
                        column + at,
                        "U+" + source_line.charCodeAt(at).toString(16)
                    );
                }
                if (option.maxlen && option.maxlen < source_line.length) {
                    warn_at("too_long", line, source_line.length);
                } else if (!option.white && source_line.slice(-1) === " ") {
                    warn_at(
                        "unexpected_trailing_space",
                        line,
                        source_line.length - 1
                    );
                }
            }
            return source_line;
        }
276767
function(line, index, lines) {
        var newLine;
        if (insideString('|>', line)) return line;
        // line does not have a one liner pipeline
        if (!line.match(/(\=|return)(.*?)(\|\>)/)) return line;
        // if next line has a pipe operator
        if (lines[index] && lines[index + 1].match(/^\s*\|\>/)) return line;

        // http://rubular.com/r/wiBJtf12Vn
        // (^.+?)     $1 value to pipe
        // \s*        optional spaces
        // (\|\>)     $2 |> pipe operator
        // (.*?)$     $3 tail minus first pipe ($2)
        //
        var parts = line.match(/(^.+?)\s*(\|\>)(.*?)$/);
        var head = parts[1]
        var tail = parts[2].concat(parts[3]);

        // process head depending on if it's immuttable or not
        if (head.match('Immutable')) {
            head = head.replace('Immutable', '_.chain(Immutable');
        }
        else if (head.match(/^\s*return/)) {
            head = head.replace('return ', 'return _.chain(');
        }
        else if (head.match(/\s=\s/)) {
            head = head.replace('= ', '= _.chain(');
        }

        tail = tail.replace(/(\s*\|\>\s*)/g, function($0, $1) {
            return ').pipesCall(';
        })

        return head + tail + ').value();'
    }
492788
def join_wrapped_lines(lines):
    
    if len(lines) == 1:
        return lines[0]

    joined = lines[0]
    for line in lines[1:]:
        if joined and joined[-1] in STRIP_SPACE_CHARS:
            joined += line
        else:
            joined += ' '
            joined += line

    return joined
972484
def remove_line_with(cls, lines, what):
        
        result = []
        for line in lines:
            if what not in line:
                result = result + [line]
        return result
534845
private List<String> wrapLines(String line, final int maxLength) {
    	List<String> rv = new ArrayList<String>();
        for (String restOfLine : line.split("\\n")) {
            while (restOfLine.length() > maxLength) {
                // try to wrap at space, but don't try too hard as some languages don't even have whitespaces.
                int lineLength;
                String candidate = restOfLine.substring(0, maxLength);
                int sp=candidate.lastIndexOf(' ');
                if(sp>maxLength*3/5)    lineLength=sp;
                else                    lineLength=maxLength;
                rv.add(restOfLine.substring(0, lineLength));
                restOfLine = restOfLine.substring(lineLength).trim();
            }
            rv.add(restOfLine);
        }
    	return rv;
    }
24516
function(str, indent) {
			var lines = str.split("\n");
			for (var i=0; i<lines.length; i++)
				lines[i] = indent + lines[i];
			return lines.join("\n");
		}
893676
def fix_line_breaks(s):
    
    l = s.splitlines()
    x = [i.strip() for i in l]
    x = [i for i in x if i]  # remove blank lines
    return "\n".join(x)
1290
function trimEndBlankLines(array) {

    if (!array || array.length < 1) {
        return array;
    }

    let temp;
    while (array.length > 0) {
        temp = array[array.length - 1];
        if (temp === '' || Str.trim(temp, ' \t') === '') {
            array.pop();
        } else {
            break;
        }
    }

    return array;

}
579995
function(line) {
		var dataArray = [];
		var tempString="";
		var lineLength = line.length;
		var index=0;
		while(index<lineLength) {
			if(line[index]=='"') {
				var index2 = index+1;
				while(line[index2]!='"') {
					tempString+=line[index2];
					index2++;
				}
				dataArray.push(tempString);
				tempString = "";
				index = index2+2;
				continue;
			}
			if(line[index]!=",") {
				tempString += line[index];
				index++; continue;
			} 
			if(line[index]==",") {
				dataArray.push(tempString);
				tempString = "";
				index++;continue;
			}

		}
		dataArray.push(tempString);
		return dataArray;
	}
930692
function (line) {
		line = line || "";
		line = line.trim();

		if (line.length === 0) {
			return true;
		}

		return false;
	}
692958
function translateLineEndings(text, lineEndings) {
        if (lineEndings !== LINE_ENDINGS_CRLF && lineEndings !== LINE_ENDINGS_LF) {
            lineEndings = getPlatformLineEndings();
        }

        var eolStr = (lineEndings === LINE_ENDINGS_CRLF ? "\r\n" : "\n");
        var findAnyEol = /\r\n|\r|\n/g;

        return text.replace(findAnyEol, eolStr);
    }
1225848
function trimTrailingLines(value) {
  var val = String(value)
  var index = val.length

  while (val.charAt(--index) === line) {
    /* Empty */
  }

  return val.slice(0, index + 1)
}
740990
function indent(string) {
  let lines = [];
  for (let line of string.split('\n')) {
    lines.push('  ' + line);
  }
  return lines.join('\n');
}