dep1, dep2 or if deco = "'" 'dep1', 'dep2'

@param writer
@param deco
@param dependencies
@throws IOException
967987
void writeDependencies(Writer writer, String deco, String... dependencies) throws IOException {
		boolean first = true;
		for (String dependency : dependencies) {
			if (!first) {
				writer.append(COMMA).append(SPACEOPTIONAL);
			}
			writer.append(deco).append(dependency).append(deco);
			first = false;
		}
	}
499038
public function write($key, $data, array $dependencies): void
	{
		$this->cachedStorage->write($key, $data, $dependencies);
		$this->memoryStorage->write($key, $data, $dependencies);
	}
125299
public void writeConnlStyleDeps(Writer writer, DependencyForm form) throws IOException {
        requireDeps(form,
            "AgigaPrefs.{readWord,readLemma,readPos} and the dependency form in AgigaPrefs must be true for writeConnlStyleDeps()");
        require(prefs.readWord && prefs.readLemma && prefs.readPos,
            "AgigaPrefs.{readWord,readLemma,readPos} and the dependency form in AgigaPrefs must be true for writeConnlStyleDeps()");
        List<AgigaTypedDependency> agigaDeps = getAgigaDeps(form);
        
        int[] parents = new int[tokens.size()];
        Arrays.fill(parents, -2);
        String[] types = new String[tokens.size()];
        for (AgigaTypedDependency dep : agigaDeps) {
            parents[dep.getDepIdx()] = dep.getGovIdx();
            types[dep.getDepIdx()] = dep.getType();
        }
        
        for (int i=0; i<tokens.size(); i++) {
            AgigaToken tok = tokens.get(i);
            
            // Numbered comments contain the description of fields from http://ilk.uvt.nl/conll/
            // Field number:     Field name:     Description:
            //1    ID  Token counter, starting at 1 for each new sentence.
            // Note: add one since the CONNL-X format is one-indexed
            writer.write(String.valueOf(i+1));
            writer.write("\t");
            //2    FORM    Word form or punctuation symbol.
            writer.write(tok.getWord().trim());
            writer.write("\t");
            //3    LEMMA   Lemma or stem (depending on particular data set) of word form, or an underscore if not available.
            writer.write(tok.getLemma().trim());
            writer.write("\t");
            //4    CPOSTAG  Coarse-grained part-of-speech tag, where tagset depends on the language.
            writer.write(tok.getPosTag().trim());
            writer.write("\t");
            //5    POSTAG  Fine-grained part-of-speech tag, where the tagset depends on the language, or identical to the coarse-grained part-of-speech tag if not available.
            writer.write(tok.getPosTag().trim());
            writer.write("\t");
            //6    FEATS   Unordered set of syntactic and/or morphological features (depending on the particular language), separated by a vertical bar (|), or an underscore if not available.
            writer.write("_\t");
            if (types[i] != null) {
                //7    HEAD    Head of the current token, which is either a value of ID or zero ('0'). Note that depending on the original treebank annotation, there may be multiple tokens with an ID of zero.
                // Note: add one since the CONNL-X format is one-indexed
                writer.write(String.valueOf(parents[i] + 1));
                writer.write("\t");
                //8    DEPREL  Dependency relation to the HEAD. The set of dependency relations depends on the particular language. Note that depending on the original treebank annotation, the dependency relation may be meaningfull or simply 'ROOT'.
                writer.write(types[i].trim());
                writer.write("\t");
            } else {
                writer.write("_\t_\t");
            }
            
            //9    PHEAD   Projective head of current token, which is either a value of ID or zero ('0'), or an underscore if not available. Note that depending on the original treebank annotation, there may be multiple tokens an with ID of zero. The dependency structure resulting from the PHEAD column is guaranteed to be projective (but is not available for all languages), whereas the structures resulting from the HEAD column will be non-projective for some sentences of some languages (but is always available).
            writer.write("_\t");
            //10   PDEPREL     Dependency relation to the PHEAD, or an underscore if not available. The set of dependency relations depends on the particular language. Note that depending on the original treebank annotation, the dependency relation may be meaningfull or simply 'ROOT'.
            writer.write("_\t");
            writer.write("\n");
        }
        // Sentences are separated by a blank line
        writer.write("\n");
    }
