javax_xml_transform


pattern_15 (3 partitions, 43 files)


javax.xml.transform.TransformerFactory.newInstance, javax.xml.transform.Transformer.setOutputProperty, javax.xml.transform.dom.DOMSource.<init>, javax.xml.transform.stream.StreamResult.<init>, javax.xml.transform.Transformer.transform


Cluster 0 (14 files, similarity: 0.40290943956043934)

mozilla-mobile_____focus-android_____SearchEngineManager
        try {
            final Transformer tf = TransformerFactory.newInstance().newTransformer();
            tf.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
            tf.transform(new DOMSource(doc), new StreamResult(writer));
        } catch (TransformerConfigurationException e) {
            return null;
        } catch (TransformerException e) {
            return null;
        }
            
geoserver_____geoserver_____CatalogWriter
    public void write(File file) throws IOException {
        try (FileOutputStream os = new FileOutputStream(file)) {
            Transformer tx = TransformerFactory.newInstance().newTransformer();
            tx.setOutputProperty(OutputKeys.INDENT, "yes");
            DOMSource source = new DOMSource(document);
            StreamResult result = new StreamResult(os);

            tx.transform(source, result);
        } catch (Exception e) {
            String msg = "Could not write catalog to " + file;
            throw (IOException) new IOException(msg).initCause(e);
        }
    }
            
jOOQ_____jOOX_____Util
    static final String toString(Element element) {
        try {
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            Transformer transformer = TransformerFactory.newInstance().newTransformer();
            transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
            Source source = new DOMSource(element);
            Result target = new StreamResult(out);
            transformer.transform(source, target);
            return out.toString("UTF-8");
        }
        catch (Exception e) {
            return "[ ERROR IN toString() : " + e.getMessage() + " ]";
        }
    }
            

pattern_3 (3 partitions, 112 files)


javax.xml.transform.dom.DOMSource.<init>, javax.xml.transform.stream.StreamResult.<init>, javax.xml.transform.Transformer.transform


Cluster 0 (31 files, similarity: 0.5992259978494622)

codice_____ddf_____StringxmlAdapter
      transformer.transform(new DOMSource(anyNode), new StreamResult(buffer));
            
unofficial-openjdk_____openjdk_____GenerationTests
        trans.transform(new DOMSource(doc), new StreamResult(w));
            
geoserver_____geoserver_____WorkspaceTest
        transformer.transform(new DOMSource(dom), new StreamResult(writer));
            

pattern_5 (2 partitions, 58 files)


javax.xml.transform.TransformerException.<init>


Cluster 0 (31 files, similarity: 0.9677429548387062)

bugvm_____bugvm_____SystemIDResolver
    catch (MalformedURIException mue)
    {
      throw new TransformerException(mue);
    }
            
apache_____ofbiz_____XslTransform
            } catch (Exception e) {
                throw new TransformerException("Error creating SAX parser/reader", e);
            }
            
MobiVM_____robovm_____SystemIDResolver
    catch (MalformedURIException mue)
    {
      throw new TransformerException(mue);
    }