Helper to add a list of strings to a code block.
180265
private static void addStringList(CodeBlock.Builder code, List<String> list, String indent) {
    int size = list.size();
    code.add("$T.asList(\n$L", Arrays.class, indent);
    int width = indent.length();
    for (int i = 0; i < size; i++) {
      if (i != 0) {
        code.add(", ");
        width += 2;
      }
      if (width > 80) {
        width = indent.length();
        code.add("\n$L", indent);
      }
      String element = list.get(i);
      code.add("$S", element);
      width += element.length() + 2;
    }
    code.add("\n$L)", indent);
  }
855191
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, CodeStatement)
        codeobj._si = len(self.body)
        self.body.append(codeobj)
1081706
def add_all(self, items):
        
        check_not_none(items, "Value can't be None")
        data_items = []
        for item in items:
            check_not_none(item, "Value can't be None")
            data_items.append(self._to_data(item))
        return self._encode_invoke(queue_add_all_codec, data_list=data_items)
999677
def add_words(self):
        

        data_blocks = len(self.buffer.getvalue()) // 8
        total_blocks = tables.data_capacity[self.version][self.error][0] // 8
        needed_blocks = total_blocks - data_blocks

        if needed_blocks == 0:
            return None

        #This will return item1, item2, item1, item2, etc.
        block = itertools.cycle(['11101100', '00010001'])

        #Create a string of the needed blocks
        return ''.join([next(block) for x in range(needed_blocks)])
1019816
def build_strings(self):
        """"""
        for idx, dev in enumerate(self.devices):
            header = 'system.' + dev
            self.gcalls[idx] = header + '.gcall(system.dae)\n'
            self.fcalls[idx] = header + '.fcall(system.dae)\n'
            self.gycalls[idx] = header + '.gycall(system.dae)\n'
            self.fxcalls[idx] = header + '.fxcall(system.dae)\n'
            self.jac0s[idx] = header + '.jac0(system.dae)\n'
70570
void insertIntoList(BlockInfo head, int headIndex, BlockInfo tail, int tailIndex, int count) {
    if (head == null)
      return;
    
    // connect tail to now-head
    tail.setNext(tailIndex, blockList);
    if (blockList != null)
      blockList.setPrevious(blockList.findDatanode(this), tail);
    
    // create new head
    blockList = head;
    blockList.setPrevious(headIndex, null);
    
    // add new blocks to the count
    numOfBlocks += count;
  }
898751
def get_string_list(self, key):
        """"""
        strings = []
        size = self.beginReadArray(key)
        for i in range(size):
            self.setArrayIndex(i)
            entry = str(self._value("entry"))
            strings.append(entry)
        self.endArray()
        return strings
124712
private static void appendImmutableList(
      IndentedLinesBuilder ilb, String typeParamSnippet, Collection<String> itemSnippets) {
    appendListOrSetHelper(ilb, "ImmutableList." + typeParamSnippet + "of", itemSnippets);
  }
92744
private void appendListOfValues(StringBuffer stmt)
    {
        int cnt = getColumns().length;

        stmt.append(" VALUES (");

        for (int i = 0; i < cnt; i++)
        {
            if (i > 0)
            {
                stmt.append(',');
            }
            stmt.append('?');
        }
        stmt.append(')');
    }
1187220
def build_strings(strings, prefix):
        
        strings = [
            (
                make_c_str(prefix + str(number), value),
                reloc_ptr(
                    prefix + str(number), 'reloc_delta', 'char *'
                )
            ) for value, number in sort_values(strings)
        ]
        return [i[0] for i in strings], [i[1] for i in strings]
29668
void startBlockImpl( String[] selectors ) {
        for( int i=0; i<selectors.length; i++ ) {
            if( i > 0 ) {
                output.append( ',' );
                newline();
            }
            insets();
            append( selectors[i] );
        }
        space();
        output.append( '{' );
        newline();
        incInsets();
    }
232548
def add_string_parameters(self, string):
        
        if isinstance(string, list):
            for x in string:
                self.add_string_parameters(x)
            return
        self._parameters.append("{ \"value\": \"" + string + "\" }")
474600
private static String addLineNumber(String code) {
		String[] lines = code.split("\n");
		StringBuilder builder = new StringBuilder();
		for (int i = 0; i < lines.length; i++) {
			builder.append("/* ").append(i + 1).append(" */").append(lines[i]).append("\n");
		}
		return builder.toString();
	}
1164411
def DEFINE_list(self, name, default, help, constant=False):
    """"""
    self.AddOption(
        type_info.List(
            name=name,
            default=default,
            description=help,
            validator=type_info.String()),
        constant=constant)
45805
def new_code_block(self, **kwargs):
        """"""
        proto = {'content': '',
                 'type': self.code,
                 'IO': '',
                 'attributes': ''}
        proto.update(**kwargs)
        return proto
411338
public TypedCode<TRANS> add(HttpCode<TRANS,?> code, String ... others) {
			StringBuilder sb = new StringBuilder();
			boolean first = true;
			for(String str : others) {
				if(first) {
					first = false; 
				} else {
					sb.append(',');
				}
				sb.append(str);
			}
			parse(code, sb.toString());
			
			return this;
		}
307051
def add(self,attrlist,attrvalues):
        '''
        
        '''
        for i,d in enumerate(attrlist):
            self[d] = attrvalues[i]