674019
public void addDependency(String notation, String scope ) {
        Map<String, String> notationMap = Notation.parse(notation);
        Dependency dependency = new Dependency();
        dependency.setGroupId(notationMap.get("groupId"));
        dependency.setArtifactId(notationMap.get("artifactId"));
        dependency.setType(notationMap.get("type"));
        dependency.setVersion(notationMap.get("version"));
        dependency.setScope( scope );
        addDependency(dependency);
    }
37635
protected void writeApplyDdl(DdlWrite write) {
        scriptInfo.setApplyDdl(
                "-- drop dependencies\n"
                        + write.applyDropDependencies().getBuffer() + "\n"
                        + "-- apply changes\n"
                        + write.apply().getBuffer()
                        + write.applyForeignKeys().getBuffer()
                        + write.applyHistoryView().getBuffer()
                        + write.applyHistoryTrigger().getBuffer()
        );
    }
721600
protected void write(Writer writer, WritingVisitor visitor) throws IOException {
      if( isNullObject() ){
         writer.write(JSONNull.getInstance().toString());
      }

      boolean b = false;
      Iterator keys = visitor.keySet(this).iterator();
      writer.write('{');

      while( keys.hasNext() ){
         if( b ){
            writer.write(',');
         }
         Object k = keys.next();
         writer.write(JSONUtils.quote(k.toString()));
         writer.write(':');
         Object v = this.properties.get(k);
         if( v instanceof JSON ){
            visitor.on((JSON) v, writer);
         }else{
            visitor.on(v, writer);
         }
         b = true;
      }
      writer.write('}');
   }
