id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
105,600
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.resolve
public static String resolve(String uriInitial, String uriString) { try { return uriToString((new URI(uriInitial)).resolve(uriString)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uriInitial)).resolve(uriString); } ...
java
public static String resolve(String uriInitial, String uriString) { try { return uriToString((new URI(uriInitial)).resolve(uriString)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uriInitial)).resolve(uriString); } ...
[ "public", "static", "String", "resolve", "(", "String", "uriInitial", ",", "String", "uriString", ")", "{", "try", "{", "return", "uriToString", "(", "(", "new", "URI", "(", "uriInitial", ")", ")", ".", "resolve", "(", "uriString", ")", ")", ";", "}", ...
Helper method for performing resolve as String @param uriInitial @param uriString @return
[ "Helper", "method", "for", "performing", "resolve", "as", "String" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L262-L274
105,601
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.modifyURIScheme
public static String modifyURIScheme(String uri, String newScheme) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIScheme(uriObj, newScheme)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri))....
java
public static String modifyURIScheme(String uri, String newScheme) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIScheme(uriObj, newScheme)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri))....
[ "public", "static", "String", "modifyURIScheme", "(", "String", "uri", ",", "String", "newScheme", ")", "{", "try", "{", "URI", "uriObj", "=", "new", "URI", "(", "uri", ")", ";", "return", "uriToString", "(", "URLUtils", ".", "modifyURIScheme", "(", "uriOb...
Helper method for modifying URI scheme @param uri @param newScheme @return
[ "Helper", "method", "for", "modifying", "URI", "scheme" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L282-L295
105,602
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.modifyURIAuthority
public static String modifyURIAuthority(String uri, String newAuthority) { try { URI uriObj = new URI(uri); // code below modifies new authority considering also network interface syntax Pattern pattern = Pattern.compile(NETWORK_INTERFACE_AUTHORITY); Matcher match...
java
public static String modifyURIAuthority(String uri, String newAuthority) { try { URI uriObj = new URI(uri); // code below modifies new authority considering also network interface syntax Pattern pattern = Pattern.compile(NETWORK_INTERFACE_AUTHORITY); Matcher match...
[ "public", "static", "String", "modifyURIAuthority", "(", "String", "uri", ",", "String", "newAuthority", ")", "{", "try", "{", "URI", "uriObj", "=", "new", "URI", "(", "uri", ")", ";", "// code below modifies new authority considering also network interface syntax", "...
Helper method for modifying URI authority @param uri @param newAuthority @return
[ "Helper", "method", "for", "modifying", "URI", "authority" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L303-L327
105,603
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.modifyURIPort
public static String modifyURIPort(String uri, int newPort) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPort(uriObj, newPort)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri)).modifyURIPo...
java
public static String modifyURIPort(String uri, int newPort) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPort(uriObj, newPort)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri)).modifyURIPo...
[ "public", "static", "String", "modifyURIPort", "(", "String", "uri", ",", "int", "newPort", ")", "{", "try", "{", "URI", "uriObj", "=", "new", "URI", "(", "uri", ")", ";", "return", "uriToString", "(", "URLUtils", ".", "modifyURIPort", "(", "uriObj", ","...
Helper method for modifying URI port @param uri @param newPort @return
[ "Helper", "method", "for", "modifying", "URI", "port" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L335-L348
105,604
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.modifyURIPath
public static String modifyURIPath(String uri, String newPath) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPath(uriObj, newPath)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri)).modifyUR...
java
public static String modifyURIPath(String uri, String newPath) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPath(uriObj, newPath)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri)).modifyUR...
[ "public", "static", "String", "modifyURIPath", "(", "String", "uri", ",", "String", "newPath", ")", "{", "try", "{", "URI", "uriObj", "=", "new", "URI", "(", "uri", ")", ";", "return", "uriToString", "(", "URLUtils", ".", "modifyURIPath", "(", "uriObj", ...
Helper method for modiffying the URI path @param uri @param newPath @return
[ "Helper", "method", "for", "modiffying", "the", "URI", "path" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L356-L369
105,605
kaazing/gateway
transport/ssl/src/main/java/org/kaazing/gateway/transport/ssl/cert/VirtualHostKeySelector.java
VirtualHostKeySelector.getCertCN
private String getCertCN(X509Certificate x509) throws CertificateParsingException { X500Principal principal = x509.getSubjectX500Principal(); String subjectName = principal.getName(); String[] fields = subjectName.split(","); for (String field : fields) { if (field....
java
private String getCertCN(X509Certificate x509) throws CertificateParsingException { X500Principal principal = x509.getSubjectX500Principal(); String subjectName = principal.getName(); String[] fields = subjectName.split(","); for (String field : fields) { if (field....
[ "private", "String", "getCertCN", "(", "X509Certificate", "x509", ")", "throws", "CertificateParsingException", "{", "X500Principal", "principal", "=", "x509", ".", "getSubjectX500Principal", "(", ")", ";", "String", "subjectName", "=", "principal", ".", "getName", ...
Read the CN out of the cert
[ "Read", "the", "CN", "out", "of", "the", "cert" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/ssl/src/main/java/org/kaazing/gateway/transport/ssl/cert/VirtualHostKeySelector.java#L99-L114
105,606
kaazing/gateway
transport/ssl/src/main/java/org/kaazing/gateway/transport/ssl/cert/VirtualHostKeySelector.java
VirtualHostKeySelector.getCertServerNames
private Collection<String> getCertServerNames(X509Certificate x509) throws CertificateParsingException { Collection<String> serverNames = new LinkedHashSet<>(); /* Add CN for the certificate */ String certCN = getCertCN(x509); serverNames.add(certCN); /* Add alternativ...
java
private Collection<String> getCertServerNames(X509Certificate x509) throws CertificateParsingException { Collection<String> serverNames = new LinkedHashSet<>(); /* Add CN for the certificate */ String certCN = getCertCN(x509); serverNames.add(certCN); /* Add alternativ...
[ "private", "Collection", "<", "String", ">", "getCertServerNames", "(", "X509Certificate", "x509", ")", "throws", "CertificateParsingException", "{", "Collection", "<", "String", ">", "serverNames", "=", "new", "LinkedHashSet", "<>", "(", ")", ";", "/* Add CN for th...
Build up the list of server names represented by a certificate
[ "Build", "up", "the", "list", "of", "server", "names", "represented", "by", "a", "certificate" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/ssl/src/main/java/org/kaazing/gateway/transport/ssl/cert/VirtualHostKeySelector.java#L117-L150
105,607
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeBitString
public static BitSet decodeBitString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_BIT_STRING_TAG_NUM) && !id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_BIT_STRING_TAG_NUM)) { ...
java
public static BitSet decodeBitString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_BIT_STRING_TAG_NUM) && !id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_BIT_STRING_TAG_NUM)) { ...
[ "public", "static", "BitSet", "decodeBitString", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", ",", "DerId", ...
Decode an ASN.1 BIT STRING. @param buf the buffer containing the DER-encoded BIT STRING. @return the bits in the BIT STRING
[ "Decode", "an", "ASN", ".", "1", "BIT", "STRING", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L56-L87
105,608
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeGeneralizedTime
public static Date decodeGeneralizedTime(ByteBuffer buf) { // GeneralizedTime ::= [UNIVERSAL 24] IMPLICIT VisibleString DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_GENERALIZED_TIME_TAG_NUM)) { throw new IllegalArgumentExc...
java
public static Date decodeGeneralizedTime(ByteBuffer buf) { // GeneralizedTime ::= [UNIVERSAL 24] IMPLICIT VisibleString DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_GENERALIZED_TIME_TAG_NUM)) { throw new IllegalArgumentExc...
[ "public", "static", "Date", "decodeGeneralizedTime", "(", "ByteBuffer", "buf", ")", "{", "// GeneralizedTime ::= [UNIVERSAL 24] IMPLICIT VisibleString", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", ...
Decode an ASN.1 GeneralizedTime. @param buf the DER-encoded GeneralizedTime @return the data and time
[ "Decode", "an", "ASN", ".", "1", "GeneralizedTime", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L96-L142
105,609
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeIA5String
public static String decodeIA5String(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_IA5STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected IA5String identifier, received " + id); } int l...
java
public static String decodeIA5String(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_IA5STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected IA5String identifier, received " + id); } int l...
[ "public", "static", "String", "decodeIA5String", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", ",", "DerId", ...
Decode an ASN.1 IA5String. @param buf the DER-encoded IA5String @return the string
[ "Decode", "an", "ASN", ".", "1", "IA5String", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L151-L163
105,610
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeInteger
public static int decodeInteger(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_INTEGER_TAG_NUM)) { throw new IllegalArgumentException("Expected INTEGER identifier, received " + id); } int len = DerU...
java
public static int decodeInteger(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_INTEGER_TAG_NUM)) { throw new IllegalArgumentException("Expected INTEGER identifier, received " + id); } int len = DerU...
[ "public", "static", "int", "decodeInteger", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", ",", "DerId", "."...
Decode an ASN.1 INTEGER. @param buf the buffer containing the DER-encoded INTEGER @return the value of the INTEGER
[ "Decode", "an", "ASN", ".", "1", "INTEGER", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L172-L186
105,611
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeOctetString
public static short[] decodeOctetString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected OCTET STRING identifier, received " + id); } int len = DerUtils.decodeL...
java
public static short[] decodeOctetString(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) { throw new IllegalArgumentException("Expected OCTET STRING identifier, received " + id); } int len = DerUtils.decodeL...
[ "public", "static", "short", "[", "]", "decodeOctetString", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", "...
Decode an ASN.1 OCTET STRING. @param buf the DER-encoded OCTET STRING @return the octets
[ "Decode", "an", "ASN", ".", "1", "OCTET", "STRING", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L195-L209
105,612
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.decodeSequence
public static int decodeSequence(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_SEQUENCE_TAG_NUM)) { throw new IllegalArgumentException("Expected SEQUENCE identifier, received " + id); } int len =...
java
public static int decodeSequence(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_SEQUENCE_TAG_NUM)) { throw new IllegalArgumentException("Expected SEQUENCE identifier, received " + id); } int len =...
[ "public", "static", "int", "decodeSequence", "(", "ByteBuffer", "buf", ")", "{", "DerId", "id", "=", "DerId", ".", "decode", "(", "buf", ")", ";", "if", "(", "!", "id", ".", "matches", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", ",", "DerId", "....
Decode an ASN.1 SEQUENCE by reading the identifier and length octets. The remaining data in the buffer is the SEQUENCE. @param buf the DER-encoded SEQUENCE @return the length of the SEQUENCE
[ "Decode", "an", "ASN", ".", "1", "SEQUENCE", "by", "reading", "the", "identifier", "and", "length", "octets", ".", "The", "remaining", "data", "in", "the", "buffer", "is", "the", "SEQUENCE", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L218-L228
105,613
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeBitString
public static int encodeBitString(BitSet value, int nbits, ByteBuffer buf) { if (value == null || nbits < value.length()) { throw new IllegalArgumentException(); } int pos = buf.position(); int contentLength = (int) Math.ceil(nbits / 8.0d); for (int i = contentLength...
java
public static int encodeBitString(BitSet value, int nbits, ByteBuffer buf) { if (value == null || nbits < value.length()) { throw new IllegalArgumentException(); } int pos = buf.position(); int contentLength = (int) Math.ceil(nbits / 8.0d); for (int i = contentLength...
[ "public", "static", "int", "encodeBitString", "(", "BitSet", "value", ",", "int", "nbits", ",", "ByteBuffer", "buf", ")", "{", "if", "(", "value", "==", "null", "||", "nbits", "<", "value", ".", "length", "(", ")", ")", "{", "throw", "new", "IllegalArg...
Encode an ASN.1 BIT STRING. @param value the value to be encoded @param nbits the number of bits in the bit string @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "BIT", "STRING", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L241-L268
105,614
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeGeneralizedTime
public static int encodeGeneralizedTime(Date date, ByteBuffer buf) { if (date == null) { throw new IllegalArgumentException(); } int pos = buf.position(); SimpleDateFormat format = new SimpleDateFormat(GENERALIZED_TIME_FORMAT); format.setTimeZone(TimeZone.getTimeZone...
java
public static int encodeGeneralizedTime(Date date, ByteBuffer buf) { if (date == null) { throw new IllegalArgumentException(); } int pos = buf.position(); SimpleDateFormat format = new SimpleDateFormat(GENERALIZED_TIME_FORMAT); format.setTimeZone(TimeZone.getTimeZone...
[ "public", "static", "int", "encodeGeneralizedTime", "(", "Date", "date", ",", "ByteBuffer", "buf", ")", "{", "if", "(", "date", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "pos", "=", "buf", ".", "positi...
Encode an ASN.1 GeneralizedTime. @param date the date value @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "GeneralizedTime", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L279-L297
105,615
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeIA5String
public static int encodeIA5String(String value, ByteBuffer buf) { int pos = buf.position(); byte[] data = (value == null) ? new byte[0] : value.getBytes(); for (int i = data.length - 1; i >= 0; i--) { pos--; buf.put(pos, data[i]); } buf.position(buf.positi...
java
public static int encodeIA5String(String value, ByteBuffer buf) { int pos = buf.position(); byte[] data = (value == null) ? new byte[0] : value.getBytes(); for (int i = data.length - 1; i >= 0; i--) { pos--; buf.put(pos, data[i]); } buf.position(buf.positi...
[ "public", "static", "int", "encodeIA5String", "(", "String", "value", ",", "ByteBuffer", "buf", ")", "{", "int", "pos", "=", "buf", ".", "position", "(", ")", ";", "byte", "[", "]", "data", "=", "(", "value", "==", "null", ")", "?", "new", "byte", ...
Encode an ASN.1 IA5String. @param value the value to be encoded @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "IA5String", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L308-L319
105,616
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeInteger
public static int encodeInteger(int value, ByteBuffer buf) { int pos = buf.position(); int contentLength = 0; do { pos--; buf.put(pos, (byte) (value & 0xff)); value >>>= 8; contentLength++; } while (value != 0); buf.position(buf.pos...
java
public static int encodeInteger(int value, ByteBuffer buf) { int pos = buf.position(); int contentLength = 0; do { pos--; buf.put(pos, (byte) (value & 0xff)); value >>>= 8; contentLength++; } while (value != 0); buf.position(buf.pos...
[ "public", "static", "int", "encodeInteger", "(", "int", "value", ",", "ByteBuffer", "buf", ")", "{", "int", "pos", "=", "buf", ".", "position", "(", ")", ";", "int", "contentLength", "=", "0", ";", "do", "{", "pos", "--", ";", "buf", ".", "put", "(...
Encode an ASN.1 INTEGER. @param value the value to be encoded @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "INTEGER", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L330-L343
105,617
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeOctetString
public static int encodeOctetString(short[] octets, ByteBuffer buf) { if (octets == null) { octets = new short[0]; } int pos = buf.position(); for (int i = octets.length - 1; i >= 0; i--) { pos--; buf.put(pos, (byte) octets[i]); } buf.p...
java
public static int encodeOctetString(short[] octets, ByteBuffer buf) { if (octets == null) { octets = new short[0]; } int pos = buf.position(); for (int i = octets.length - 1; i >= 0; i--) { pos--; buf.put(pos, (byte) octets[i]); } buf.p...
[ "public", "static", "int", "encodeOctetString", "(", "short", "[", "]", "octets", ",", "ByteBuffer", "buf", ")", "{", "if", "(", "octets", "==", "null", ")", "{", "octets", "=", "new", "short", "[", "0", "]", ";", "}", "int", "pos", "=", "buf", "."...
Encode an ASN.1 OCTET STRING. @param octets the octets @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "OCTET", "STRING", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L354-L367
105,618
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.encodeSequence
public static int encodeSequence(int contentLength, ByteBuffer buf) { int headerLength = DerUtils.encodeIdAndLength(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_SEQUENCE_TAG_NUM, contentLength, buf); return headerLength + contentLength; }
java
public static int encodeSequence(int contentLength, ByteBuffer buf) { int headerLength = DerUtils.encodeIdAndLength(DerId.TagClass.UNIVERSAL, DerId.EncodingType.CONSTRUCTED, ASN1_SEQUENCE_TAG_NUM, contentLength, buf); return headerLength + contentLength; }
[ "public", "static", "int", "encodeSequence", "(", "int", "contentLength", ",", "ByteBuffer", "buf", ")", "{", "int", "headerLength", "=", "DerUtils", ".", "encodeIdAndLength", "(", "DerId", ".", "TagClass", ".", "UNIVERSAL", ",", "DerId", ".", "EncodingType", ...
Encode an ASN.1 SEQUENCE. @param contentLength the length of the SEQUENCE @param buf the buffer with space to the left of current position where the value will be encoded @return the length of the encoded data
[ "Encode", "an", "ASN", ".", "1", "SEQUENCE", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L378-L382
105,619
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.sizeOfBitString
public static int sizeOfBitString(BitSet value, int nbits) { return DerUtils.sizeOf(ASN1_BIT_STRING_TAG_NUM, (int) Math.ceil(nbits / 8.0d) + 1); // +1 for padding }
java
public static int sizeOfBitString(BitSet value, int nbits) { return DerUtils.sizeOf(ASN1_BIT_STRING_TAG_NUM, (int) Math.ceil(nbits / 8.0d) + 1); // +1 for padding }
[ "public", "static", "int", "sizeOfBitString", "(", "BitSet", "value", ",", "int", "nbits", ")", "{", "return", "DerUtils", ".", "sizeOf", "(", "ASN1_BIT_STRING_TAG_NUM", ",", "(", "int", ")", "Math", ".", "ceil", "(", "nbits", "/", "8.0d", ")", "+", "1",...
Size of an ASN.1 BIT STRING. @param value the BIT STRING value @param nbits the number of bits in the bit string @return the size of the encoded data
[ "Size", "of", "an", "ASN", ".", "1", "BIT", "STRING", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L393-L395
105,620
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.sizeOfIA5String
public static int sizeOfIA5String(String value) { return DerUtils.sizeOf(ASN1_IA5STRING_TAG_NUM, (value == null) ? 0 : value.getBytes().length); }
java
public static int sizeOfIA5String(String value) { return DerUtils.sizeOf(ASN1_IA5STRING_TAG_NUM, (value == null) ? 0 : value.getBytes().length); }
[ "public", "static", "int", "sizeOfIA5String", "(", "String", "value", ")", "{", "return", "DerUtils", ".", "sizeOf", "(", "ASN1_IA5STRING_TAG_NUM", ",", "(", "value", "==", "null", ")", "?", "0", ":", "value", ".", "getBytes", "(", ")", ".", "length", ")...
Size of an ASN.1 IA5String. @param value the string @return the size of the encoded data
[ "Size", "of", "an", "ASN", ".", "1", "IA5String", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L415-L417
105,621
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java
Asn1Utils.sizeOfInteger
public static int sizeOfInteger(int value) { int contentLength = 0; do { value >>>= 8; contentLength++; } while (value != 0); return DerUtils.sizeOf(ASN1_INTEGER_TAG_NUM, contentLength); }
java
public static int sizeOfInteger(int value) { int contentLength = 0; do { value >>>= 8; contentLength++; } while (value != 0); return DerUtils.sizeOf(ASN1_INTEGER_TAG_NUM, contentLength); }
[ "public", "static", "int", "sizeOfInteger", "(", "int", "value", ")", "{", "int", "contentLength", "=", "0", ";", "do", "{", "value", ">>>=", "8", ";", "contentLength", "++", ";", "}", "while", "(", "value", "!=", "0", ")", ";", "return", "DerUtils", ...
Size of an ASN.1 INTEGER. @param value the integer value @return the size of the encoded data
[ "Size", "of", "an", "ASN", ".", "1", "INTEGER", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/asn1/Asn1Utils.java#L426-L433
105,622
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/utils/MD4.java
MD4.pad
private byte[] pad() { int pos = (int) (msgLength % BYTE_BLOCK_LENGTH); int padLength = (pos < 56) ? (64 - pos) : (128 - pos); byte[] pad = new byte[padLength]; // First bit of the padding set to 1 pad[0] = (byte) 0x80; long bits = msgLength << 3; int index = pa...
java
private byte[] pad() { int pos = (int) (msgLength % BYTE_BLOCK_LENGTH); int padLength = (pos < 56) ? (64 - pos) : (128 - pos); byte[] pad = new byte[padLength]; // First bit of the padding set to 1 pad[0] = (byte) 0x80; long bits = msgLength << 3; int index = pa...
[ "private", "byte", "[", "]", "pad", "(", ")", "{", "int", "pos", "=", "(", "int", ")", "(", "msgLength", "%", "BYTE_BLOCK_LENGTH", ")", ";", "int", "padLength", "=", "(", "pos", "<", "56", ")", "?", "(", "64", "-", "pos", ")", ":", "(", "128", ...
Pads the buffer by appending the byte 0x80, then append as many zero bytes as necessary to make the buffer length a multiple of 64 bytes. The last 8 bytes will be filled with the length of the buffer in bits. If there's no room to store the length in bits in the block i.e the block is larger than 56 bytes then an addit...
[ "Pads", "the", "buffer", "by", "appending", "the", "byte", "0x80", "then", "append", "as", "many", "zero", "bytes", "as", "necessary", "to", "make", "the", "buffer", "length", "a", "multiple", "of", "64", "bytes", ".", "The", "last", "8", "bytes", "will"...
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/utils/MD4.java#L189-L204
105,623
kaazing/gateway
server.api/src/main/java/org/kaazing/gateway/server/impl/ProductInfoReader.java
ProductInfoReader.generateProductInfo
private static synchronized ProductInfo generateProductInfo() { ProductInfo result = new ProductInfo(); boolean foundJar = false; String[] pathEntries = System.getProperty("java.class.path").split(System.getProperty("path.separator")); Map<String, Attributes> products = new TreeMap<>(Col...
java
private static synchronized ProductInfo generateProductInfo() { ProductInfo result = new ProductInfo(); boolean foundJar = false; String[] pathEntries = System.getProperty("java.class.path").split(System.getProperty("path.separator")); Map<String, Attributes> products = new TreeMap<>(Col...
[ "private", "static", "synchronized", "ProductInfo", "generateProductInfo", "(", ")", "{", "ProductInfo", "result", "=", "new", "ProductInfo", "(", ")", ";", "boolean", "foundJar", "=", "false", ";", "String", "[", "]", "pathEntries", "=", "System", ".", "getPr...
Find the product information from the server JAR MANIFEST files and store it in static variables here for later retrieval.
[ "Find", "the", "product", "information", "from", "the", "server", "JAR", "MANIFEST", "files", "and", "store", "it", "in", "static", "variables", "here", "for", "later", "retrieval", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/server.api/src/main/java/org/kaazing/gateway/server/impl/ProductInfoReader.java#L59-L92
105,624
kaazing/gateway
service/amqp/src/main/java/org/kaazing/gateway/service/amqp/amqp091/AmqpTable.java
AmqpTable.addInteger
public AmqpTable addInteger(String key, int value) { this.add(key, value, AmqpType.INT); return this; }
java
public AmqpTable addInteger(String key, int value) { this.add(key, value, AmqpType.INT); return this; }
[ "public", "AmqpTable", "addInteger", "(", "String", "key", ",", "int", "value", ")", "{", "this", ".", "add", "(", "key", ",", "value", ",", "AmqpType", ".", "INT", ")", ";", "return", "this", ";", "}" ]
Adds an integer entry to the AmqpTable. @param key name of an entry @param value integer value of an entry @return AmqpTable object that holds the table of entries
[ "Adds", "an", "integer", "entry", "to", "the", "AmqpTable", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/amqp/src/main/java/org/kaazing/gateway/service/amqp/amqp091/AmqpTable.java#L130-L133
105,625
kaazing/gateway
service/amqp/src/main/java/org/kaazing/gateway/service/amqp/amqp091/AmqpTable.java
AmqpTable.addLongString
public AmqpTable addLongString(String key, String value) { this.add(key, value, AmqpType.LONGSTRING); return this; }
java
public AmqpTable addLongString(String key, String value) { this.add(key, value, AmqpType.LONGSTRING); return this; }
[ "public", "AmqpTable", "addLongString", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "add", "(", "key", ",", "value", ",", "AmqpType", ".", "LONGSTRING", ")", ";", "return", "this", ";", "}" ]
Adds a long string entry to the AmqpTable. @param key name of an entry @param value long string value of an entry @return AmqpTable object that holds the table of entries
[ "Adds", "a", "long", "string", "entry", "to", "the", "AmqpTable", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/amqp/src/main/java/org/kaazing/gateway/service/amqp/amqp091/AmqpTable.java#L142-L145
105,626
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/executor/OrderedThreadPoolExecutor.java
OrderedThreadPoolExecutor.getSessionTasksQueue
private SessionTasksQueue getSessionTasksQueue(IoSession session) { SessionTasksQueue queue = (SessionTasksQueue) session.getAttribute(TASKS_QUEUE); if (queue == null) { queue = new SessionTasksQueue(); SessionTasksQueue oldQueue = (SessionTasksQueue) session.se...
java
private SessionTasksQueue getSessionTasksQueue(IoSession session) { SessionTasksQueue queue = (SessionTasksQueue) session.getAttribute(TASKS_QUEUE); if (queue == null) { queue = new SessionTasksQueue(); SessionTasksQueue oldQueue = (SessionTasksQueue) session.se...
[ "private", "SessionTasksQueue", "getSessionTasksQueue", "(", "IoSession", "session", ")", "{", "SessionTasksQueue", "queue", "=", "(", "SessionTasksQueue", ")", "session", ".", "getAttribute", "(", "TASKS_QUEUE", ")", ";", "if", "(", "queue", "==", "null", ")", ...
Get the session's tasks queue.
[ "Get", "the", "session", "s", "tasks", "queue", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/executor/OrderedThreadPoolExecutor.java#L217-L231
105,627
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/executor/OrderedThreadPoolExecutor.java
OrderedThreadPoolExecutor.print
private void print( Queue<Runnable> queue, IoEvent event) { StringBuilder sb = new StringBuilder(); sb.append( "Adding event " ).append( event.getType() ).append( " to session " ).append(event.getSession().getId() ); boolean first = true; sb.append( "\nQueue : [" ); for (Runnable...
java
private void print( Queue<Runnable> queue, IoEvent event) { StringBuilder sb = new StringBuilder(); sb.append( "Adding event " ).append( event.getType() ).append( " to session " ).append(event.getSession().getId() ); boolean first = true; sb.append( "\nQueue : [" ); for (Runnable...
[ "private", "void", "print", "(", "Queue", "<", "Runnable", ">", "queue", ",", "IoEvent", "event", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"Adding event \"", ")", ".", "append", "(", "event"...
A Helper class used to print the list of events being queued.
[ "A", "Helper", "class", "used", "to", "print", "the", "list", "of", "events", "being", "queued", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/executor/OrderedThreadPoolExecutor.java#L424-L440
105,628
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/basic/HttpBasicAuthLogicHandler.java
HttpBasicAuthLogicHandler.createAuthorization
public static String createAuthorization(final String username, final String password) { return new String(Base64.encodeBase64((username + ":" + password) .getBytes())); }
java
public static String createAuthorization(final String username, final String password) { return new String(Base64.encodeBase64((username + ":" + password) .getBytes())); }
[ "public", "static", "String", "createAuthorization", "(", "final", "String", "username", ",", "final", "String", "password", ")", "{", "return", "new", "String", "(", "Base64", ".", "encodeBase64", "(", "(", "username", "+", "\":\"", "+", "password", ")", "....
Computes the authorization header value. @param username the user name @param password the user password @return the authorization header value as a string
[ "Computes", "the", "authorization", "header", "value", "." ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/basic/HttpBasicAuthLogicHandler.java#L95-L99
105,629
kaazing/gateway
mina.netty/src/main/java/org/kaazing/mina/core/service/AbstractIoProcessor.java
AbstractIoProcessor.add
@Override public final void add(final T session) { // note: alignment is optional before 4.0 if (session.isIoAligned()) { verifyInIoThread(session, session.getIoThread()); } add0(session); }
java
@Override public final void add(final T session) { // note: alignment is optional before 4.0 if (session.isIoAligned()) { verifyInIoThread(session, session.getIoThread()); } add0(session); }
[ "@", "Override", "public", "final", "void", "add", "(", "final", "T", "session", ")", "{", "// note: alignment is optional before 4.0", "if", "(", "session", ".", "isIoAligned", "(", ")", ")", "{", "verifyInIoThread", "(", "session", ",", "session", ".", "getI...
until the processor is created and started
[ "until", "the", "processor", "is", "created", "and", "started" ]
06017b19273109b3b992e528e702586446168d57
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.netty/src/main/java/org/kaazing/mina/core/service/AbstractIoProcessor.java#L36-L43
105,630
lalyos/jfiglet
src/main/java/com/github/lalyos/jfiglet/Smushing.java
Smushing.getRulesToApply
static SmushingRulesToApply getRulesToApply(Integer oldLayout, Integer fullLayout){ List<SmushingRule> horizontalSmushingRules = new ArrayList<SmushingRule>(); List<SmushingRule> verticalSmushingRules = new ArrayList<SmushingRule>(); SmushingRule.Layout horizontalLayout = null; SmushingRule.Layout verti...
java
static SmushingRulesToApply getRulesToApply(Integer oldLayout, Integer fullLayout){ List<SmushingRule> horizontalSmushingRules = new ArrayList<SmushingRule>(); List<SmushingRule> verticalSmushingRules = new ArrayList<SmushingRule>(); SmushingRule.Layout horizontalLayout = null; SmushingRule.Layout verti...
[ "static", "SmushingRulesToApply", "getRulesToApply", "(", "Integer", "oldLayout", ",", "Integer", "fullLayout", ")", "{", "List", "<", "SmushingRule", ">", "horizontalSmushingRules", "=", "new", "ArrayList", "<", "SmushingRule", ">", "(", ")", ";", "List", "<", ...
Return definition of smushing logic to be applied. @param oldLayout Old_Layout describes horizontal layout, older fonts may only provide this. @param fullLayout Full_Layout describes ALL information about horizontal and vertical layout. @return Smushing logic to be applied
[ "Return", "definition", "of", "smushing", "logic", "to", "be", "applied", "." ]
fc98c13622d753219267a2a8b5800cead198ebc9
https://github.com/lalyos/jfiglet/blob/fc98c13622d753219267a2a8b5800cead198ebc9/src/main/java/com/github/lalyos/jfiglet/Smushing.java#L13-L48
105,631
lalyos/jfiglet
src/main/java/com/github/lalyos/jfiglet/Smushing.java
Smushing.calculateOverlay
@SuppressWarnings("StatementWithEmptyBody") private static int calculateOverlay(FigletFont figletFont, char[][] char1, char[][] char2){ if (figletFont.smushingRulesToApply.getHorizontalLayout() == SmushingRule.Layout.FULL_WIDTH){ return 0; } int maxPotentialOverlay = figletFont.maxLine; for(int ...
java
@SuppressWarnings("StatementWithEmptyBody") private static int calculateOverlay(FigletFont figletFont, char[][] char1, char[][] char2){ if (figletFont.smushingRulesToApply.getHorizontalLayout() == SmushingRule.Layout.FULL_WIDTH){ return 0; } int maxPotentialOverlay = figletFont.maxLine; for(int ...
[ "@", "SuppressWarnings", "(", "\"StatementWithEmptyBody\"", ")", "private", "static", "int", "calculateOverlay", "(", "FigletFont", "figletFont", ",", "char", "[", "]", "[", "]", "char1", ",", "char", "[", "]", "[", "]", "char2", ")", "{", "if", "(", "figl...
Workouts the amount of characters that can be smushed across all lines. @param figletFont Font definition @param char1 Message so far @param char2 Char to be added @return Maximum overlay across all lines
[ "Workouts", "the", "amount", "of", "characters", "that", "can", "be", "smushed", "across", "all", "lines", "." ]
fc98c13622d753219267a2a8b5800cead198ebc9
https://github.com/lalyos/jfiglet/blob/fc98c13622d753219267a2a8b5800cead198ebc9/src/main/java/com/github/lalyos/jfiglet/Smushing.java#L105-L137
105,632
lalyos/jfiglet
src/main/java/com/github/lalyos/jfiglet/FigletFont.java
FigletFont.getCharLineString
public String getCharLineString(int c, int l) { if (font[c][l] == null) return null; else { return new String(font[c][l]).replace(hardblank, ' '); } }
java
public String getCharLineString(int c, int l) { if (font[c][l] == null) return null; else { return new String(font[c][l]).replace(hardblank, ' '); } }
[ "public", "String", "getCharLineString", "(", "int", "c", ",", "int", "l", ")", "{", "if", "(", "font", "[", "c", "]", "[", "l", "]", "==", "null", ")", "return", "null", ";", "else", "{", "return", "new", "String", "(", "font", "[", "c", "]", ...
Selects a single line from a character. @param c Character id @param l Line number @return The selected line from the character
[ "Selects", "a", "single", "line", "from", "a", "character", "." ]
fc98c13622d753219267a2a8b5800cead198ebc9
https://github.com/lalyos/jfiglet/blob/fc98c13622d753219267a2a8b5800cead198ebc9/src/main/java/com/github/lalyos/jfiglet/FigletFont.java#L68-L74
105,633
lucastheisen/jsch-extension
src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java
TunnelConnection.close
public void close() throws IOException { if ( session != null && session.isConnected() ) { session.disconnect(); } session = null; // unnecessary, but seems right to undo what we did for ( Tunnel tunnel : tunnels ) { tunnel.setAssignedLocalPort( 0 ); ...
java
public void close() throws IOException { if ( session != null && session.isConnected() ) { session.disconnect(); } session = null; // unnecessary, but seems right to undo what we did for ( Tunnel tunnel : tunnels ) { tunnel.setAssignedLocalPort( 0 ); ...
[ "public", "void", "close", "(", ")", "throws", "IOException", "{", "if", "(", "session", "!=", "null", "&&", "session", ".", "isConnected", "(", ")", ")", "{", "session", ".", "disconnect", "(", ")", ";", "}", "session", "=", "null", ";", "// unnecessa...
Closes the underlying ssh session causing all tunnels to be closed.
[ "Closes", "the", "underlying", "ssh", "session", "causing", "all", "tunnels", "to", "be", "closed", "." ]
3c5bfae84d63e8632828a10721f2e605b68d749a
https://github.com/lucastheisen/jsch-extension/blob/3c5bfae84d63e8632828a10721f2e605b68d749a/src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java#L90-L100
105,634
lucastheisen/jsch-extension
src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java
TunnelConnection.open
public void open() throws JSchException { if ( isOpen() ) { return; } session = sessionFactory.newSession(); logger.debug( "connecting session" ); session.connect(); for ( Tunnel tunnel : tunnels ) { int assignedPort = 0; if ( tunnel....
java
public void open() throws JSchException { if ( isOpen() ) { return; } session = sessionFactory.newSession(); logger.debug( "connecting session" ); session.connect(); for ( Tunnel tunnel : tunnels ) { int assignedPort = 0; if ( tunnel....
[ "public", "void", "open", "(", ")", "throws", "JSchException", "{", "if", "(", "isOpen", "(", ")", ")", "{", "return", ";", "}", "session", "=", "sessionFactory", ".", "newSession", "(", ")", ";", "logger", ".", "debug", "(", "\"connecting session\"", ")...
Opens a session and connects all of the tunnels. @throws JSchException If unable to connect
[ "Opens", "a", "session", "and", "connects", "all", "of", "the", "tunnels", "." ]
3c5bfae84d63e8632828a10721f2e605b68d749a
https://github.com/lucastheisen/jsch-extension/blob/3c5bfae84d63e8632828a10721f2e605b68d749a/src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java#L142-L170
105,635
lucastheisen/jsch-extension
src/main/java/com/pastdev/jsch/SessionManager.java
SessionManager.getSession
public Session getSession() throws JSchException { if ( session == null || !session.isConnected() ) { logger.debug( "getting new session from factory session" ); session = sessionFactory.newSession(); logger.debug( "connecting session" ); session.connect(); ...
java
public Session getSession() throws JSchException { if ( session == null || !session.isConnected() ) { logger.debug( "getting new session from factory session" ); session = sessionFactory.newSession(); logger.debug( "connecting session" ); session.connect(); ...
[ "public", "Session", "getSession", "(", ")", "throws", "JSchException", "{", "if", "(", "session", "==", "null", "||", "!", "session", ".", "isConnected", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"getting new session from factory session\"", ")", ";"...
Returns a connected session. @return A connected session @throws JSchException If unable to connect the session
[ "Returns", "a", "connected", "session", "." ]
3c5bfae84d63e8632828a10721f2e605b68d749a
https://github.com/lucastheisen/jsch-extension/blob/3c5bfae84d63e8632828a10721f2e605b68d749a/src/main/java/com/pastdev/jsch/SessionManager.java#L54-L62
105,636
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java
InputFactory.decompressWith7Zip
private static InputStreamReader decompressWith7Zip(final String archivePath) throws ConfigurationException { PATH_PROGRAM_7ZIP = (String) config .getConfigParameter(ConfigurationKeys.PATH_PROGRAM_7ZIP); if (PATH_PROGRAM_7ZIP == null) { throw ErrorFactory .createConfigurationException(ErrorKeys.CON...
java
private static InputStreamReader decompressWith7Zip(final String archivePath) throws ConfigurationException { PATH_PROGRAM_7ZIP = (String) config .getConfigParameter(ConfigurationKeys.PATH_PROGRAM_7ZIP); if (PATH_PROGRAM_7ZIP == null) { throw ErrorFactory .createConfigurationException(ErrorKeys.CON...
[ "private", "static", "InputStreamReader", "decompressWith7Zip", "(", "final", "String", "archivePath", ")", "throws", "ConfigurationException", "{", "PATH_PROGRAM_7ZIP", "=", "(", "String", ")", "config", ".", "getConfigParameter", "(", "ConfigurationKeys", ".", "PATH_P...
Starts a decompression process using the 7Zip program. @param archivePath path to the archive @return InputStreamReader @throws ConfigurationException if an error occurred while accessing the configuration
[ "Starts", "a", "decompression", "process", "using", "the", "7Zip", "program", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java#L92-L114
105,637
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java
InputFactory.decompressWithBZip2
private static InputStreamReader decompressWithBZip2( final String archivePath) throws ConfigurationException { Bzip2Archiver archiver = new Bzip2Archiver(); InputStreamReader reader = null; try { reader = archiver.getDecompressionStream(archivePath, WIKIPEDIA_ENCODING); } catch (IOException e) { ...
java
private static InputStreamReader decompressWithBZip2( final String archivePath) throws ConfigurationException { Bzip2Archiver archiver = new Bzip2Archiver(); InputStreamReader reader = null; try { reader = archiver.getDecompressionStream(archivePath, WIKIPEDIA_ENCODING); } catch (IOException e) { ...
[ "private", "static", "InputStreamReader", "decompressWithBZip2", "(", "final", "String", "archivePath", ")", "throws", "ConfigurationException", "{", "Bzip2Archiver", "archiver", "=", "new", "Bzip2Archiver", "(", ")", ";", "InputStreamReader", "reader", "=", "null", "...
Starts a decompression process using the BZip2 program. @param archivePath path to the archive @return InputStreamReader @throws ConfigurationException if an error occurred while accessing the configuration
[ "Starts", "a", "decompression", "process", "using", "the", "BZip2", "program", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java#L126-L142
105,638
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java
InputFactory.readXMLFile
private static InputStreamReader readXMLFile(final String archivePath) { try { return new InputStreamReader(new BufferedInputStream(new FileInputStream(archivePath)), WIKIPEDIA_ENCODING); } catch (Exception e) { throw new RuntimeException(e); } }
java
private static InputStreamReader readXMLFile(final String archivePath) { try { return new InputStreamReader(new BufferedInputStream(new FileInputStream(archivePath)), WIKIPEDIA_ENCODING); } catch (Exception e) { throw new RuntimeException(e); } }
[ "private", "static", "InputStreamReader", "readXMLFile", "(", "final", "String", "archivePath", ")", "{", "try", "{", "return", "new", "InputStreamReader", "(", "new", "BufferedInputStream", "(", "new", "FileInputStream", "(", "archivePath", ")", ")", ",", "WIKIPE...
Creates a reader for the xml file. @param archivePath path to the xml file @return InputStreamReader
[ "Creates", "a", "reader", "for", "the", "xml", "file", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java#L151-L162
105,639
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java
InputFactory.getTaskReader
public static ArticleReaderInterface getTaskReader( final ArchiveDescription archive) throws ConfigurationException, ArticleReaderException { Reader reader = null; switch (archive.getType()) { case XML: reader = readXMLFile(archive.getPath()); break; case SEVENZIP: reader = decompressWith7Zip(ar...
java
public static ArticleReaderInterface getTaskReader( final ArchiveDescription archive) throws ConfigurationException, ArticleReaderException { Reader reader = null; switch (archive.getType()) { case XML: reader = readXMLFile(archive.getPath()); break; case SEVENZIP: reader = decompressWith7Zip(ar...
[ "public", "static", "ArticleReaderInterface", "getTaskReader", "(", "final", "ArchiveDescription", "archive", ")", "throws", "ConfigurationException", ",", "ArticleReaderException", "{", "Reader", "reader", "=", "null", ";", "switch", "(", "archive", ".", "getType", "...
Returns an ArticleReader which reads the specified input file. @param archive input file @return ArticleReaderInterface @throws ConfigurationException if an error occurred while accessing the configuration @throws ArticleReaderException if an error occurred while parsing the file
[ "Returns", "an", "ArticleReader", "which", "reads", "the", "specified", "input", "file", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/InputFactory.java#L176-L201
105,640
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/ConfigMenuBar.java
ConfigMenuBar.createSystemMenu
private void createSystemMenu() { JMenu system = new JMenu("System"); JMenuItem importConfig = new JMenuItem("Import Configuration"); importConfig.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { controller.loadConfiguration(); } }); s...
java
private void createSystemMenu() { JMenu system = new JMenu("System"); JMenuItem importConfig = new JMenuItem("Import Configuration"); importConfig.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { controller.loadConfiguration(); } }); s...
[ "private", "void", "createSystemMenu", "(", ")", "{", "JMenu", "system", "=", "new", "JMenu", "(", "\"System\"", ")", ";", "JMenuItem", "importConfig", "=", "new", "JMenuItem", "(", "\"Import Configuration\"", ")", ";", "importConfig", ".", "addActionListener", ...
Creates the System menu and its menu items.
[ "Creates", "the", "System", "menu", "and", "its", "menu", "items", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/ConfigMenuBar.java#L60-L119
105,641
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java
ConfigSettings.setConfigParameter
public void setConfigParameter(final ConfigurationKeys key, Object value) { // before setting parameter, check if paths have trailing File.separator if (key == ConfigurationKeys.LOGGING_PATH_DEBUG || key == ConfigurationKeys.LOGGING_PATH_DIFFTOOL || key == ConfigurationKeys.PATH_OUTPUT_SQL_FILES) { Str...
java
public void setConfigParameter(final ConfigurationKeys key, Object value) { // before setting parameter, check if paths have trailing File.separator if (key == ConfigurationKeys.LOGGING_PATH_DEBUG || key == ConfigurationKeys.LOGGING_PATH_DIFFTOOL || key == ConfigurationKeys.PATH_OUTPUT_SQL_FILES) { Str...
[ "public", "void", "setConfigParameter", "(", "final", "ConfigurationKeys", "key", ",", "Object", "value", ")", "{", "// before setting parameter, check if paths have trailing File.separator", "if", "(", "key", "==", "ConfigurationKeys", ".", "LOGGING_PATH_DEBUG", "||", "key...
Assigns the given value to the the given key. @param key configuration key @param value value
[ "Assigns", "the", "given", "value", "to", "the", "the", "given", "key", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java#L138-L155
105,642
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java
ConfigSettings.getConfigParameter
public Object getConfigParameter(final ConfigurationKeys configParameter) { if (this.parameterMap.containsKey(configParameter)) { return this.parameterMap.get(configParameter); } return null; }
java
public Object getConfigParameter(final ConfigurationKeys configParameter) { if (this.parameterMap.containsKey(configParameter)) { return this.parameterMap.get(configParameter); } return null; }
[ "public", "Object", "getConfigParameter", "(", "final", "ConfigurationKeys", "configParameter", ")", "{", "if", "(", "this", ".", "parameterMap", ".", "containsKey", "(", "configParameter", ")", ")", "{", "return", "this", ".", "parameterMap", ".", "get", "(", ...
Returns the value related to the configuration key or null if the key is not contained. @param configParameter configuration key @return value or null
[ "Returns", "the", "value", "related", "to", "the", "configuration", "key", "or", "null", "if", "the", "key", "is", "not", "contained", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java#L165-L172
105,643
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java
ConfigSettings.defaultConfiguration
public void defaultConfiguration() { clear(); setConfigParameter(ConfigurationKeys.VALUE_MINIMUM_LONGEST_COMMON_SUBSTRING, 12); setConfigParameter(ConfigurationKeys.COUNTER_FULL_REVISION, 1000); setConfigParameter(ConfigurationKeys.LIMIT_TASK_SIZE_REVISIONS, 5000000l); setConfigParameter(ConfigurationKey...
java
public void defaultConfiguration() { clear(); setConfigParameter(ConfigurationKeys.VALUE_MINIMUM_LONGEST_COMMON_SUBSTRING, 12); setConfigParameter(ConfigurationKeys.COUNTER_FULL_REVISION, 1000); setConfigParameter(ConfigurationKeys.LIMIT_TASK_SIZE_REVISIONS, 5000000l); setConfigParameter(ConfigurationKey...
[ "public", "void", "defaultConfiguration", "(", ")", "{", "clear", "(", ")", ";", "setConfigParameter", "(", "ConfigurationKeys", ".", "VALUE_MINIMUM_LONGEST_COMMON_SUBSTRING", ",", "12", ")", ";", "setConfigParameter", "(", "ConfigurationKeys", ".", "COUNTER_FULL_REVISI...
Applies the default single thread configuration of the DiffTool to this settings.
[ "Applies", "the", "default", "single", "thread", "configuration", "of", "the", "DiffTool", "to", "this", "settings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java#L178-L222
105,644
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java
ConfigSettings.loadConfig
public void loadConfig(final String path) { try { ConfigurationReader reader = new ConfigurationReader(path); ConfigSettings settings = reader.read(); clear(); this.type = settings.type; this.parameterMap = settings.parameterMap; this.archives = settings.archives; } catch (Exception e) { ...
java
public void loadConfig(final String path) { try { ConfigurationReader reader = new ConfigurationReader(path); ConfigSettings settings = reader.read(); clear(); this.type = settings.type; this.parameterMap = settings.parameterMap; this.archives = settings.archives; } catch (Exception e) { ...
[ "public", "void", "loadConfig", "(", "final", "String", "path", ")", "{", "try", "{", "ConfigurationReader", "reader", "=", "new", "ConfigurationReader", "(", "path", ")", ";", "ConfigSettings", "settings", "=", "reader", ".", "read", "(", ")", ";", "clear",...
Loads the configuration settings from a file. @param path path to the configuration file
[ "Loads", "the", "configuration", "settings", "from", "a", "file", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigSettings.java#L250-L267
105,645
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/exceptions/ErrorFactory.java
ErrorFactory.createConfigurationException
public static ConfigurationException createConfigurationException( final ErrorKeys errorId, final String message) { return new ConfigurationException(errorId.toString() + ":\r\n" + message); }
java
public static ConfigurationException createConfigurationException( final ErrorKeys errorId, final String message) { return new ConfigurationException(errorId.toString() + ":\r\n" + message); }
[ "public", "static", "ConfigurationException", "createConfigurationException", "(", "final", "ErrorKeys", "errorId", ",", "final", "String", "message", ")", "{", "return", "new", "ConfigurationException", "(", "errorId", ".", "toString", "(", ")", "+", "\":\\r\\n\"", ...
Creates a ConfigurationException object. @param errorId reference to the error identifier @param message additional error message @return ConfigurationException
[ "Creates", "a", "ConfigurationException", "object", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/exceptions/ErrorFactory.java#L97-L103
105,646
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/exceptions/ErrorFactory.java
ErrorFactory.createLoggingException
public static LoggingException createLoggingException( final ErrorKeys errorId, final Exception e) { return new LoggingException(errorId.toString(), e); }
java
public static LoggingException createLoggingException( final ErrorKeys errorId, final Exception e) { return new LoggingException(errorId.toString(), e); }
[ "public", "static", "LoggingException", "createLoggingException", "(", "final", "ErrorKeys", "errorId", ",", "final", "Exception", "e", ")", "{", "return", "new", "LoggingException", "(", "errorId", ".", "toString", "(", ")", ",", "e", ")", ";", "}" ]
Creates a LoggingException object. @param errorId reference to the error identifier @param e inner exception @return LoggingException
[ "Creates", "a", "LoggingException", "object", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/exceptions/ErrorFactory.java#L153-L158
105,647
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.read
public ConfigSettings read() { ConfigSettings config = new ConfigSettings(ConfigEnum.IMPORT); String name; Node node; NodeList list = root.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { node = list.item(i); name = node.getNodeName().toUpperCase(); if (name....
java
public ConfigSettings read() { ConfigSettings config = new ConfigSettings(ConfigEnum.IMPORT); String name; Node node; NodeList list = root.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { node = list.item(i); name = node.getNodeName().toUpperCase(); if (name....
[ "public", "ConfigSettings", "read", "(", ")", "{", "ConfigSettings", "config", "=", "new", "ConfigSettings", "(", "ConfigEnum", ".", "IMPORT", ")", ";", "String", "name", ";", "Node", "node", ";", "NodeList", "list", "=", "root", ".", "getChildNodes", "(", ...
Reads the input of the configuration file and parses the into the ConfigSettings object. @return ConfigSettings
[ "Reads", "the", "input", "of", "the", "configuration", "file", "and", "parses", "the", "into", "the", "ConfigSettings", "object", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L212-L254
105,648
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseFilterConfig
private void parseFilterConfig(final Node node, final ConfigSettings config) { String name; Node nnode; final NodeList list = node.getChildNodes(); final int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equ...
java
private void parseFilterConfig(final Node node, final ConfigSettings config) { String name; Node nnode; final NodeList list = node.getChildNodes(); final int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equ...
[ "private", "void", "parseFilterConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "Node", "nnode", ";", "final", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";", "final", "...
Parses the filter parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "filter", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L265-L283
105,649
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseNamespaceFilterConfig
private void parseNamespaceFilterConfig(final Node node, final ConfigSettings config) { String name; Integer value; Node nnode; final NodeList list = node.getChildNodes(); final int length = list.getLength(); final Set<Integer> namespaces = new HashSet<Integer>(); for (int i = 0; i < length; i++) { nn...
java
private void parseNamespaceFilterConfig(final Node node, final ConfigSettings config) { String name; Integer value; Node nnode; final NodeList list = node.getChildNodes(); final int length = list.getLength(); final Set<Integer> namespaces = new HashSet<Integer>(); for (int i = 0; i < length; i++) { nn...
[ "private", "void", "parseNamespaceFilterConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "Integer", "value", ";", "Node", "nnode", ";", "final", "NodeList", "list", "=", "node", ".", "getChildNod...
Parses the namespaces parameter section. This is the subsection of filter. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "namespaces", "parameter", "section", ".", "This", "is", "the", "subsection", "of", "filter", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L293-L320
105,650
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseModeConfig
private void parseModeConfig(final Node node, final ConfigSettings config) { String name; Integer value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.e...
java
private void parseModeConfig(final Node node, final ConfigSettings config) { String name; Integer value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.e...
[ "private", "void", "parseModeConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "Integer", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", "...
Parses the mode parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "mode", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L331-L362
105,651
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseExternalsConfig
private void parseExternalsConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equ...
java
private void parseExternalsConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equ...
[ "private", "void", "parseExternalsConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ",", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";", "i...
Parses the externals parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "externals", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L372-L395
105,652
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseInputConfig
private void parseInputConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equals(KEY...
java
private void parseInputConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equals(KEY...
[ "private", "void", "parseInputConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ",", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";", "int",...
Parses the input parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "input", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L405-L438
105,653
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseInputArchive
private void parseInputArchive(final Node node, final ConfigSettings config) { String name; InputType type = null; String path = null; long startPosition = 0; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i);...
java
private void parseInputArchive(final Node node, final ConfigSettings config) { String name; InputType type = null; String path = null; long startPosition = 0; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i);...
[ "private", "void", "parseInputArchive", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "InputType", "type", "=", "null", ";", "String", "path", "=", "null", ";", "long", "startPosition", "=", "0", "...
Parses the input archive subsection. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "input", "archive", "subsection", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L448-L495
105,654
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseOutputConfig
private void parseOutputConfig(final Node node, final ConfigSettings config) { String name; Long lValue; Boolean bValue; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCas...
java
private void parseOutputConfig(final Node node, final ConfigSettings config) { String name; Long lValue; Boolean bValue; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCas...
[ "private", "void", "parseOutputConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "Long", "lValue", ";", "Boolean", "bValue", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "g...
Parses the output parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "output", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L505-L579
105,655
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseSQLConfig
private void parseSQLConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equals(KEY_H...
java
private void parseSQLConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.equals(KEY_H...
[ "private", "void", "parseSQLConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ",", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";", "int", ...
Parses the sql parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "sql", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L589-L625
105,656
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseCacheConfig
private void parseCacheConfig(final Node node, final ConfigSettings config) { String name; Long lValue; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.eq...
java
private void parseCacheConfig(final Node node, final ConfigSettings config) { String name; Long lValue; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.eq...
[ "private", "void", "parseCacheConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "Long", "lValue", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";...
Parses the cache parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "cache", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L635-L674
105,657
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseLoggingConfig
private void parseLoggingConfig(final Node node, final ConfigSettings config) { String name; String value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name...
java
private void parseLoggingConfig(final Node node, final ConfigSettings config) { String name; String value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name...
[ "private", "void", "parseLoggingConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "String", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ...
Parses the logging parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "logging", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L684-L713
105,658
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseLoggerConfig
private void parseLoggerConfig(final Node node, final ConfigSettings config, final ConfigurationKeys logPath, final ConfigurationKeys logLevel) { String name, value; Level level; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { n...
java
private void parseLoggerConfig(final Node node, final ConfigSettings config, final ConfigurationKeys logPath, final ConfigurationKeys logLevel) { String name, value; Level level; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { n...
[ "private", "void", "parseLoggerConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ",", "final", "ConfigurationKeys", "logPath", ",", "final", "ConfigurationKeys", "logLevel", ")", "{", "String", "name", ",", "value", ";", "Level", "...
Parses the information for a logger. @param node Reference to the current used xml node @param config Reference to the ConfigSettings @param logPath Key for the path of this logger. @param logLevel Key for the level of this logger.
[ "Parses", "the", "information", "for", "a", "logger", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L727-L756
105,659
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseDebugConfig
private void parseDebugConfig(final Node node, final ConfigSettings config) { String name; Boolean value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name....
java
private void parseDebugConfig(final Node node, final ConfigSettings config) { String name; Boolean value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name....
[ "private", "void", "parseDebugConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ";", "Boolean", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ...
Parses the debug parameter section. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "debug", "parameter", "section", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L766-L809
105,660
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java
ConfigurationReader.parseDebugOutputConfig
private void parseDebugOutputConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.e...
java
private void parseDebugOutputConfig(final Node node, final ConfigSettings config) { String name, value; Node nnode; NodeList list = node.getChildNodes(); int length = list.getLength(); for (int i = 0; i < length; i++) { nnode = list.item(i); name = nnode.getNodeName().toUpperCase(); if (name.e...
[ "private", "void", "parseDebugOutputConfig", "(", "final", "Node", "node", ",", "final", "ConfigSettings", "config", ")", "{", "String", "name", ",", "value", ";", "Node", "nnode", ";", "NodeList", "list", "=", "node", ".", "getChildNodes", "(", ")", ";", ...
Parses the debug output parameter subsection. @param node Reference to the current used xml node @param config Reference to the ConfigSettings
[ "Parses", "the", "debug", "output", "parameter", "subsection", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationReader.java#L819-L849
105,661
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/NestedListContainer.java
NestedListContainer.getNestedList
public NestedList getNestedList(int i){ if( i<lists.size() ) return lists.get(i); else return null; }
java
public NestedList getNestedList(int i){ if( i<lists.size() ) return lists.get(i); else return null; }
[ "public", "NestedList", "getNestedList", "(", "int", "i", ")", "{", "if", "(", "i", "<", "lists", ".", "size", "(", ")", ")", "return", "lists", ".", "get", "(", "i", ")", ";", "else", "return", "null", ";", "}" ]
Returns the NestedListContainer or NestedListElement at Positon i.
[ "Returns", "the", "NestedListContainer", "or", "NestedListElement", "at", "Positon", "i", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/NestedListContainer.java#L46-L49
105,662
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/LetterNode.java
LetterNode.add
public void add(final String word, final V value) { char c = word.charAt(0); LetterNode<V> node = get(c); if (node == null) { node = new LetterNode<V>(this.word + c); } this.nodes.put(c, node); if (word.length() == 1) { node.isKeyword = true; node.value = value; return; } node.add(word....
java
public void add(final String word, final V value) { char c = word.charAt(0); LetterNode<V> node = get(c); if (node == null) { node = new LetterNode<V>(this.word + c); } this.nodes.put(c, node); if (word.length() == 1) { node.isKeyword = true; node.value = value; return; } node.add(word....
[ "public", "void", "add", "(", "final", "String", "word", ",", "final", "V", "value", ")", "{", "char", "c", "=", "word", ".", "charAt", "(", "0", ")", ";", "LetterNode", "<", "V", ">", "node", "=", "get", "(", "c", ")", ";", "if", "(", "node", ...
Adds a word and its related value. @param word keyword @param value related value
[ "Adds", "a", "word", "and", "its", "related", "value", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/common/util/LetterNode.java#L77-L95
105,663
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/diff/calculation/DiffBlock.java
DiffBlock.compareTo
public int compareTo(final DiffBlock b) { if (ab) { return this.revAStart - b.revAStart; } else { return this.revBStart - b.revBStart; } }
java
public int compareTo(final DiffBlock b) { if (ab) { return this.revAStart - b.revAStart; } else { return this.revBStart - b.revBStart; } }
[ "public", "int", "compareTo", "(", "final", "DiffBlock", "b", ")", "{", "if", "(", "ab", ")", "{", "return", "this", ".", "revAStart", "-", "b", ".", "revAStart", ";", "}", "else", "{", "return", "this", ".", "revBStart", "-", "b", ".", "revBStart", ...
Compares the positions of both blocks. @param b Block
[ "Compares", "the", "positions", "of", "both", "blocks", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/diff/calculation/DiffBlock.java#L84-L92
105,664
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationManager.java
ConfigurationManager.getInstance
public static ConfigurationManager getInstance() throws ConfigurationException { if (instance == null) { throw ErrorFactory .createConfigurationException(ErrorKeys.CONFIGURATION_CONFIGURATIONMANAGER_NOT_INITIALIZED); } return instance; }
java
public static ConfigurationManager getInstance() throws ConfigurationException { if (instance == null) { throw ErrorFactory .createConfigurationException(ErrorKeys.CONFIGURATION_CONFIGURATIONMANAGER_NOT_INITIALIZED); } return instance; }
[ "public", "static", "ConfigurationManager", "getInstance", "(", ")", "throws", "ConfigurationException", "{", "if", "(", "instance", "==", "null", ")", "{", "throw", "ErrorFactory", ".", "createConfigurationException", "(", "ErrorKeys", ".", "CONFIGURATION_CONFIGURATION...
Returns the reference to the instance of the ConfigurationManager. @return ConfigurationManager @throws ConfigurationException if the ConfigurationManager has not been created during the startup of the application.
[ "Returns", "the", "reference", "to", "the", "instance", "of", "the", "ConfigurationManager", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationManager.java#L50-L59
105,665
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationManager.java
ConfigurationManager.getConfigParameter
public Object getConfigParameter(final ConfigurationKeys configParameter) throws ConfigurationException { Object o = this.config.getConfigParameter(configParameter); if (o != null) { return o; } //return standard values for some of the parameters if they //are not set in the configuration //this is ...
java
public Object getConfigParameter(final ConfigurationKeys configParameter) throws ConfigurationException { Object o = this.config.getConfigParameter(configParameter); if (o != null) { return o; } //return standard values for some of the parameters if they //are not set in the configuration //this is ...
[ "public", "Object", "getConfigParameter", "(", "final", "ConfigurationKeys", "configParameter", ")", "throws", "ConfigurationException", "{", "Object", "o", "=", "this", ".", "config", ".", "getConfigParameter", "(", "configParameter", ")", ";", "if", "(", "o", "!...
Returns the value of the configuration parameter. @param configParameter Key for the configuration parameter. @return Value of the configuration parameter @throws ConfigurationException if the configuration value was not defined or was not set.
[ "Returns", "the", "value", "of", "the", "configuration", "parameter", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/ConfigurationManager.java#L97-L143
105,666
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.tutorial/src/main/java/de/tudarmstadt/ukp/wikipedia/tutorial/parser/T6_NestedLists.java
T6_NestedLists.outputNestedList
public static String outputNestedList(NestedList nl, int depth){ String result = ""; if(nl == null) { return result; // If null return empty string } for(int i = 0; i<depth; i++) { result += " "; // insert indentation according to depth } if(nl.getClass() == NestedListElement.class){ // If it...
java
public static String outputNestedList(NestedList nl, int depth){ String result = ""; if(nl == null) { return result; // If null return empty string } for(int i = 0; i<depth; i++) { result += " "; // insert indentation according to depth } if(nl.getClass() == NestedListElement.class){ // If it...
[ "public", "static", "String", "outputNestedList", "(", "NestedList", "nl", ",", "int", "depth", ")", "{", "String", "result", "=", "\"\"", ";", "if", "(", "nl", "==", "null", ")", "{", "return", "result", ";", "// If null return empty string", "}", "for", ...
Returns String with all elements of a NestedList @param nl NestedList @param depth Current depth of the Nestedlist @return
[ "Returns", "String", "with", "all", "elements", "of", "a", "NestedList" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.tutorial/src/main/java/de/tudarmstadt/ukp/wikipedia/tutorial/parser/T6_NestedLists.java#L71-L95
105,667
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/writer/SQLDatabaseWriter.java
SQLDatabaseWriter.writeHeader
private void writeHeader() throws SQLException { Statement query; String[] revTableHeaderQueries; revTableHeaderQueries = sqlEncoder.getTable(); //commit revision table header for (String revTableHeaderQuery : revTableHeaderQueries) { query = connection.createStatement(); query.executeUpdate(revT...
java
private void writeHeader() throws SQLException { Statement query; String[] revTableHeaderQueries; revTableHeaderQueries = sqlEncoder.getTable(); //commit revision table header for (String revTableHeaderQuery : revTableHeaderQueries) { query = connection.createStatement(); query.executeUpdate(revT...
[ "private", "void", "writeHeader", "(", ")", "throws", "SQLException", "{", "Statement", "query", ";", "String", "[", "]", "revTableHeaderQueries", ";", "revTableHeaderQueries", "=", "sqlEncoder", ".", "getTable", "(", ")", ";", "//commit revision table header", "for...
Retrieves the encoded sql orders and executes them. @throws SQLException if an error occurred while accessing the database
[ "Retrieves", "the", "encoded", "sql", "orders", "and", "executes", "them", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/writer/SQLDatabaseWriter.java#L213-L230
105,668
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java
Bzip2Archiver.compress
public void compress(String path) { try { File fileToArchive = new File(path); BufferedInputStream input = new BufferedInputStream(new FileInputStream(fileToArchive)); File archivedFile = new File(fileToArchive.getName() + ".bz2"); archivedFile.createNewFile(); FileOutputStream fos = new FileOutpu...
java
public void compress(String path) { try { File fileToArchive = new File(path); BufferedInputStream input = new BufferedInputStream(new FileInputStream(fileToArchive)); File archivedFile = new File(fileToArchive.getName() + ".bz2"); archivedFile.createNewFile(); FileOutputStream fos = new FileOutpu...
[ "public", "void", "compress", "(", "String", "path", ")", "{", "try", "{", "File", "fileToArchive", "=", "new", "File", "(", "path", ")", ";", "BufferedInputStream", "input", "=", "new", "BufferedInputStream", "(", "new", "FileInputStream", "(", "fileToArchive...
Creates bz2 archive file from file in path @param path to file to compress
[ "Creates", "bz2", "archive", "file", "from", "file", "in", "path" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java#L52-L91
105,669
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java
Bzip2Archiver.getCompressionStream
public OutputStream getCompressionStream(String path) throws IOException { File archivedFile = new File(path); archivedFile.createNewFile(); FileOutputStream fos = new FileOutputStream(archivedFile); BufferedOutputStream bufStr = new BufferedOutputStream(fos); // added bzip2 prefix fos.write("BZ".getB...
java
public OutputStream getCompressionStream(String path) throws IOException { File archivedFile = new File(path); archivedFile.createNewFile(); FileOutputStream fos = new FileOutputStream(archivedFile); BufferedOutputStream bufStr = new BufferedOutputStream(fos); // added bzip2 prefix fos.write("BZ".getB...
[ "public", "OutputStream", "getCompressionStream", "(", "String", "path", ")", "throws", "IOException", "{", "File", "archivedFile", "=", "new", "File", "(", "path", ")", ";", "archivedFile", ".", "createNewFile", "(", ")", ";", "FileOutputStream", "fos", "=", ...
Creates stream for compression @param path path to file to compress @return compression stream @throws IOException
[ "Creates", "stream", "for", "compression" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java#L101-L116
105,670
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java
Bzip2Archiver.getDecompressionStream
public InputStreamReader getDecompressionStream(String path, String encoding) throws IOException { File fileToUncompress = new File(path); BufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(fileToUncompress)); // read bzip2 prefix: BZ fileStream.read(); fileStream.read(); Buf...
java
public InputStreamReader getDecompressionStream(String path, String encoding) throws IOException { File fileToUncompress = new File(path); BufferedInputStream fileStream = new BufferedInputStream(new FileInputStream(fileToUncompress)); // read bzip2 prefix: BZ fileStream.read(); fileStream.read(); Buf...
[ "public", "InputStreamReader", "getDecompressionStream", "(", "String", "path", ",", "String", "encoding", ")", "throws", "IOException", "{", "File", "fileToUncompress", "=", "new", "File", "(", "path", ")", ";", "BufferedInputStream", "fileStream", "=", "new", "B...
Creates Stream for decompression @param path path to file to uncompress @param encoding ecoding to use @return decompression stream @throws IOException
[ "Creates", "Stream", "for", "decompression" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java#L128-L145
105,671
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java
Bzip2Archiver.decompress
public void decompress(String path) throws IOException { File bzip2 = new File(path); // File unarchived = new File(bzip2.getName().replace(".bz2", "")); unarchived.createNewFile(); BufferedInputStream inputStr = new BufferedInputStream(new FileInputStream(bzip2)); // read bzip2 prefix inputStr.rea...
java
public void decompress(String path) throws IOException { File bzip2 = new File(path); // File unarchived = new File(bzip2.getName().replace(".bz2", "")); unarchived.createNewFile(); BufferedInputStream inputStr = new BufferedInputStream(new FileInputStream(bzip2)); // read bzip2 prefix inputStr.rea...
[ "public", "void", "decompress", "(", "String", "path", ")", "throws", "IOException", "{", "File", "bzip2", "=", "new", "File", "(", "path", ")", ";", "//", "File", "unarchived", "=", "new", "File", "(", "bzip2", ".", "getName", "(", ")", ".", "replace"...
Uncompress bz2 file @param path path to file to uncompress @throws IOException
[ "Uncompress", "bz2", "file" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/archivers/Bzip2Archiver.java#L154-L191
105,672
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/indices/ArticleIndex.java
ArticleIndex.add
public void add(final int currentArticleID, final long startTime, final long endTime, final List<ArticleIndexData> infoList) { // index_articleID_rc_ts if (!infoList.isEmpty()) { StringBuilder fullRevBuffer = new StringBuilder(); StringBuilder revCountBuffer = new StringBuilder(); boolean first = tr...
java
public void add(final int currentArticleID, final long startTime, final long endTime, final List<ArticleIndexData> infoList) { // index_articleID_rc_ts if (!infoList.isEmpty()) { StringBuilder fullRevBuffer = new StringBuilder(); StringBuilder revCountBuffer = new StringBuilder(); boolean first = tr...
[ "public", "void", "add", "(", "final", "int", "currentArticleID", ",", "final", "long", "startTime", ",", "final", "long", "endTime", ",", "final", "List", "<", "ArticleIndexData", ">", "infoList", ")", "{", "// index_articleID_rc_ts", "if", "(", "!", "infoLis...
Adds the information for an new entry in the article index. @param currentArticleID ID of the currently used article @param startTime First date of appearance @param endTime Last date of appearance @param infoList List of revision blocks
[ "Adds", "the", "information", "for", "an", "new", "entry", "in", "the", "article", "index", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/indices/ArticleIndex.java#L64-L126
105,673
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java
EmptyStructureRemover.eliminateEmptyStructures
public static SectionContainer eliminateEmptyStructures( SectionContainer sc ){ for( int i=sc.nrOfSubSections()-1; i>=0; i-- ){ Section ss = sc.getSubSection( i ); if( ss.getClass() == SectionContainer.class ){ SectionContainer sci = (SectionContainer)ss; eliminateEmptyStructures( sci ); } ...
java
public static SectionContainer eliminateEmptyStructures( SectionContainer sc ){ for( int i=sc.nrOfSubSections()-1; i>=0; i-- ){ Section ss = sc.getSubSection( i ); if( ss.getClass() == SectionContainer.class ){ SectionContainer sci = (SectionContainer)ss; eliminateEmptyStructures( sci ); } ...
[ "public", "static", "SectionContainer", "eliminateEmptyStructures", "(", "SectionContainer", "sc", ")", "{", "for", "(", "int", "i", "=", "sc", ".", "nrOfSubSections", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "Section", "ss", ...
Removes all empty Structures from a SectionContainer and all substructures.
[ "Removes", "all", "empty", "Structures", "from", "a", "SectionContainer", "and", "all", "substructures", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java#L43-L69
105,674
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java
EmptyStructureRemover.eliminateEmptyStructures
public static SectionContent eliminateEmptyStructures( SectionContent sc ){ for( int i=sc.nrOfParagraphs()-1; i>=0; i-- ){ Paragraph p = sc.getParagraph(i); if( p.empty() ) sc.removeParagraph( p ); } for( int i=sc.nrOfDefinitionLists()-1; i>=0; i--){ DefinitionList dl = sc.getDefinitionList(i); el...
java
public static SectionContent eliminateEmptyStructures( SectionContent sc ){ for( int i=sc.nrOfParagraphs()-1; i>=0; i-- ){ Paragraph p = sc.getParagraph(i); if( p.empty() ) sc.removeParagraph( p ); } for( int i=sc.nrOfDefinitionLists()-1; i>=0; i--){ DefinitionList dl = sc.getDefinitionList(i); el...
[ "public", "static", "SectionContent", "eliminateEmptyStructures", "(", "SectionContent", "sc", ")", "{", "for", "(", "int", "i", "=", "sc", ".", "nrOfParagraphs", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "Paragraph", "p", "=",...
Removes all empty Structures from a SectionContent and all substructures.
[ "Removes", "all", "empty", "Structures", "from", "a", "SectionContent", "and", "all", "substructures", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java#L74-L100
105,675
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java
EmptyStructureRemover.eliminateEmptyStructures
public static NestedListContainer eliminateEmptyStructures( NestedListContainer nlc ){ for(int i=nlc.size()-1; i>=0; i--){ NestedList nl = nlc.getNestedList(i); if( nl.getClass()==NestedListContainer.class ) eliminateEmptyStructures( (NestedListContainer)nl ); if( nl.empty() )nlc.remove( nl ); }...
java
public static NestedListContainer eliminateEmptyStructures( NestedListContainer nlc ){ for(int i=nlc.size()-1; i>=0; i--){ NestedList nl = nlc.getNestedList(i); if( nl.getClass()==NestedListContainer.class ) eliminateEmptyStructures( (NestedListContainer)nl ); if( nl.empty() )nlc.remove( nl ); }...
[ "public", "static", "NestedListContainer", "eliminateEmptyStructures", "(", "NestedListContainer", "nlc", ")", "{", "for", "(", "int", "i", "=", "nlc", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "NestedList", "nl", ...
Removes all empty Structures from a NestedListContainer and all substructures.
[ "Removes", "all", "empty", "Structures", "from", "a", "NestedListContainer", "and", "all", "substructures", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java#L105-L114
105,676
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java
EmptyStructureRemover.eliminateEmptyStructures
public static Table eliminateEmptyStructures( Table t ){ for( int i=t.nrOfTableElements()-1; i>=0; i-- ){ TableElement te = t.getTableElement(i); eliminateEmptyStructures( te ); if( te.empty() ) t.removeTableElement( te ); } return t; }
java
public static Table eliminateEmptyStructures( Table t ){ for( int i=t.nrOfTableElements()-1; i>=0; i-- ){ TableElement te = t.getTableElement(i); eliminateEmptyStructures( te ); if( te.empty() ) t.removeTableElement( te ); } return t; }
[ "public", "static", "Table", "eliminateEmptyStructures", "(", "Table", "t", ")", "{", "for", "(", "int", "i", "=", "t", ".", "nrOfTableElements", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "TableElement", "te", "=", "t", "."...
Removes all empty Structures from a Table and all substructures.
[ "Removes", "all", "empty", "Structures", "from", "a", "Table", "and", "all", "substructures", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java#L119-L126
105,677
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java
EmptyStructureRemover.eliminateEmptyStructures
public static TableElement eliminateEmptyStructures( TableElement te ){ for( int i=te.nrOfSections()-1; i>=0; i--){ Section s = te.getSection(i); if( s.getClass() == SectionContainer.class ) eliminateEmptyStructures( (SectionContainer)s ); else if( s.getClass() == SectionContent.class ) eliminate...
java
public static TableElement eliminateEmptyStructures( TableElement te ){ for( int i=te.nrOfSections()-1; i>=0; i--){ Section s = te.getSection(i); if( s.getClass() == SectionContainer.class ) eliminateEmptyStructures( (SectionContainer)s ); else if( s.getClass() == SectionContent.class ) eliminate...
[ "public", "static", "TableElement", "eliminateEmptyStructures", "(", "TableElement", "te", ")", "{", "for", "(", "int", "i", "=", "te", ".", "nrOfSections", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "Section", "s", "=", "te",...
Removes all empty Structures from a TableElement and all substructures.
[ "Removes", "all", "empty", "Structures", "from", "a", "TableElement", "and", "all", "substructures", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java#L131-L143
105,678
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java
EmptyStructureRemover.eliminateEmptyStructures
public static DefinitionList eliminateEmptyStructures( DefinitionList dl ){ ContentElement dt = dl.getDefinedTerm(); if( dt!=null && dt.empty() ) dl.setDefinedTerm( null ); for(int i=dl.nrOfDefinitions()-1; i>=0; i-- ){ ContentElement ce = dl.getDefinition(i); if( ce.empty() )dl.removeDefinition( ce )...
java
public static DefinitionList eliminateEmptyStructures( DefinitionList dl ){ ContentElement dt = dl.getDefinedTerm(); if( dt!=null && dt.empty() ) dl.setDefinedTerm( null ); for(int i=dl.nrOfDefinitions()-1; i>=0; i-- ){ ContentElement ce = dl.getDefinition(i); if( ce.empty() )dl.removeDefinition( ce )...
[ "public", "static", "DefinitionList", "eliminateEmptyStructures", "(", "DefinitionList", "dl", ")", "{", "ContentElement", "dt", "=", "dl", ".", "getDefinedTerm", "(", ")", ";", "if", "(", "dt", "!=", "null", "&&", "dt", ".", "empty", "(", ")", ")", "dl", ...
Removes all empty Structures from a DefinitionList and all substructures.
[ "Removes", "all", "empty", "Structures", "from", "a", "DefinitionList", "and", "all", "substructures", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.parser/src/main/java/de/tudarmstadt/ukp/wikipedia/parser/mediawiki/EmptyStructureRemover.java#L148-L158
105,679
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java
WikipediaXMLReader.initXMLKeys
private void initXMLKeys() { this.keywords = new SingleKeywordTree<WikipediaXMLKeys>(); keywords.addKeyword(WikipediaXMLKeys.KEY_START_PAGE.getKeyword(), WikipediaXMLKeys.KEY_START_PAGE); keywords.addKeyword(WikipediaXMLKeys.KEY_END_PAGE.getKeyword(), WikipediaXMLKeys.KEY_END_PAGE); keywords.addKeywor...
java
private void initXMLKeys() { this.keywords = new SingleKeywordTree<WikipediaXMLKeys>(); keywords.addKeyword(WikipediaXMLKeys.KEY_START_PAGE.getKeyword(), WikipediaXMLKeys.KEY_START_PAGE); keywords.addKeyword(WikipediaXMLKeys.KEY_END_PAGE.getKeyword(), WikipediaXMLKeys.KEY_END_PAGE); keywords.addKeywor...
[ "private", "void", "initXMLKeys", "(", ")", "{", "this", ".", "keywords", "=", "new", "SingleKeywordTree", "<", "WikipediaXMLKeys", ">", "(", ")", ";", "keywords", ".", "addKeyword", "(", "WikipediaXMLKeys", ".", "KEY_START_PAGE", ".", "getKeyword", "(", ")", ...
Creates and initializes the xml keyword tree.
[ "Creates", "and", "initializes", "the", "xml", "keyword", "tree", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java#L145-L195
105,680
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java
WikipediaXMLReader.initNamespaces
private void initNamespaces(){ Map<Integer, String> namespaceMap = new HashMap<Integer,String>(); try{ int b = read(); this.keywords.reset(); StringBuilder buffer = null; while (b != -1) { // System.out.print((char)b); if (buffer != null) { buffer.append((char) b); } if (this.key...
java
private void initNamespaces(){ Map<Integer, String> namespaceMap = new HashMap<Integer,String>(); try{ int b = read(); this.keywords.reset(); StringBuilder buffer = null; while (b != -1) { // System.out.print((char)b); if (buffer != null) { buffer.append((char) b); } if (this.key...
[ "private", "void", "initNamespaces", "(", ")", "{", "Map", "<", "Integer", ",", "String", ">", "namespaceMap", "=", "new", "HashMap", "<", "Integer", ",", "String", ">", "(", ")", ";", "try", "{", "int", "b", "=", "read", "(", ")", ";", "this", "."...
Reads the namespaces from the siteinfo section and processes them in order to initialize the ArticleFilter
[ "Reads", "the", "namespaces", "from", "the", "siteinfo", "section", "and", "processes", "them", "in", "order", "to", "initialize", "the", "ArticleFilter" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java#L201-L261
105,681
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java
WikipediaXMLReader.readHeader
protected boolean readHeader() throws IOException, ArticleReaderException { this.taskHeader = new ArticleInformation(); int size, r = read(); StringBuilder buffer = null; while (r != -1) { if (buffer != null) { buffer.append((char) r); } if (this.keywords.check((char) r)) { switch (this...
java
protected boolean readHeader() throws IOException, ArticleReaderException { this.taskHeader = new ArticleInformation(); int size, r = read(); StringBuilder buffer = null; while (r != -1) { if (buffer != null) { buffer.append((char) r); } if (this.keywords.check((char) r)) { switch (this...
[ "protected", "boolean", "readHeader", "(", ")", "throws", "IOException", ",", "ArticleReaderException", "{", "this", ".", "taskHeader", "=", "new", "ArticleInformation", "(", ")", ";", "int", "size", ",", "r", "=", "read", "(", ")", ";", "StringBuilder", "bu...
Reads the header of an article. @return FALSE if the article was not accepted by the articleFilter TRUE if no name checker was used, or if the articleFilter accepted the ArticleName @throws IOException if an error occurs while reading from the input @throws ArticleReaderException if an error occurs while parsing the ...
[ "Reads", "the", "header", "of", "an", "article", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java#L354-L423
105,682
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java
WikipediaXMLReader.readContributor
protected void readContributor(Revision rev, String str) throws IOException, ArticleReaderException { char[] contrChars = str.toCharArray(); int size; StringBuilder buffer = null; this.keywords.reset(); for(char curChar:contrChars){ if (buffer != null) { buffer.append(curChar); } if (this.ke...
java
protected void readContributor(Revision rev, String str) throws IOException, ArticleReaderException { char[] contrChars = str.toCharArray(); int size; StringBuilder buffer = null; this.keywords.reset(); for(char curChar:contrChars){ if (buffer != null) { buffer.append(curChar); } if (this.ke...
[ "protected", "void", "readContributor", "(", "Revision", "rev", ",", "String", "str", ")", "throws", "IOException", ",", "ArticleReaderException", "{", "char", "[", "]", "contrChars", "=", "str", ".", "toCharArray", "(", ")", ";", "int", "size", ";", "String...
Parses the content within the contributor tags and adds the parsed info to the provided revision object. @param rev the revision object to store the parsed info in @param str the contributor data to be parsed @throws IOException @throws ArticleReaderException
[ "Parses", "the", "content", "within", "the", "contributor", "tags", "and", "adds", "the", "parsed", "info", "to", "the", "provided", "revision", "object", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/article/reader/WikipediaXMLReader.java#L571-L631
105,683
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java
WikipediaTemplateInfoGenerator.extractTemplates
private void extractTemplates() throws WikiApiException { PageIterator pageIter = new PageIterator(getWiki(), true, pageBuffer); RevisionApi revApi = new RevisionApi(dbConf); int pageCounter = 0; long revisionCounter =0L; while (pageIter.hasNext()) { pageCounter++; if (pageCounter % VERBOSITY == 0) ...
java
private void extractTemplates() throws WikiApiException { PageIterator pageIter = new PageIterator(getWiki(), true, pageBuffer); RevisionApi revApi = new RevisionApi(dbConf); int pageCounter = 0; long revisionCounter =0L; while (pageIter.hasNext()) { pageCounter++; if (pageCounter % VERBOSITY == 0) ...
[ "private", "void", "extractTemplates", "(", ")", "throws", "WikiApiException", "{", "PageIterator", "pageIter", "=", "new", "PageIterator", "(", "getWiki", "(", ")", ",", "true", ",", "pageBuffer", ")", ";", "RevisionApi", "revApi", "=", "new", "RevisionApi", ...
Extracts templates from pages and revisions
[ "Extracts", "templates", "from", "pages", "and", "revisions" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java#L156-L199
105,684
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java
WikipediaTemplateInfoGenerator.processPages
private void processPages() { PageIterator pageIter = new PageIterator(getWiki(), true, pageBuffer); int pageCounter = 0; while (pageIter.hasNext()) { pageCounter++; if (pageCounter % VERBOSITY == 0) { logger.info("{} pages processed ...", pageCounter); } Page curPage = pageIter.next(); in...
java
private void processPages() { PageIterator pageIter = new PageIterator(getWiki(), true, pageBuffer); int pageCounter = 0; while (pageIter.hasNext()) { pageCounter++; if (pageCounter % VERBOSITY == 0) { logger.info("{} pages processed ...", pageCounter); } Page curPage = pageIter.next(); in...
[ "private", "void", "processPages", "(", ")", "{", "PageIterator", "pageIter", "=", "new", "PageIterator", "(", "getWiki", "(", ")", ",", "true", ",", "pageBuffer", ")", ";", "int", "pageCounter", "=", "0", ";", "while", "(", "pageIter", ".", "hasNext", "...
Extracts templates from pages only
[ "Extracts", "templates", "from", "pages", "only" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java#L205-L224
105,685
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java
WikipediaTemplateInfoGenerator.processRevisions
private void processRevisions() { logger.info("Processing revisions, extracting template information ..."); RevisionIterator revisionIter=null; try{ revisionIter = new RevisionIterator(dbConf); int revCounter = 0; while (revisionIter.hasNext()) { revCounter++; if (revCounter % VERBOSITY == 0) ...
java
private void processRevisions() { logger.info("Processing revisions, extracting template information ..."); RevisionIterator revisionIter=null; try{ revisionIter = new RevisionIterator(dbConf); int revCounter = 0; while (revisionIter.hasNext()) { revCounter++; if (revCounter % VERBOSITY == 0) ...
[ "private", "void", "processRevisions", "(", ")", "{", "logger", ".", "info", "(", "\"Processing revisions, extracting template information ...\"", ")", ";", "RevisionIterator", "revisionIter", "=", "null", ";", "try", "{", "revisionIter", "=", "new", "RevisionIterator",...
Processes only revision templates using the Revision Iterator
[ "Processes", "only", "revision", "templates", "using", "the", "Revision", "Iterator" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java#L230-L262
105,686
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java
WikipediaTemplateInfoGenerator.generateTemplateIndices
private void generateTemplateIndices(WikipediaTemplateInfo info, Set<String> templateNames) { try { for (String name : templateNames) { int id = info.checkTemplateId(name); if (id != -1) { tplNameToTplId.put(name, id); } } } catch (WikiApiException e) { } }
java
private void generateTemplateIndices(WikipediaTemplateInfo info, Set<String> templateNames) { try { for (String name : templateNames) { int id = info.checkTemplateId(name); if (id != -1) { tplNameToTplId.put(name, id); } } } catch (WikiApiException e) { } }
[ "private", "void", "generateTemplateIndices", "(", "WikipediaTemplateInfo", "info", ",", "Set", "<", "String", ">", "templateNames", ")", "{", "try", "{", "for", "(", "String", "name", ":", "templateNames", ")", "{", "int", "id", "=", "info", ".", "checkTemp...
Loads existing ids into the map. If no id exists, a template will get a new one in the dump writer @param info Must not be {@code null}. @param templateNames template names to use
[ "Loads", "existing", "ids", "into", "the", "map", ".", "If", "no", "id", "exists", "a", "template", "will", "get", "a", "new", "one", "in", "the", "dump", "writer" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/generator/simple/WikipediaTemplateInfoGenerator.java#L331-L345
105,687
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.timemachine/src/main/java/de/tudarmstadt/ukp/wikipedia/timemachine/dump/xml/XMLDumpTableInputStream.java
XMLDumpTableInputStream.initialize
@Override public void initialize(InputStream inputStream, DumpTableEnum table) throws IOException { unbufferedResult = new PipedInputStream(); decodedStream = new PipedOutputStream(unbufferedResult); result = new BufferedInputStream(unbufferedResult, BUFFERSIZE); xmlInputThread = new XMLDumpTableInputS...
java
@Override public void initialize(InputStream inputStream, DumpTableEnum table) throws IOException { unbufferedResult = new PipedInputStream(); decodedStream = new PipedOutputStream(unbufferedResult); result = new BufferedInputStream(unbufferedResult, BUFFERSIZE); xmlInputThread = new XMLDumpTableInputS...
[ "@", "Override", "public", "void", "initialize", "(", "InputStream", "inputStream", ",", "DumpTableEnum", "table", ")", "throws", "IOException", "{", "unbufferedResult", "=", "new", "PipedInputStream", "(", ")", ";", "decodedStream", "=", "new", "PipedOutputStream",...
Decorator for InputStream, which allows to convert an XML input stream to SQL @param inputStream XML input stream @throws IOException
[ "Decorator", "for", "InputStream", "which", "allows", "to", "convert", "an", "XML", "input", "stream", "to", "SQL" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.timemachine/src/main/java/de/tudarmstadt/ukp/wikipedia/timemachine/dump/xml/XMLDumpTableInputStream.java#L67-L79
105,688
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/dump/sql/SQLFileParser.java
SQLFileParser.init
protected void init(InputStream inputStream) throws IOException { stream = inputStream; st = new StreamTokenizer(new BufferedReader(new InputStreamReader( stream, ENCODING))); EOF_reached = false; skipStatements(); }
java
protected void init(InputStream inputStream) throws IOException { stream = inputStream; st = new StreamTokenizer(new BufferedReader(new InputStreamReader( stream, ENCODING))); EOF_reached = false; skipStatements(); }
[ "protected", "void", "init", "(", "InputStream", "inputStream", ")", "throws", "IOException", "{", "stream", "=", "inputStream", ";", "st", "=", "new", "StreamTokenizer", "(", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "stream", ",", "ENCODIN...
Init the SQLFileParser with the input stream @param inputStream @throws IOException
[ "Init", "the", "SQLFileParser", "with", "the", "input", "stream" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/dump/sql/SQLFileParser.java#L51-L59
105,689
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/SQLPanel.java
SQLPanel.validateSQLFields
private void validateSQLFields() { boolean flag = controller.isEnableSQLDatabaseOutput(); enableSQLDatabaseConnection.setSelected(flag); sqlHostLabel.setEnabled(flag); sqlHostField.setEnabled(flag); sqlDatabaseLabel.setEnabled(flag); sqlDatabaseField.setEnabled(flag); sqlUserLabel.setEnabled(flag); ...
java
private void validateSQLFields() { boolean flag = controller.isEnableSQLDatabaseOutput(); enableSQLDatabaseConnection.setSelected(flag); sqlHostLabel.setEnabled(flag); sqlHostField.setEnabled(flag); sqlDatabaseLabel.setEnabled(flag); sqlDatabaseField.setEnabled(flag); sqlUserLabel.setEnabled(flag); ...
[ "private", "void", "validateSQLFields", "(", ")", "{", "boolean", "flag", "=", "controller", ".", "isEnableSQLDatabaseOutput", "(", ")", ";", "enableSQLDatabaseConnection", ".", "setSelected", "(", "flag", ")", ";", "sqlHostLabel", ".", "setEnabled", "(", "flag", ...
Validates the UNCOMPRESSED Settings.
[ "Validates", "the", "UNCOMPRESSED", "Settings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/panels/SQLPanel.java#L191-L208
105,690
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/DiffTool.java
DiffTool.main
public static void main(final String[] args) { if (args.length != 1) { throw new IllegalArgumentException( "Configuration File ist missing."); } try { // Reads the configuration ConfigSettings config = readConfiguration(args[0]); new DiffToolThread(config).run(); } catch (Exception e) { ...
java
public static void main(final String[] args) { if (args.length != 1) { throw new IllegalArgumentException( "Configuration File ist missing."); } try { // Reads the configuration ConfigSettings config = readConfiguration(args[0]); new DiffToolThread(config).run(); } catch (Exception e) { ...
[ "public", "static", "void", "main", "(", "final", "String", "[", "]", "args", ")", "{", "if", "(", "args", ".", "length", "!=", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Configuration File ist missing.\"", ")", ";", "}", "try", "{"...
Starts the DiffTool application. @param args program arguments args[0] has to be the path to the configuration file
[ "Starts", "the", "DiffTool", "application", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/DiffTool.java#L45-L62
105,691
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/DiffTool.java
DiffTool.readConfiguration
private static ConfigSettings readConfiguration(final String path) throws IOException, SAXException, ParserConfigurationException { ConfigurationReader reader = new ConfigurationReader(path); return reader.read(); }
java
private static ConfigSettings readConfiguration(final String path) throws IOException, SAXException, ParserConfigurationException { ConfigurationReader reader = new ConfigurationReader(path); return reader.read(); }
[ "private", "static", "ConfigSettings", "readConfiguration", "(", "final", "String", "path", ")", "throws", "IOException", ",", "SAXException", ",", "ParserConfigurationException", "{", "ConfigurationReader", "reader", "=", "new", "ConfigurationReader", "(", "path", ")",...
Reads and parses the configuration file. @param path path to the configuration file @return ConfigurationSettings @throws IOException if an error occurred while reading the configuration file @throws SAXException if an error occurred while using the xml parser @throws ParserConfigurationException if the initializatio...
[ "Reads", "and", "parses", "the", "configuration", "file", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/DiffTool.java#L78-L84
105,692
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/Strings.java
Strings.capitalize
public static String capitalize(String s) { if (Character.isLowerCase(s.charAt(0))) { return Character.toUpperCase(s.charAt(0)) + s.substring(1); } else { return s; } }
java
public static String capitalize(String s) { if (Character.isLowerCase(s.charAt(0))) { return Character.toUpperCase(s.charAt(0)) + s.substring(1); } else { return s; } }
[ "public", "static", "String", "capitalize", "(", "String", "s", ")", "{", "if", "(", "Character", ".", "isLowerCase", "(", "s", ".", "charAt", "(", "0", ")", ")", ")", "{", "return", "Character", ".", "toUpperCase", "(", "s", ".", "charAt", "(", "0",...
Uppercases the first character of a string. @param s a string to capitalize @return a capitalized version of the string
[ "Uppercases", "the", "first", "character", "of", "a", "string", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.wikimachine/src/main/java/de/tudarmstadt/ukp/wikipedia/wikimachine/util/Strings.java#L70-L76
105,693
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/Indexer.java
Indexer.send
private void send() throws IOException, SQLException { this.indexWriter.write(articleIndex); this.indexWriter.write(revisionIndex); this.indexWriter.write(chronoIndex); }
java
private void send() throws IOException, SQLException { this.indexWriter.write(articleIndex); this.indexWriter.write(revisionIndex); this.indexWriter.write(chronoIndex); }
[ "private", "void", "send", "(", ")", "throws", "IOException", ",", "SQLException", "{", "this", ".", "indexWriter", ".", "write", "(", "articleIndex", ")", ";", "this", ".", "indexWriter", ".", "write", "(", "revisionIndex", ")", ";", "this", ".", "indexWr...
Checks whether the AbstractIndex classes have output available and forward them to the output writer. @throws IOException if an error occurred while writing the output @throws SQLException if an error occurred while accessing the database
[ "Checks", "whether", "the", "AbstractIndex", "classes", "have", "output", "available", "and", "forward", "them", "to", "the", "output", "writer", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/Indexer.java#L143-L150
105,694
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/Indexer.java
Indexer.index
public void index(final Revision rev) throws WikiApiException { int articleID = rev.getArticleID(); int fullRevisionID = rev.getFullRevisionID(); int revisionCounter = rev.getRevisionCounter(); if (articleID != currentArticleID) { if (lastRev != null) { info.setEndRevisionCount(lastRev.getRevisionC...
java
public void index(final Revision rev) throws WikiApiException { int articleID = rev.getArticleID(); int fullRevisionID = rev.getFullRevisionID(); int revisionCounter = rev.getRevisionCounter(); if (articleID != currentArticleID) { if (lastRev != null) { info.setEndRevisionCount(lastRev.getRevisionC...
[ "public", "void", "index", "(", "final", "Revision", "rev", ")", "throws", "WikiApiException", "{", "int", "articleID", "=", "rev", ".", "getArticleID", "(", ")", ";", "int", "fullRevisionID", "=", "rev", ".", "getFullRevisionID", "(", ")", ";", "int", "re...
Processes the given revision. @param rev Reference to a revision @throws WikiApiException if an error occurs
[ "Processes", "the", "given", "revision", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/Indexer.java#L161-L242
105,695
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/Indexer.java
Indexer.close
public void close() throws WikiApiException { try { this.revisionIndex.finalizeIndex(); this.chronoIndex.finalizeIndex(); info.setEndRevisionCount(lastRev.getRevisionCounter()); this.infoList.add(info); this.articleIndex.add(currentArticleID, startTime, endTime, infoList); this.articleInd...
java
public void close() throws WikiApiException { try { this.revisionIndex.finalizeIndex(); this.chronoIndex.finalizeIndex(); info.setEndRevisionCount(lastRev.getRevisionCounter()); this.infoList.add(info); this.articleIndex.add(currentArticleID, startTime, endTime, infoList); this.articleInd...
[ "public", "void", "close", "(", ")", "throws", "WikiApiException", "{", "try", "{", "this", ".", "revisionIndex", ".", "finalizeIndex", "(", ")", ";", "this", ".", "chronoIndex", ".", "finalizeIndex", "(", ")", ";", "info", ".", "setEndRevisionCount", "(", ...
Finalizes the indices and sends the rest of the data to the output. Afterwards the database connection will be closed. @throws WikiApiException if an error occurs
[ "Finalizes", "the", "indices", "and", "sends", "the", "rest", "of", "the", "data", "to", "the", "output", ".", "Afterwards", "the", "database", "connection", "will", "be", "closed", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/index/Indexer.java#L251-L283
105,696
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java
ConfigController.applyConfig
private void applyConfig() { this.components.applyConfig(config); switch (config.getConfigType()) { case DEFAULT: break; case IMPORT: this.archives.applyConfiguration(config); } repaint(); }
java
private void applyConfig() { this.components.applyConfig(config); switch (config.getConfigType()) { case DEFAULT: break; case IMPORT: this.archives.applyConfiguration(config); } repaint(); }
[ "private", "void", "applyConfig", "(", ")", "{", "this", ".", "components", ".", "applyConfig", "(", "config", ")", ";", "switch", "(", "config", ".", "getConfigType", "(", ")", ")", "{", "case", "DEFAULT", ":", "break", ";", "case", "IMPORT", ":", "th...
Applies the configuration file. The input settings will be ignored if a default configuration was used.
[ "Applies", "the", "configuration", "file", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java#L161-L173
105,697
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java
ConfigController.createConfigurationXML
public boolean createConfigurationXML() { errors = new ConfigVerification(); xmlConfig = new StringBuilder(); xmlConfig.append("<config>\r\n"); components.toXML(xmlConfig, errors); xmlConfig.append("</config>\r\n"); if (errors.getRowCount() != 0) { // TODO: invoke the dialog at another place new ...
java
public boolean createConfigurationXML() { errors = new ConfigVerification(); xmlConfig = new StringBuilder(); xmlConfig.append("<config>\r\n"); components.toXML(xmlConfig, errors); xmlConfig.append("</config>\r\n"); if (errors.getRowCount() != 0) { // TODO: invoke the dialog at another place new ...
[ "public", "boolean", "createConfigurationXML", "(", ")", "{", "errors", "=", "new", "ConfigVerification", "(", ")", ";", "xmlConfig", "=", "new", "StringBuilder", "(", ")", ";", "xmlConfig", ".", "append", "(", "\"<config>\\r\\n\"", ")", ";", "components", "."...
Creates the xml content representation of the currently used settings. @return TRUE if the ConfigVerfication contains no items, FALSE otherwise
[ "Creates", "the", "xml", "content", "representation", "of", "the", "currently", "used", "settings", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java#L180-L199
105,698
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java
ConfigController.loadConfiguration
public void loadConfiguration() { XMLFileChooser fc = new XMLFileChooser(); if (fc.showOpenDialog(new JPanel()) == XMLFileChooser.APPROVE_OPTION) { this.loadConfig(fc.getSelectedFile().getPath()); } }
java
public void loadConfiguration() { XMLFileChooser fc = new XMLFileChooser(); if (fc.showOpenDialog(new JPanel()) == XMLFileChooser.APPROVE_OPTION) { this.loadConfig(fc.getSelectedFile().getPath()); } }
[ "public", "void", "loadConfiguration", "(", ")", "{", "XMLFileChooser", "fc", "=", "new", "XMLFileChooser", "(", ")", ";", "if", "(", "fc", ".", "showOpenDialog", "(", "new", "JPanel", "(", ")", ")", "==", "XMLFileChooser", ".", "APPROVE_OPTION", ")", "{",...
Loads the configuration file. The path of the file will be chosen by displaying a FileChooser Dialog.
[ "Loads", "the", "configuration", "file", ".", "The", "path", "of", "the", "file", "will", "be", "chosen", "by", "displaying", "a", "FileChooser", "Dialog", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java#L366-L373
105,699
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java
ConfigController.saveConfiguration
public void saveConfiguration() { if (this.createConfigurationXML()) { XMLFileChooser fc = new XMLFileChooser(); if (fc.showSaveDialog(new JPanel()) == XMLFileChooser.APPROVE_OPTION) { String path = fc.getSelectedFile().getPath(); if (path.indexOf('.') == -1) { path += ".xml"; } if (th...
java
public void saveConfiguration() { if (this.createConfigurationXML()) { XMLFileChooser fc = new XMLFileChooser(); if (fc.showSaveDialog(new JPanel()) == XMLFileChooser.APPROVE_OPTION) { String path = fc.getSelectedFile().getPath(); if (path.indexOf('.') == -1) { path += ".xml"; } if (th...
[ "public", "void", "saveConfiguration", "(", ")", "{", "if", "(", "this", ".", "createConfigurationXML", "(", ")", ")", "{", "XMLFileChooser", "fc", "=", "new", "XMLFileChooser", "(", ")", ";", "if", "(", "fc", ".", "showSaveDialog", "(", "new", "JPanel", ...
Saves the configuration file. The path of the file will be chosen by displaying a FileChooser Dialog.
[ "Saves", "the", "configuration", "file", ".", "The", "path", "of", "the", "file", "will", "be", "chosen", "by", "displaying", "a", "FileChooser", "Dialog", "." ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ConfigController.java#L411-L434