637185
public static void writeResource(final Writer writer, final VersionInfo versionInfo, final File outputFile,
      final boolean isDebug, final LinkType linkType) throws IOException {

    writer.write("#include \"windows.h\"\n");

    writer.write("VS_VERSION_INFO VERSIONINFO\n");
    final StringBuffer buf = new StringBuffer("FILEVERSION ");
    encodeVersion(buf, parseVersion(versionInfo.getFileversion()));
    buf.append("\nPRODUCTVERSION ");
    encodeVersion(buf, parseVersion(versionInfo.getProductversion()));
    buf.append("\n");
    writer.write(buf.toString());
    buf.setLength(0);
    buf.append("FILEFLAGSMASK 0x1L /* VS_FF_DEBUG */");
    final Boolean patched = versionInfo.getPatched();
    final Boolean prerelease = versionInfo.getPrerelease();
    if (patched != null) {
      buf.append(" | 0x4L /* VS_FF_PATCHED */");
    }
    if (prerelease != null) {
      buf.append(" | 0x2L /* VS_FF_PRERELEASE */");
    }
    if (versionInfo.getPrivatebuild() != null) {
      buf.append(" | 0x8L /* VS_FF_PRIVATEBUILD */");
    }
    if (versionInfo.getSpecialbuild() != null) {
      buf.append(" | 0x20L /* VS_FF_SPECIALBUILD */");
    }
    buf.append('\n');
    writer.write(buf.toString());
    buf.setLength(0);
    buf.append("FILEFLAGS ");

    if (isDebug) {
      buf.append("0x1L /* VS_FF_DEBUG */ | ");
    }
    if (Boolean.TRUE.equals(patched)) {
      buf.append("0x4L /* VS_FF_PATCHED */ | ");
    }
    if (Boolean.TRUE.equals(prerelease)) {
      buf.append("0x2L /* VS_FF_PRERELEASE */ | ");
    }
    // FIXME: What are the possible values of private build? Would it be sufficient to check if private build is empty?
    if (Boolean.TRUE.equals(versionInfo.getPrivatebuild())) {
      buf.append("0x8L /* VS_FF_PRIVATEBUILD */ | ");
    }
    // FIXME: What are the possible values of special build? Would it be sufficient to check if special build is empty?
    if (Boolean.TRUE.equals(versionInfo.getSpecialbuild())) {
      buf.append("0x20L /* VS_FF_SPECIALBUILD */ | ");
    }
    if (buf.length() > 10) {
      buf.setLength(buf.length() - 3);
      buf.append('\n');
    } else {
      buf.append("0\n");
    }
    writer.write(buf.toString());
    buf.setLength(0);

    writer.write("FILEOS 0x40004 /* VOS_NT_WINDOWS32 */\nFILETYPE ");
    if (linkType.isExecutable()) {
      writer.write("0x1L /* VFT_APP */\n");
    } else {
      if (linkType.isSharedLibrary()) {
        writer.write("0x2L /* VFT_DLL */\n");
      } else if (linkType.isStaticLibrary()) {
        writer.write("0x7L /* VFT_STATIC_LIB */\n");
      } else {
        writer.write("0x0L /* VFT_UNKNOWN */\n");
      }
    }
    writer.write("FILESUBTYPE 0x0L\n");
    writer.write("BEGIN\n");
    writer.write("BLOCK \"StringFileInfo\"\n");
    writer.write("   BEGIN\n#ifdef UNICODE\nBLOCK \"040904B0\"\n");
    writer.write("#else\nBLOCK \"040904E4\"\n#endif\n");
    writer.write("BEGIN\n");
    if (versionInfo.getFilecomments() != null) {
      writer.write("VALUE \"Comments\", \"");
      writer.write(versionInfo.getFilecomments());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getCompanyname() != null) {
      writer.write("VALUE \"CompanyName\", \"");
      writer.write(versionInfo.getCompanyname());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getFiledescription() != null) {
      writer.write("VALUE \"FileDescription\", \"");
      writer.write(versionInfo.getFiledescription());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getFileversion() != null) {
      writer.write("VALUE \"FileVersion\", \"");
      writer.write(versionInfo.getFileversion());
      writer.write("\\0\"\n");
    }
    final String baseName = CUtil.getBasename(outputFile);
    String internalName = versionInfo.getInternalname();
    if (internalName == null) {
      internalName = baseName;
    }
    writer.write("VALUE \"InternalName\", \"");
    writer.write(internalName);
    writer.write("\\0\"\n");
    if (versionInfo.getLegalcopyright() != null) {
      writer.write("VALUE \"LegalCopyright\", \"");
      writer.write(versionInfo.getLegalcopyright());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getLegaltrademarks() != null) {
      writer.write("VALUE \"LegalTrademarks\", \"");
      writer.write(versionInfo.getLegaltrademarks());
      writer.write("\\0\"\n");
    }
    writer.write("VALUE \"OriginalFilename\", \"");
    writer.write(baseName);
    writer.write("\\0\"\n");
    if (versionInfo.getPrivatebuild() != null) {
      writer.write("VALUE \"PrivateBuild\", \"");
      writer.write(versionInfo.getPrivatebuild());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getProductname() != null) {
      writer.write("VALUE \"ProductName\", \"");
      writer.write(versionInfo.getProductname());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getProductversion() != null) {
      writer.write("VALUE \"ProductVersion\", \"");
      writer.write(versionInfo.getProductversion());
      writer.write("\\0\"\n");
    }
    if (versionInfo.getSpecialbuild() != null) {
      writer.write("VALUE \"SpecialBuild\", \"");
      writer.write(versionInfo.getSpecialbuild());
      writer.write("\\0\"\n");
    }
    writer.write("END\n");
    writer.write("END\n");

    writer.write("BLOCK \"VarFileInfo\"\n");
    writer.write("BEGIN\n#ifdef UNICODE\n");
    writer.write("VALUE \"Translation\", 0x409, 1200\n");
    writer.write("#else\n");
    writer.write("VALUE \"Translation\", 0x409, 1252\n");
    writer.write("#endif\n");
    writer.write("END\n");
    writer.write("END\n");
  }
1017981
Writer write(Writer writer, int indentFactor, int indent)
            throws JSONException {
        try {
            boolean commanate = false;
            final int length = this.length();
            Iterator<String> keys = this.keys();
            writer.write('{');

            if (length == 1) {
                Object key = keys.next();
                writer.write(quote(key.toString()));
                writer.write(':');
                if (indentFactor > 0) {
                    writer.write(' ');
                }
                writeValue(writer, this.map.get(key), indentFactor, indent);
            } else if (length != 0) {
                final int newindent = indent + indentFactor;
                while (keys.hasNext()) {
                    Object key = keys.next();
                    if (commanate) {
                        writer.write(',');
                    }
                    if (indentFactor > 0) {
                        writer.write('\n');
                    }
                    indent(writer, newindent);
                    writer.write(quote(key.toString()));
                    writer.write(':');
                    if (indentFactor > 0) {
                        writer.write(' ');
                    }
                    writeValue(writer, this.map.get(key), indentFactor, newindent);
                    commanate = true;
                }
                if (indentFactor > 0) {
                    writer.write('\n');
                }
                indent(writer, indent);
            }
            writer.write('}');
            return writer;
        } catch (IOException exception) {
            throw new JSONException(exception);
        }
    }
1328538
public void generateOutput(Writer outputWriter) throws IOException {
        String s = generateOutput();
        outputWriter.write(s);
    }
613284
private void removeDependenciesWithoutSha1(Collection<DependencyInfo> dependencies){
        Collection<DependencyInfo> childDependencies = new ArrayList<>();
        for (Iterator<DependencyInfo> iterator = dependencies.iterator(); iterator.hasNext();){
            DependencyInfo dependencyInfo = iterator.next();
            if (dependencyInfo.getSha1().isEmpty()){
                childDependencies.addAll(dependencyInfo.getChildren());
                iterator.remove();
            }
        }
        dependencies.addAll(childDependencies);
    }
800335
public static void main(String[] args) {
        DependencyRandomIndexingMain drim = new DependencyRandomIndexingMain();
        try {
            drim.run(args);
        }
        catch (Throwable t) {
            t.printStackTrace();
        }
    }
1183130
def write_deps(deps_dict):
    
    for name, dependencies in deps_dict.iteritems():
        if find_package(name + _meta_.sp, _meta_.pkg_path):
            dep_path = _meta_.log_path + "dep/"
            if not os.path.exists(dep_path):
                os.mkdir(dep_path)
            if os.path.isfile(dep_path + name):
                os.remove(dep_path + name)
            if len(dependencies) >= 1:
                with open(dep_path + name, "w") as f:
                    for dep in dependencies:
                        f.write(dep + "\n")
                    f.close()
247964
public int writeDependency(Object id, ValueSet vs) { // SKS-O
        int returnCode = htod.writeDependency(id, vs);
        if (returnCode == HTODDynacache.DISK_EXCEPTION) {
            stopOnError(this.htod.diskCacheException);
        }
        return returnCode;
    }
627144
public int writeDependencyEntry(Object id,
                                    Object entry) {
        int rc = NO_EXCEPTION;
        if (!this.disableDependencyId) {
            if (delayOffload) {
                ValueSet vs = auxDataDependencyTable.getEntries(id);
                if (vs == null) {
                    Result result = writeValueSetEntry(DEP_ID_DATA, id, entry, null, !ADD_IF_NEW);
                    rc = result.returnCode;
                    boolean bExist = result.bExist;
                    returnToResultPool(result);
                    if (rc != DISK_EXCEPTION && rc != DISK_SIZE_OVER_LIMIT_EXCEPTION && bExist == !EXIST) {
                        rc = auxDataDependencyTable.add(id, entry);
                    }
                } else {
                    rc = auxDataDependencyTable.add(id, vs, entry);
                }
            } else {
                Result result = writeValueSetEntry(DEP_ID_DATA, id, entry, null, ADD_IF_NEW);
                rc = result.returnCode;
                returnToResultPool(result);
            }
        }
        return rc;
    }
1164239
public static void string2Writer(String source, Writer out) throws IOException {

		char[] buffer = source.toCharArray();
		for (int i = 0; i < buffer.length; i++) {
			out.append(buffer[i]);
		}
		out.flush();
	}
87521
public void write(PrintWriter writer) {
        this.output = writer;
        dispatch(base, false);
        writer.flush();
    }
129982
public static void print(Collection<TypedDependency> dependencies, PrintWriter pw) {
    pw.println(toString(dependencies, false));
  }