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
partition
stringclasses
1 value
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIUtils.java
HBCIUtils.string2Ints
private static int[] string2Ints(String st, int target_length) { int[] numbers = new int[target_length]; int st_len = st.length(); char ch; for (int i = 0; i < st_len; i++) { ch = st.charAt(i); numbers[target_length - st_len + i] = ch - '0'; } re...
java
private static int[] string2Ints(String st, int target_length) { int[] numbers = new int[target_length]; int st_len = st.length(); char ch; for (int i = 0; i < st_len; i++) { ch = st.charAt(i); numbers[target_length - st_len + i] = ch - '0'; } re...
[ "private", "static", "int", "[", "]", "string2Ints", "(", "String", "st", ",", "int", "target_length", ")", "{", "int", "[", "]", "numbers", "=", "new", "int", "[", "target_length", "]", ";", "int", "st_len", "=", "st", ".", "length", "(", ")", ";", ...
Used to convert a blz or an account number to an array of ints, one array element per digit.
[ "Used", "to", "convert", "a", "blz", "or", "an", "account", "number", "to", "an", "array", "of", "ints", "one", "array", "element", "per", "digit", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIUtils.java#L568-L579
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIUtils.java
HBCIUtils.string2BigDecimal
public static BigDecimal string2BigDecimal(String st) { BigDecimal result = new BigDecimal(st); result.setScale(2, BigDecimal.ROUND_HALF_EVEN); return result; }
java
public static BigDecimal string2BigDecimal(String st) { BigDecimal result = new BigDecimal(st); result.setScale(2, BigDecimal.ROUND_HALF_EVEN); return result; }
[ "public", "static", "BigDecimal", "string2BigDecimal", "(", "String", "st", ")", "{", "BigDecimal", "result", "=", "new", "BigDecimal", "(", "st", ")", ";", "result", ".", "setScale", "(", "2", ",", "BigDecimal", ".", "ROUND_HALF_EVEN", ")", ";", "return", ...
Konvertiert einen String in einen BigDecimal-Wert mit zwei Nachkommastellen. @param st String, der konvertiert werden soll (Format "<code>1234.56</code>"); @return BigDecimal-Wert
[ "Konvertiert", "einen", "String", "in", "einen", "BigDecimal", "-", "Wert", "mit", "zwei", "Nachkommastellen", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIUtils.java#L713-L717
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/rb/CloudResourceBundle.java
CloudResourceBundle.loadBundle
static CloudResourceBundle loadBundle(ServiceAccount serviceAccount, String bundleId, Locale locale) { CloudResourceBundle crb = null; ServiceClient client = ServiceClient.getInstance(serviceAccount); try { Map<String, String> resStrings = client.getResourceStrings(bundleId, locale.t...
java
static CloudResourceBundle loadBundle(ServiceAccount serviceAccount, String bundleId, Locale locale) { CloudResourceBundle crb = null; ServiceClient client = ServiceClient.getInstance(serviceAccount); try { Map<String, String> resStrings = client.getResourceStrings(bundleId, locale.t...
[ "static", "CloudResourceBundle", "loadBundle", "(", "ServiceAccount", "serviceAccount", ",", "String", "bundleId", ",", "Locale", "locale", ")", "{", "CloudResourceBundle", "crb", "=", "null", ";", "ServiceClient", "client", "=", "ServiceClient", ".", "getInstance", ...
Package local factory method creating a new CloundResourceBundle instance for the specified service account, bundle ID and locale. @param serviceAccount The service account for IBM Globalization Pipeline @param bundleId The bundle ID @param locale The locale @return An instance of CloundResource...
[ "Package", "local", "factory", "method", "creating", "a", "new", "CloundResourceBundle", "instance", "for", "the", "specified", "service", "account", "bundle", "ID", "and", "locale", "." ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/rb/CloudResourceBundle.java#L50-L61
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/DirectiveParser.java
DirectiveParser.checkDirectivesForKeyword
public void checkDirectivesForKeyword(DirectiveParser directiveParser, KeyWord keyWord) throws ParseException { checkNoStepDirectiveBeforeKeyword(directiveParser, keyWord); checkForInvalidKeywordDirective(directiveParser, keyWord); }
java
public void checkDirectivesForKeyword(DirectiveParser directiveParser, KeyWord keyWord) throws ParseException { checkNoStepDirectiveBeforeKeyword(directiveParser, keyWord); checkForInvalidKeywordDirective(directiveParser, keyWord); }
[ "public", "void", "checkDirectivesForKeyword", "(", "DirectiveParser", "directiveParser", ",", "KeyWord", "keyWord", ")", "throws", "ParseException", "{", "checkNoStepDirectiveBeforeKeyword", "(", "directiveParser", ",", "keyWord", ")", ";", "checkForInvalidKeywordDirective",...
If a keyword supports directives, then we can have one more more 'keyword' directives but no 'step' directives before a keyword
[ "If", "a", "keyword", "supports", "directives", "then", "we", "can", "have", "one", "more", "more", "keyword", "directives", "but", "no", "step", "directives", "before", "a", "keyword" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/DirectiveParser.java#L98-L101
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/DirectiveParser.java
DirectiveParser.checkForUnprocessedDirectives
public void checkForUnprocessedDirectives() throws ParseException { List<LineNumberAndDirective> remaining = new LinkedList<>(); remaining.addAll(bufferedKeyWordDirectives); remaining.addAll(bufferedStepDirectives); if (!remaining.isEmpty()) { LineNumberAndDirective exampleEr...
java
public void checkForUnprocessedDirectives() throws ParseException { List<LineNumberAndDirective> remaining = new LinkedList<>(); remaining.addAll(bufferedKeyWordDirectives); remaining.addAll(bufferedStepDirectives); if (!remaining.isEmpty()) { LineNumberAndDirective exampleEr...
[ "public", "void", "checkForUnprocessedDirectives", "(", ")", "throws", "ParseException", "{", "List", "<", "LineNumberAndDirective", ">", "remaining", "=", "new", "LinkedList", "<>", "(", ")", ";", "remaining", ".", "addAll", "(", "bufferedKeyWordDirectives", ")", ...
this catches for any unprocessed directives at the end of parsing
[ "this", "catches", "for", "any", "unprocessed", "directives", "at", "the", "end", "of", "parsing" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/DirectiveParser.java#L166-L174
train
Chorus-bdd/Chorus
interpreter/chorus-remoting/src/main/java/org/chorusbdd/chorus/remoting/jmx/ChorusHandlerJmxExporter.java
ChorusHandlerJmxExporter.export
public ChorusHandlerJmxExporter export() { if (Boolean.getBoolean(JMX_EXPORTER_ENABLED_PROPERTY)) { //export this object as an MBean if (exported.getAndSet(true) == false) { try { log.info(String.format("Exporting ChorusHandlerJmxExporter with jmx name...
java
public ChorusHandlerJmxExporter export() { if (Boolean.getBoolean(JMX_EXPORTER_ENABLED_PROPERTY)) { //export this object as an MBean if (exported.getAndSet(true) == false) { try { log.info(String.format("Exporting ChorusHandlerJmxExporter with jmx name...
[ "public", "ChorusHandlerJmxExporter", "export", "(", ")", "{", "if", "(", "Boolean", ".", "getBoolean", "(", "JMX_EXPORTER_ENABLED_PROPERTY", ")", ")", "{", "//export this object as an MBean", "if", "(", "exported", ".", "getAndSet", "(", "true", ")", "==", "false...
Call this method once all handlers are fully initialized, to register the chorus remoting JMX bean and make all chorus handlers accessible remotely
[ "Call", "this", "method", "once", "all", "handlers", "are", "fully", "initialized", "to", "register", "the", "chorus", "remoting", "JMX", "bean", "and", "make", "all", "chorus", "handlers", "accessible", "remotely" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-remoting/src/main/java/org/chorusbdd/chorus/remoting/jmx/ChorusHandlerJmxExporter.java#L135-L153
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/protocol/SF.java
SF.createAndAppendNewChildContainer
protected MultipleSyntaxElements createAndAppendNewChildContainer(Node ref, Document document) { MultipleSyntaxElements ret = null; if (((Element) ref).getAttribute("minnum").equals("0")) { log.trace("will not create container " + getPath() + " -> " + ((Element) ref).getAttribute("type") + ...
java
protected MultipleSyntaxElements createAndAppendNewChildContainer(Node ref, Document document) { MultipleSyntaxElements ret = null; if (((Element) ref).getAttribute("minnum").equals("0")) { log.trace("will not create container " + getPath() + " -> " + ((Element) ref).getAttribute("type") + ...
[ "protected", "MultipleSyntaxElements", "createAndAppendNewChildContainer", "(", "Node", "ref", ",", "Document", "document", ")", "{", "MultipleSyntaxElements", "ret", "=", "null", ";", "if", "(", "(", "(", "Element", ")", "ref", ")", ".", "getAttribute", "(", "\...
diesen).
[ "diesen", ")", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/protocol/SF.java#L60-L71
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/protocol/SF.java
SF.getRefSegId
private String[] getRefSegId(Node segref, Document document) { String segname = ((Element) segref).getAttribute("type"); // versuch, daten aus dem cache zu lesen String[] ret = new String[]{"", ""}; // segid noch nicht im cache Element segdef = document.getElementById(segname);...
java
private String[] getRefSegId(Node segref, Document document) { String segname = ((Element) segref).getAttribute("type"); // versuch, daten aus dem cache zu lesen String[] ret = new String[]{"", ""}; // segid noch nicht im cache Element segdef = document.getElementById(segname);...
[ "private", "String", "[", "]", "getRefSegId", "(", "Node", "segref", ",", "Document", "document", ")", "{", "String", "segname", "=", "(", "(", "Element", ")", "segref", ")", ".", "getAttribute", "(", "\"type\"", ")", ";", "// versuch, daten aus dem cache zu l...
erfolgen muss.
[ "erfolgen", "muss", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/protocol/SF.java#L138-L165
train
Chorus-bdd/Chorus
interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyUtils.java
ConfigPropertyUtils.createValidationPatternFromEnumType
public static <T extends Enum<T>> Pattern createValidationPatternFromEnumType(Class<T> enumType) { String regEx = Stream.of(enumType.getEnumConstants()) .map(Enum::name) .collect(Collectors.joining("|", "(?i)", "")); //Enum constants may contain $ which needs to be esca...
java
public static <T extends Enum<T>> Pattern createValidationPatternFromEnumType(Class<T> enumType) { String regEx = Stream.of(enumType.getEnumConstants()) .map(Enum::name) .collect(Collectors.joining("|", "(?i)", "")); //Enum constants may contain $ which needs to be esca...
[ "public", "static", "<", "T", "extends", "Enum", "<", "T", ">", ">", "Pattern", "createValidationPatternFromEnumType", "(", "Class", "<", "T", ">", "enumType", ")", "{", "String", "regEx", "=", "Stream", ".", "of", "(", "enumType", ".", "getEnumConstants", ...
Create a regular expression which will match any of the values from the supplied enum type
[ "Create", "a", "regular", "expression", "which", "will", "match", "any", "of", "the", "values", "from", "the", "supplied", "enum", "type" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/configproperty/ConfigPropertyUtils.java#L35-L44
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/generators/GenKUmsAllCamt05200107.java
GenKUmsAllCamt05200107.createDay
private AccountReport22 createDay(BTag tag) throws Exception { AccountReport22 report = new AccountReport22(); if (tag != null) { report.getBal().add(this.createSaldo(tag.start, true)); report.getBal().add(this.createSaldo(tag.end, false)); } if (tag != null && ...
java
private AccountReport22 createDay(BTag tag) throws Exception { AccountReport22 report = new AccountReport22(); if (tag != null) { report.getBal().add(this.createSaldo(tag.start, true)); report.getBal().add(this.createSaldo(tag.end, false)); } if (tag != null && ...
[ "private", "AccountReport22", "createDay", "(", "BTag", "tag", ")", "throws", "Exception", "{", "AccountReport22", "report", "=", "new", "AccountReport22", "(", ")", ";", "if", "(", "tag", "!=", "null", ")", "{", "report", ".", "getBal", "(", ")", ".", "...
Erzeugt den Header des Buchungstages. @param tag der Tag. @return der Header des Buchungstages. @throws Exception
[ "Erzeugt", "den", "Header", "des", "Buchungstages", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/generators/GenKUmsAllCamt05200107.java#L241-L265
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/generators/GenKUmsAllCamt05200107.java
GenKUmsAllCamt05200107.createSaldo
private CashBalance8 createSaldo(Saldo saldo, boolean start) throws Exception { CashBalance8 bal = new CashBalance8(); BalanceType13 bt = new BalanceType13(); bt.setCdOrPrtry(new BalanceType10Choice()); bt.getCdOrPrtry().setCd(start ? "PRCD" : "CLBD"); bal.setTp(bt); Ac...
java
private CashBalance8 createSaldo(Saldo saldo, boolean start) throws Exception { CashBalance8 bal = new CashBalance8(); BalanceType13 bt = new BalanceType13(); bt.setCdOrPrtry(new BalanceType10Choice()); bt.getCdOrPrtry().setCd(start ? "PRCD" : "CLBD"); bal.setTp(bt); Ac...
[ "private", "CashBalance8", "createSaldo", "(", "Saldo", "saldo", ",", "boolean", "start", ")", "throws", "Exception", "{", "CashBalance8", "bal", "=", "new", "CashBalance8", "(", ")", ";", "BalanceType13", "bt", "=", "new", "BalanceType13", "(", ")", ";", "b...
Erzeugt ein Saldo-Objekt. @param saldo das HBCI4Java-Saldo-Objekt. @param start true, wenn es ein Startsaldo ist. @return das CAMT-Saldo-Objekt. @throws Exception
[ "Erzeugt", "ein", "Saldo", "-", "Objekt", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/generators/GenKUmsAllCamt05200107.java#L275-L302
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/generators/GenKUmsAllCamt05200107.java
GenKUmsAllCamt05200107.createCalendar
private XMLGregorianCalendar createCalendar(Long timestamp) throws Exception { DatatypeFactory df = DatatypeFactory.newInstance(); GregorianCalendar cal = new GregorianCalendar(); cal.setTimeInMillis(timestamp != null ? timestamp.longValue() : System.currentTimeMillis()); return df.newXM...
java
private XMLGregorianCalendar createCalendar(Long timestamp) throws Exception { DatatypeFactory df = DatatypeFactory.newInstance(); GregorianCalendar cal = new GregorianCalendar(); cal.setTimeInMillis(timestamp != null ? timestamp.longValue() : System.currentTimeMillis()); return df.newXM...
[ "private", "XMLGregorianCalendar", "createCalendar", "(", "Long", "timestamp", ")", "throws", "Exception", "{", "DatatypeFactory", "df", "=", "DatatypeFactory", ".", "newInstance", "(", ")", ";", "GregorianCalendar", "cal", "=", "new", "GregorianCalendar", "(", ")",...
Erzeugt ein Calendar-Objekt. @param timestamp der Zeitstempel. @return das Calendar-Objekt. @throws Exception
[ "Erzeugt", "ein", "Calendar", "-", "Objekt", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/generators/GenKUmsAllCamt05200107.java#L311-L316
train
Chorus-bdd/Chorus
interpreter/chorus-handlers/src/main/java/org/chorusbdd/chorus/handlers/timers/TimersHandler.java
TimersHandler.waitForSeconds
@Step(".*wait (?:for )?([0-9]*) seconds?.*") @Documentation(order = 10, description = "Wait for a number of seconds", example = "And I wait for 6 seconds") public void waitForSeconds(int seconds) { try { Thread.sleep(seconds * 1000); } catch (InterruptedException e) { log...
java
@Step(".*wait (?:for )?([0-9]*) seconds?.*") @Documentation(order = 10, description = "Wait for a number of seconds", example = "And I wait for 6 seconds") public void waitForSeconds(int seconds) { try { Thread.sleep(seconds * 1000); } catch (InterruptedException e) { log...
[ "@", "Step", "(", "\".*wait (?:for )?([0-9]*) seconds?.*\"", ")", "@", "Documentation", "(", "order", "=", "10", ",", "description", "=", "\"Wait for a number of seconds\"", ",", "example", "=", "\"And I wait for 6 seconds\"", ")", "public", "void", "waitForSeconds", "(...
Simple timer to make the calling thread sleep @param seconds the number of seconds that the thread will sleep for
[ "Simple", "timer", "to", "make", "the", "calling", "thread", "sleep" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-handlers/src/main/java/org/chorusbdd/chorus/handlers/timers/TimersHandler.java#L48-L56
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.createCalendar
public static XMLGregorianCalendar createCalendar(String isoDate) throws Exception { if (isoDate == null) { SimpleDateFormat format = new SimpleDateFormat(DATETIME_FORMAT); isoDate = format.format(new Date()); } DatatypeFactory df = DatatypeFactory.newInstance(); ...
java
public static XMLGregorianCalendar createCalendar(String isoDate) throws Exception { if (isoDate == null) { SimpleDateFormat format = new SimpleDateFormat(DATETIME_FORMAT); isoDate = format.format(new Date()); } DatatypeFactory df = DatatypeFactory.newInstance(); ...
[ "public", "static", "XMLGregorianCalendar", "createCalendar", "(", "String", "isoDate", ")", "throws", "Exception", "{", "if", "(", "isoDate", "==", "null", ")", "{", "SimpleDateFormat", "format", "=", "new", "SimpleDateFormat", "(", "DATETIME_FORMAT", ")", ";", ...
Erzeugt ein neues XMLCalender-Objekt. @param isoDate optional. Das zu verwendende Datum. Wird es weggelassen, dann wird das aktuelle Datum (mit Uhrzeit) verwendet. @return das XML-Calendar-Objekt. @throws Exception
[ "Erzeugt", "ein", "neues", "XMLCalender", "-", "Objekt", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L37-L45
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.format
public static String format(XMLGregorianCalendar cal, String format) { if (cal == null) return null; if (format == null) format = DATE_FORMAT; SimpleDateFormat df = new SimpleDateFormat(format); return df.format(cal.toGregorianCalendar().getTime()); }
java
public static String format(XMLGregorianCalendar cal, String format) { if (cal == null) return null; if (format == null) format = DATE_FORMAT; SimpleDateFormat df = new SimpleDateFormat(format); return df.format(cal.toGregorianCalendar().getTime()); }
[ "public", "static", "String", "format", "(", "XMLGregorianCalendar", "cal", ",", "String", "format", ")", "{", "if", "(", "cal", "==", "null", ")", "return", "null", ";", "if", "(", "format", "==", "null", ")", "format", "=", "DATE_FORMAT", ";", "SimpleD...
Formatiert den XML-Kalender im angegebenen Format. @param cal der Kalender. @param format das zu verwendende Format. Fuer Beispiele siehe {@link SepaUtil#DATE_FORMAT} {@link SepaUtil#DATETIME_FORMAT} Wenn keines angegeben ist, wird per Default {@link SepaUtil#DATE_FORMAT} verwendet. @return die String das formatier...
[ "Formatiert", "den", "XML", "-", "Kalender", "im", "angegebenen", "Format", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L57-L66
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.toDate
public static Date toDate(XMLGregorianCalendar cal) { if (cal == null) return null; return cal.toGregorianCalendar().getTime(); }
java
public static Date toDate(XMLGregorianCalendar cal) { if (cal == null) return null; return cal.toGregorianCalendar().getTime(); }
[ "public", "static", "Date", "toDate", "(", "XMLGregorianCalendar", "cal", ")", "{", "if", "(", "cal", "==", "null", ")", "return", "null", ";", "return", "cal", ".", "toGregorianCalendar", "(", ")", ".", "getTime", "(", ")", ";", "}" ]
Liefert ein Date-Objekt fuer den Kalender. @param cal der Kalender. @return das Date-Objekt.
[ "Liefert", "ein", "Date", "-", "Objekt", "fuer", "den", "Kalender", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L74-L79
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.maxIndex
public static Integer maxIndex(HashMap<String, String> properties) { Integer max = null; for (String key : properties.keySet()) { Matcher m = INDEX_PATTERN.matcher(key); if (m.matches()) { int index = Integer.parseInt(m.group(1)); if (max == null |...
java
public static Integer maxIndex(HashMap<String, String> properties) { Integer max = null; for (String key : properties.keySet()) { Matcher m = INDEX_PATTERN.matcher(key); if (m.matches()) { int index = Integer.parseInt(m.group(1)); if (max == null |...
[ "public", "static", "Integer", "maxIndex", "(", "HashMap", "<", "String", ",", "String", ">", "properties", ")", "{", "Integer", "max", "=", "null", ";", "for", "(", "String", "key", ":", "properties", ".", "keySet", "(", ")", ")", "{", "Matcher", "m",...
Ermittelt den maximalen Index aller indizierten Properties. Nicht indizierte Properties werden ignoriert. @param properties die Properties, mit denen gearbeitet werden soll @return Maximaler Index, oder {@code null}, wenn keine indizierten Properties gefunden wurden
[ "Ermittelt", "den", "maximalen", "Index", "aller", "indizierten", "Properties", ".", "Nicht", "indizierte", "Properties", "werden", "ignoriert", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L99-L111
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.insertIndex
public static String insertIndex(String key, Integer index) { if (index == null) return key; int pos = key.indexOf('.'); if (pos >= 0) { return key.substring(0, pos) + '[' + index + ']' + key.substring(pos); } else { return key + '[' + index + ']'; ...
java
public static String insertIndex(String key, Integer index) { if (index == null) return key; int pos = key.indexOf('.'); if (pos >= 0) { return key.substring(0, pos) + '[' + index + ']' + key.substring(pos); } else { return key + '[' + index + ']'; ...
[ "public", "static", "String", "insertIndex", "(", "String", "key", ",", "Integer", "index", ")", "{", "if", "(", "index", "==", "null", ")", "return", "key", ";", "int", "pos", "=", "key", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "pos", ...
Fuegt einen Index in den Property-Key ein. Wurde kein Index angegeben, wird der Key unveraendert zurueckgeliefert. @param key Key, der mit einem Index ergaenzt werden soll @param index Index oder {@code null}, wenn kein Index gesetzt werden soll @return Key mit Index
[ "Fuegt", "einen", "Index", "in", "den", "Property", "-", "Key", "ein", ".", "Wurde", "kein", "Index", "angegeben", "wird", "der", "Key", "unveraendert", "zurueckgeliefert", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L153-L163
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.sumBtgValueObject
public static Value sumBtgValueObject(HashMap<String, String> properties) { Integer maxIndex = maxIndex(properties); BigDecimal btg = sumBtgValue(properties, maxIndex); String curr = properties.get(insertIndex("btg.curr", maxIndex == null ? null : 0)); return new Value(btg, curr); }
java
public static Value sumBtgValueObject(HashMap<String, String> properties) { Integer maxIndex = maxIndex(properties); BigDecimal btg = sumBtgValue(properties, maxIndex); String curr = properties.get(insertIndex("btg.curr", maxIndex == null ? null : 0)); return new Value(btg, curr); }
[ "public", "static", "Value", "sumBtgValueObject", "(", "HashMap", "<", "String", ",", "String", ">", "properties", ")", "{", "Integer", "maxIndex", "=", "maxIndex", "(", "properties", ")", ";", "BigDecimal", "btg", "=", "sumBtgValue", "(", "properties", ",", ...
Liefert ein Value-Objekt mit den Summen des Auftrages. @param properties Auftrags-Properties. @return das Value-Objekt mit der Summe.
[ "Liefert", "ein", "Value", "-", "Objekt", "mit", "den", "Summen", "des", "Auftrages", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L171-L176
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.getProperty
public static String getProperty(HashMap<String, String> props, String name, String defaultValue) { String value = props.get(name); return value != null && value.length() > 0 ? value : defaultValue; }
java
public static String getProperty(HashMap<String, String> props, String name, String defaultValue) { String value = props.get(name); return value != null && value.length() > 0 ? value : defaultValue; }
[ "public", "static", "String", "getProperty", "(", "HashMap", "<", "String", ",", "String", ">", "props", ",", "String", "name", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "props", ".", "get", "(", "name", ")", ";", "return", "value"...
Liefert den Wert des Properties oder den Default-Wert. Der Default-Wert wird nicht nur bei NULL verwendet sondern auch bei Leerstring. @param props die Properties. @param name der Name des Properties. @param defaultValue der Default-Wert. @return der Wert.
[ "Liefert", "den", "Wert", "des", "Properties", "oder", "den", "Default", "-", "Wert", ".", "Der", "Default", "-", "Wert", "wird", "nicht", "nur", "bei", "NULL", "verwendet", "sondern", "auch", "bei", "Leerstring", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L187-L190
train
Chorus-bdd/Chorus
interpreter/chorus-output/src/main/java/org/chorusbdd/chorus/output/AbstractChorusOutputWriter.java
AbstractChorusOutputWriter.getPrintWriter
protected PrintWriter getPrintWriter() { if ( printWriter == null || printStream != ChorusOut.out) { printWriter = new PrintWriter(ChorusOut.out); printStream = ChorusOut.out; } return printWriter; }
java
protected PrintWriter getPrintWriter() { if ( printWriter == null || printStream != ChorusOut.out) { printWriter = new PrintWriter(ChorusOut.out); printStream = ChorusOut.out; } return printWriter; }
[ "protected", "PrintWriter", "getPrintWriter", "(", ")", "{", "if", "(", "printWriter", "==", "null", "||", "printStream", "!=", "ChorusOut", ".", "out", ")", "{", "printWriter", "=", "new", "PrintWriter", "(", "ChorusOut", ".", "out", ")", ";", "printStream"...
This is an extension point to change Chorus output The user can provider their own OutputWriter which extends the default and overrides getPrintWriter() to return a writer configured for a different output stream n.b. this method will be called frequently so it is expected that the PrintWriter returned will generally...
[ "This", "is", "an", "extension", "point", "to", "change", "Chorus", "output" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-output/src/main/java/org/chorusbdd/chorus/output/AbstractChorusOutputWriter.java#L256-L262
train
Chorus-bdd/Chorus
interpreter/chorus-stepinvoker/src/main/java/org/chorusbdd/chorus/stepinvoker/PolledInvoker.java
PolledInvoker.invoke
public Object invoke(final String stepTokenId, final List<String> args) { final AtomicReference resultRef = new AtomicReference(); PolledAssertion p = new PolledAssertion() { protected void validate() throws Exception { Object r = wrappedInvoker.invoke(stepTokenId, args); ...
java
public Object invoke(final String stepTokenId, final List<String> args) { final AtomicReference resultRef = new AtomicReference(); PolledAssertion p = new PolledAssertion() { protected void validate() throws Exception { Object r = wrappedInvoker.invoke(stepTokenId, args); ...
[ "public", "Object", "invoke", "(", "final", "String", "stepTokenId", ",", "final", "List", "<", "String", ">", "args", ")", "{", "final", "AtomicReference", "resultRef", "=", "new", "AtomicReference", "(", ")", ";", "PolledAssertion", "p", "=", "new", "Polle...
Invoke the method @param stepTokenId @param args
[ "Invoke", "the", "method" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-stepinvoker/src/main/java/org/chorusbdd/chorus/stepinvoker/PolledInvoker.java#L64-L82
train
Chorus-bdd/Chorus
interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/patternmatching/TailLogPatternMatcher.java
TailLogPatternMatcher.waitForPattern
private String waitForPattern(long timeout, TailLogBufferedReader bufferedReader, Pattern pattern, boolean searchWithinLines, long timeoutInSeconds) throws IOException { StringBuilder sb = new StringBuilder(); String result; label: while(true) { while ( bufferedReader.ready()...
java
private String waitForPattern(long timeout, TailLogBufferedReader bufferedReader, Pattern pattern, boolean searchWithinLines, long timeoutInSeconds) throws IOException { StringBuilder sb = new StringBuilder(); String result; label: while(true) { while ( bufferedReader.ready()...
[ "private", "String", "waitForPattern", "(", "long", "timeout", ",", "TailLogBufferedReader", "bufferedReader", ",", "Pattern", "pattern", ",", "boolean", "searchWithinLines", ",", "long", "timeoutInSeconds", ")", "throws", "IOException", "{", "StringBuilder", "sb", "=...
read ahead without blocking and attempt to match the pattern
[ "read", "ahead", "without", "blocking", "and", "attempt", "to", "match", "the", "pattern" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/patternmatching/TailLogPatternMatcher.java#L79-L128
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/BankInfo.java
BankInfo.parse
static BankInfo parse(String text) { BankInfo info = new BankInfo(); if (text == null || text.length() == 0) return info; String[] cols = text.split("\\|"); info.setName(getValue(cols, 0)); info.setLocation(getValue(cols, 1)); info.setBic(getValue(cols, 2)); ...
java
static BankInfo parse(String text) { BankInfo info = new BankInfo(); if (text == null || text.length() == 0) return info; String[] cols = text.split("\\|"); info.setName(getValue(cols, 0)); info.setLocation(getValue(cols, 1)); info.setBic(getValue(cols, 2)); ...
[ "static", "BankInfo", "parse", "(", "String", "text", ")", "{", "BankInfo", "info", "=", "new", "BankInfo", "(", ")", ";", "if", "(", "text", "==", "null", "||", "text", ".", "length", "(", ")", "==", "0", ")", "return", "info", ";", "String", "[",...
Parst die BankInfo-Daten aus einer Zeile der blz.properties. @param text der Text (Value) aus der blz.properties. @return das BankInfo-Objekt. Niemals NULL sondern hoechstens ein leeres Objekt.
[ "Parst", "die", "BankInfo", "-", "Daten", "aus", "einer", "Zeile", "der", "blz", ".", "properties", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/BankInfo.java#L30-L46
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/BankInfo.java
BankInfo.getValue
private static String getValue(String[] cols, int idx) { if (cols == null || idx >= cols.length) return null; return cols[idx]; }
java
private static String getValue(String[] cols, int idx) { if (cols == null || idx >= cols.length) return null; return cols[idx]; }
[ "private", "static", "String", "getValue", "(", "String", "[", "]", "cols", ",", "int", "idx", ")", "{", "if", "(", "cols", "==", "null", "||", "idx", ">=", "cols", ".", "length", ")", "return", "null", ";", "return", "cols", "[", "idx", "]", ";", ...
Liefert den Wert aus der angegebenen Spalte. @param cols die Werte. @param idx die Spalte - beginnend bei 0. @return der Wert der Spalte oder NULL, wenn er nicht existiert. Die Funktion wirft keine {@link ArrayIndexOutOfBoundsException}
[ "Liefert", "den", "Wert", "aus", "der", "angegebenen", "Spalte", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/BankInfo.java#L56-L60
train
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/PropertyOperations.java
PropertyOperations.splitKeyAndGroup
public GroupedPropertyLoader splitKeyAndGroup(final String keyDelimiter) { return group(new BiFunction<String, String, Tuple3<String, String, String>>() { public Tuple3<String, String, String> apply(String key, String value) { String[] keyTokens = key.split(keyDelimiter, 2); ...
java
public GroupedPropertyLoader splitKeyAndGroup(final String keyDelimiter) { return group(new BiFunction<String, String, Tuple3<String, String, String>>() { public Tuple3<String, String, String> apply(String key, String value) { String[] keyTokens = key.split(keyDelimiter, 2); ...
[ "public", "GroupedPropertyLoader", "splitKeyAndGroup", "(", "final", "String", "keyDelimiter", ")", "{", "return", "group", "(", "new", "BiFunction", "<", "String", ",", "String", ",", "Tuple3", "<", "String", ",", "String", ",", "String", ">", ">", "(", ")"...
Split the key into 2 and use the first token to group <pre> For keys in the form: Properties() group.key1=value1 group.key2=value2 group2.key2=value2 group2.key3=value3 create a GroupedPropertyLoader to load one Properties map for each of the groups, stripping the group name from property keys e.g. group1 = Properti...
[ "Split", "the", "key", "into", "2", "and", "use", "the", "first", "token", "to", "group" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/PropertyOperations.java#L165-L175
train
Chorus-bdd/Chorus
interpreter/chorus/src/main/java/org/chorusbdd/chorus/ant/ChorusTask.java
ChorusTask.execute
@Override public void execute() throws BuildException { Java javaTask = (Java) getProject().createTask("java"); javaTask.setTaskName(getTaskName()); javaTask.setClassname("org.chorusbdd.chorus.Main"); javaTask.setClasspath(classpath); //if log4j config is set then pass this ...
java
@Override public void execute() throws BuildException { Java javaTask = (Java) getProject().createTask("java"); javaTask.setTaskName(getTaskName()); javaTask.setClassname("org.chorusbdd.chorus.Main"); javaTask.setClasspath(classpath); //if log4j config is set then pass this ...
[ "@", "Override", "public", "void", "execute", "(", ")", "throws", "BuildException", "{", "Java", "javaTask", "=", "(", "Java", ")", "getProject", "(", ")", ".", "createTask", "(", "\"java\"", ")", ";", "javaTask", ".", "setTaskName", "(", "getTaskName", "(...
Launches Chorus and runs the Interpreter over the speficied feature files @throws org.apache.tools.ant.BuildException
[ "Launches", "Chorus", "and", "runs", "the", "Interpreter", "over", "the", "speficied", "feature", "files" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus/src/main/java/org/chorusbdd/chorus/ant/ChorusTask.java#L64-L112
train
Chorus-bdd/Chorus
interpreter/chorus/src/main/java/org/chorusbdd/chorus/ant/ChorusTask.java
ChorusTask.addConfiguredFileset
public void addConfiguredFileset(FileSet fs) { File dir = fs.getDir(); DirectoryScanner ds = fs.getDirectoryScanner(); String[] fileNames = ds.getIncludedFiles(); for (String fileName : fileNames) { featureFiles.add(new File(dir, fileName)); } }
java
public void addConfiguredFileset(FileSet fs) { File dir = fs.getDir(); DirectoryScanner ds = fs.getDirectoryScanner(); String[] fileNames = ds.getIncludedFiles(); for (String fileName : fileNames) { featureFiles.add(new File(dir, fileName)); } }
[ "public", "void", "addConfiguredFileset", "(", "FileSet", "fs", ")", "{", "File", "dir", "=", "fs", ".", "getDir", "(", ")", ";", "DirectoryScanner", "ds", "=", "fs", ".", "getDirectoryScanner", "(", ")", ";", "String", "[", "]", "fileNames", "=", "ds", ...
Used to set the list of feature files that will be processed
[ "Used", "to", "set", "the", "list", "of", "feature", "files", "that", "will", "be", "processed" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus/src/main/java/org/chorusbdd/chorus/ant/ChorusTask.java#L117-L124
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/generators/AbstractSEPAGenerator.java
AbstractSEPAGenerator.marshal
protected void marshal(JAXBElement e, OutputStream os, boolean validate) throws Exception { JAXBContext jaxbContext = JAXBContext.newInstance(e.getDeclaredType()); Marshaller marshaller = jaxbContext.createMarshaller(); // Wir verwenden hier hart UTF-8. Siehe http://www.onlinebanking-forum.de/f...
java
protected void marshal(JAXBElement e, OutputStream os, boolean validate) throws Exception { JAXBContext jaxbContext = JAXBContext.newInstance(e.getDeclaredType()); Marshaller marshaller = jaxbContext.createMarshaller(); // Wir verwenden hier hart UTF-8. Siehe http://www.onlinebanking-forum.de/f...
[ "protected", "void", "marshal", "(", "JAXBElement", "e", ",", "OutputStream", "os", ",", "boolean", "validate", ")", "throws", "Exception", "{", "JAXBContext", "jaxbContext", "=", "JAXBContext", ".", "newInstance", "(", "e", ".", "getDeclaredType", "(", ")", "...
Schreibt die Bean mittels JAXB in den Strean. @param e das zu schreibende JAXBElement mit der Bean. @param os der OutputStream, in den das XML geschrieben wird. @param validate true, wenn das erzeugte XML gegen das PAIN-Schema validiert werden soll. @throws Exception
[ "Schreibt", "die", "Bean", "mittels", "JAXB", "in", "den", "Strean", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/generators/AbstractSEPAGenerator.java#L40-L87
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/QRCode.java
QRCode.tryParse
public static QRCode tryParse(String hhd, String msg) { try { return new QRCode(hhd, msg); } catch (Exception e) { return null; } }
java
public static QRCode tryParse(String hhd, String msg) { try { return new QRCode(hhd, msg); } catch (Exception e) { return null; } }
[ "public", "static", "QRCode", "tryParse", "(", "String", "hhd", ",", "String", "msg", ")", "{", "try", "{", "return", "new", "QRCode", "(", "hhd", ",", "msg", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "null", ";", "}", "}" ...
Versucht die Daten als QR-Code zu parsen. @param hhd der HHDuc. @param msg die Nachricht. @return der QR-Code oder NULL.
[ "Versucht", "die", "Daten", "als", "QR", "-", "Code", "zu", "parsen", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/QRCode.java#L139-L145
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/QRCode.java
QRCode.decode
private String decode(byte[] bytes) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < bytes.length; ++i) { sb.append(Integer.toString(bytes[i], 10)); } return sb.toString(); }
java
private String decode(byte[] bytes) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < bytes.length; ++i) { sb.append(Integer.toString(bytes[i], 10)); } return sb.toString(); }
[ "private", "String", "decode", "(", "byte", "[", "]", "bytes", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "bytes", ".", "length", ";", "++", "i", ")", "{", "sb", ...
Decodiert die Bytes als String. @param bytes die Bytes. @return der String.
[ "Decodiert", "die", "Bytes", "als", "String", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/QRCode.java#L153-L159
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/MTServiceBindingData.java
MTServiceBindingData.getServiceCredentials
public Map<String, Object> getServiceCredentials() { if (serviceCredentials == null) { return null; } return Collections.unmodifiableMap(serviceCredentials); }
java
public Map<String, Object> getServiceCredentials() { if (serviceCredentials == null) { return null; } return Collections.unmodifiableMap(serviceCredentials); }
[ "public", "Map", "<", "String", ",", "Object", ">", "getServiceCredentials", "(", ")", "{", "if", "(", "serviceCredentials", "==", "null", ")", "{", "return", "null", ";", "}", "return", "Collections", ".", "unmodifiableMap", "(", "serviceCredentials", ")", ...
Returns the credentials used for accessing the machine translation service. @return The credentials used for accessing the machine translation service.
[ "Returns", "the", "credentials", "used", "for", "accessing", "the", "machine", "translation", "service", "." ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/MTServiceBindingData.java#L76-L81
train
Chorus-bdd/Chorus
interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/HandlerConfigLoader.java
HandlerConfigLoader.loadPropertiesForSubGroup
public Properties loadPropertiesForSubGroup(ConfigurationManager configurationManager, String handlerPrefix, String groupName) { PropertyOperations handlerProps = properties(loadProperties(configurationManager, handlerPrefix)); PropertyOperations defaultProps = handlerProps.filterByAndRemoveKeyPrefix(C...
java
public Properties loadPropertiesForSubGroup(ConfigurationManager configurationManager, String handlerPrefix, String groupName) { PropertyOperations handlerProps = properties(loadProperties(configurationManager, handlerPrefix)); PropertyOperations defaultProps = handlerProps.filterByAndRemoveKeyPrefix(C...
[ "public", "Properties", "loadPropertiesForSubGroup", "(", "ConfigurationManager", "configurationManager", ",", "String", "handlerPrefix", ",", "String", "groupName", ")", "{", "PropertyOperations", "handlerProps", "=", "properties", "(", "loadProperties", "(", "configuratio...
Get properties for a specific config, for a handler which maintains properties grouped by configNames Defaults may also be provided in a special default configName, defaults provide base values which may be overridden by those set at configName level. myHandler.config1.property1=val myHandler.config1.property2=val m...
[ "Get", "properties", "for", "a", "specific", "config", "for", "a", "handler", "which", "maintains", "properties", "grouped", "by", "configNames" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/HandlerConfigLoader.java#L65-L73
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java
StepMacro.replaceVariablesWithPatterns
private String replaceVariablesWithPatterns(String pattern) { int group = 0; Matcher findVariablesMatcher = variablePattern.matcher(pattern); while(findVariablesMatcher.find()) { String variable = findVariablesMatcher.group(0); pattern = pattern.replaceFirst(variable, "(....
java
private String replaceVariablesWithPatterns(String pattern) { int group = 0; Matcher findVariablesMatcher = variablePattern.matcher(pattern); while(findVariablesMatcher.find()) { String variable = findVariablesMatcher.group(0); pattern = pattern.replaceFirst(variable, "(....
[ "private", "String", "replaceVariablesWithPatterns", "(", "String", "pattern", ")", "{", "int", "group", "=", "0", ";", "Matcher", "findVariablesMatcher", "=", "variablePattern", ".", "matcher", "(", "pattern", ")", ";", "while", "(", "findVariablesMatcher", ".", ...
find and replace any variables in the form
[ "find", "and", "replace", "any", "variables", "in", "the", "form" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java#L107-L116
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java
StepMacro.processStep
public boolean processStep(StepToken scenarioStep, List<StepMacro> macros, boolean alreadymatched) { boolean stepMacroMatched = doProcessStep(scenarioStep, macros, 0, alreadymatched); return stepMacroMatched; }
java
public boolean processStep(StepToken scenarioStep, List<StepMacro> macros, boolean alreadymatched) { boolean stepMacroMatched = doProcessStep(scenarioStep, macros, 0, alreadymatched); return stepMacroMatched; }
[ "public", "boolean", "processStep", "(", "StepToken", "scenarioStep", ",", "List", "<", "StepMacro", ">", "macros", ",", "boolean", "alreadymatched", ")", "{", "boolean", "stepMacroMatched", "=", "doProcessStep", "(", "scenarioStep", ",", "macros", ",", "0", ","...
Process a scenario step, adding child steps if it matches this StepMacro @param scenarioStep the step to match to this StepMacro's pattern @param macros the dictionary of macros against which to recursively match child steps
[ "Process", "a", "scenario", "step", "adding", "child", "steps", "if", "it", "matches", "this", "StepMacro" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java#L128-L131
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java
StepMacro.replaceVariablesInMacroStep
private String replaceVariablesInMacroStep(Matcher macroMatcher, String action) { for (Map.Entry<String, Integer> e : variableToGroupNumber.entrySet()) { action = action.replace(e.getKey(), "<$" + e.getValue() + ">"); } return action; }
java
private String replaceVariablesInMacroStep(Matcher macroMatcher, String action) { for (Map.Entry<String, Integer> e : variableToGroupNumber.entrySet()) { action = action.replace(e.getKey(), "<$" + e.getValue() + ">"); } return action; }
[ "private", "String", "replaceVariablesInMacroStep", "(", "Matcher", "macroMatcher", ",", "String", "action", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Integer", ">", "e", ":", "variableToGroupNumber", ".", "entrySet", "(", ")", ")", "{"...
replace the variables using regular expresson group syntax
[ "replace", "the", "variables", "using", "regular", "expresson", "group", "syntax" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java#L176-L181
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java
StepMacro.replaceGroupsInMacroStep
private String replaceGroupsInMacroStep(Matcher macroMatcher, String action) { Matcher groupMatcher = groupPattern.matcher(action); while(groupMatcher.find()) { String match = groupMatcher.group(); String groupString = match.substring(2, match.length() - 1); int group...
java
private String replaceGroupsInMacroStep(Matcher macroMatcher, String action) { Matcher groupMatcher = groupPattern.matcher(action); while(groupMatcher.find()) { String match = groupMatcher.group(); String groupString = match.substring(2, match.length() - 1); int group...
[ "private", "String", "replaceGroupsInMacroStep", "(", "Matcher", "macroMatcher", ",", "String", "action", ")", "{", "Matcher", "groupMatcher", "=", "groupPattern", ".", "matcher", "(", "action", ")", ";", "while", "(", "groupMatcher", ".", "find", "(", ")", ")...
capturing group from the macroMatcher
[ "capturing", "group", "from", "the", "macroMatcher" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java#L185-L201
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java
StepMacro.calculateStepMacroEndState
public static StepEndState calculateStepMacroEndState(List<StepToken> executedSteps) { StepEndState stepMacroEndState = StepEndState.PASSED; for ( StepToken s : executedSteps) { if ( s.getEndState() != StepEndState.PASSED) { stepMacroEndState = s.getEndState(); ...
java
public static StepEndState calculateStepMacroEndState(List<StepToken> executedSteps) { StepEndState stepMacroEndState = StepEndState.PASSED; for ( StepToken s : executedSteps) { if ( s.getEndState() != StepEndState.PASSED) { stepMacroEndState = s.getEndState(); ...
[ "public", "static", "StepEndState", "calculateStepMacroEndState", "(", "List", "<", "StepToken", ">", "executedSteps", ")", "{", "StepEndState", "stepMacroEndState", "=", "StepEndState", ".", "PASSED", ";", "for", "(", "StepToken", "s", ":", "executedSteps", ")", ...
The end state of a step macro step is derived from the child steps If all child steps are PASSED then the step macro will be PASSED, otherwise the step macro end state is taken from the first child step which was not PASSED
[ "The", "end", "state", "of", "a", "step", "macro", "step", "is", "derived", "from", "the", "child", "steps", "If", "all", "child", "steps", "are", "PASSED", "then", "the", "step", "macro", "will", "be", "PASSED", "otherwise", "the", "step", "macro", "end...
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/StepMacro.java#L212-L221
train
Chorus-bdd/Chorus
interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java
CommandLineParser.isBooleanSwitchProperty
private boolean isBooleanSwitchProperty(ExecutionProperty property) { return property.hasDefaults() && property.getDefaults().length == 1 && property.getDefaults()[0].equals("false"); }
java
private boolean isBooleanSwitchProperty(ExecutionProperty property) { return property.hasDefaults() && property.getDefaults().length == 1 && property.getDefaults()[0].equals("false"); }
[ "private", "boolean", "isBooleanSwitchProperty", "(", "ExecutionProperty", "property", ")", "{", "return", "property", ".", "hasDefaults", "(", ")", "&&", "property", ".", "getDefaults", "(", ")", ".", "length", "==", "1", "&&", "property", ".", "getDefaults", ...
This is a property with a boolean value which defaults to false The user can 'turn this option on' by passing a command line switch without a value (e.g. -d ) in which case we need to set the value to true @param property @return true if this is a boolean switch property
[ "This", "is", "a", "property", "with", "a", "boolean", "value", "which", "defaults", "to", "false" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/CommandLineParser.java#L115-L117
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/AccountCRCAlgs.java
AccountCRCAlgs.alg_24
public static boolean alg_24(int[] blz, int[] number) { int[] weights = {1, 2, 3, 1, 2, 3, 1, 2, 3}; int crc = 0; int idx = 0; switch (number[0]) { case 3: case 4: case 5: case 6: number[0] = 0; break; ...
java
public static boolean alg_24(int[] blz, int[] number) { int[] weights = {1, 2, 3, 1, 2, 3, 1, 2, 3}; int crc = 0; int idx = 0; switch (number[0]) { case 3: case 4: case 5: case 6: number[0] = 0; break; ...
[ "public", "static", "boolean", "alg_24", "(", "int", "[", "]", "blz", ",", "int", "[", "]", "number", ")", "{", "int", "[", "]", "weights", "=", "{", "1", ",", "2", ",", "3", ",", "1", ",", "2", ",", "3", ",", "1", ",", "2", ",", "3", "}"...
code by Gerd Balzuweit
[ "code", "by", "Gerd", "Balzuweit" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/AccountCRCAlgs.java#L217-L250
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/rewrite/RWrongStatusSegOrder.java
RWrongStatusSegOrder.createSegmentListFromMessage
private List<HashMap<String, String>> createSegmentListFromMessage(String msg) { List<HashMap<String, String>> segmentList = new ArrayList<HashMap<String, String>>(); boolean quoteNext = false; int startPosi = 0; for (int i = 0; i < msg.length(); i++) { char ch = msg.charAt...
java
private List<HashMap<String, String>> createSegmentListFromMessage(String msg) { List<HashMap<String, String>> segmentList = new ArrayList<HashMap<String, String>>(); boolean quoteNext = false; int startPosi = 0; for (int i = 0; i < msg.length(); i++) { char ch = msg.charAt...
[ "private", "List", "<", "HashMap", "<", "String", ",", "String", ">", ">", "createSegmentListFromMessage", "(", "String", "msg", ")", "{", "List", "<", "HashMap", "<", "String", ",", "String", ">", ">", "segmentList", "=", "new", "ArrayList", "<", "HashMap...
Liste mit segmentInfo-Properties aus der Nachricht erzeugen
[ "Liste", "mit", "segmentInfo", "-", "Properties", "aus", "der", "Nachricht", "erzeugen" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/rewrite/RWrongStatusSegOrder.java#L36-L64
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/impl/ServiceClientImpl.java
ServiceClientImpl.createGson
private static Gson createGson(String className) { GsonBuilder builder = new GsonBuilder(); // ISO8601 date format support builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX"); builder.registerTypeAdapter(TranslationStatus.class, new EnumWithFallbackAdapter<TranslationSt...
java
private static Gson createGson(String className) { GsonBuilder builder = new GsonBuilder(); // ISO8601 date format support builder.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX"); builder.registerTypeAdapter(TranslationStatus.class, new EnumWithFallbackAdapter<TranslationSt...
[ "private", "static", "Gson", "createGson", "(", "String", "className", ")", "{", "GsonBuilder", "builder", "=", "new", "GsonBuilder", "(", ")", ";", "// ISO8601 date format support", "builder", ".", "setDateFormat", "(", "\"yyyy-MM-dd'T'HH:mm:ss.SSSX\"", ")", ";", "...
Creates a new Gson object @param className A class name used for serialization/deserialization. <p>Note: This implementation does not use this argument for now. If we need different kinds of type adapters depending on class, the implementation might be updated to set up appropriate set of type adapters. @return A Gso...
[ "Creates", "a", "new", "Gson", "object" ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/impl/ServiceClientImpl.java#L1791-L1810
train
Chorus-bdd/Chorus
interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/ProcessManagerProcess.java
ProcessManagerProcess.writeToStdIn
public void writeToStdIn(String text, boolean newLine) { if ( outputStream == null) { outputStream = new BufferedOutputStream(process.getOutputStream()); outputWriter = new BufferedWriter(new OutputStreamWriter(outputStream)); } try { outputWriter.write(text)...
java
public void writeToStdIn(String text, boolean newLine) { if ( outputStream == null) { outputStream = new BufferedOutputStream(process.getOutputStream()); outputWriter = new BufferedWriter(new OutputStreamWriter(outputStream)); } try { outputWriter.write(text)...
[ "public", "void", "writeToStdIn", "(", "String", "text", ",", "boolean", "newLine", ")", "{", "if", "(", "outputStream", "==", "null", ")", "{", "outputStream", "=", "new", "BufferedOutputStream", "(", "process", ".", "getOutputStream", "(", ")", ")", ";", ...
Write the text to the std in of the process @param newLine append a new line
[ "Write", "the", "text", "to", "the", "std", "in", "of", "the", "process" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/ProcessManagerProcess.java#L171-L188
train
Chorus-bdd/Chorus
extensions/chorus-selenium/src/main/java/org/chorusbdd/chorus/selenium/SeleniumLoggingSuppression.java
SeleniumLoggingSuppression.suppressLog4jLogging
private void suppressLog4jLogging() { if ( ! log4jLoggingSuppressed.getAndSet(true) ) { Logger logger = Logger.getLogger("org.apache.http"); logger.setLevel(Level.ERROR); logger.addAppender(new ConsoleAppender()); } }
java
private void suppressLog4jLogging() { if ( ! log4jLoggingSuppressed.getAndSet(true) ) { Logger logger = Logger.getLogger("org.apache.http"); logger.setLevel(Level.ERROR); logger.addAppender(new ConsoleAppender()); } }
[ "private", "void", "suppressLog4jLogging", "(", ")", "{", "if", "(", "!", "log4jLoggingSuppressed", ".", "getAndSet", "(", "true", ")", ")", "{", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "\"org.apache.http\"", ")", ";", "logger", ".", "setLe...
We don't want this in the Chorus interpreter output by default
[ "We", "don", "t", "want", "this", "in", "the", "Chorus", "interpreter", "output", "by", "default" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/extensions/chorus-selenium/src/main/java/org/chorusbdd/chorus/selenium/SeleniumLoggingSuppression.java#L52-L58
train
Chorus-bdd/Chorus
extensions/chorus-selenium/src/main/java/org/chorusbdd/chorus/selenium/SeleniumLoggingSuppression.java
SeleniumLoggingSuppression.suppressSeleniumJavaUtilLogging
private void suppressSeleniumJavaUtilLogging() { if ( ! seleniumLoggingSuppressed.getAndSet(true) ) { try { // Log4j logging is annoyingly difficult to turn off, it usually requires a config file but we can also do it with an InputStream Properties properties = new Pr...
java
private void suppressSeleniumJavaUtilLogging() { if ( ! seleniumLoggingSuppressed.getAndSet(true) ) { try { // Log4j logging is annoyingly difficult to turn off, it usually requires a config file but we can also do it with an InputStream Properties properties = new Pr...
[ "private", "void", "suppressSeleniumJavaUtilLogging", "(", ")", "{", "if", "(", "!", "seleniumLoggingSuppressed", ".", "getAndSet", "(", "true", ")", ")", "{", "try", "{", "// Log4j logging is annoyingly difficult to turn off, it usually requires a config file but we can also d...
We don't want that in the Chorus interpreter output by default
[ "We", "don", "t", "want", "that", "in", "the", "Chorus", "interpreter", "output", "by", "default" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/extensions/chorus-selenium/src/main/java/org/chorusbdd/chorus/selenium/SeleniumLoggingSuppression.java#L62-L80
train
Chorus-bdd/Chorus
services/chorus-webagent/src/main/java/org/chorusbdd/chorus/tools/webagent/WebAgentFeatureCache.java
WebAgentFeatureCache.setSuiteIdsUsingZeroBasedIndex
public void setSuiteIdsUsingZeroBasedIndex() { synchronized (cachedSuites) { List<WebAgentTestSuite> s = new ArrayList<>(cachedSuites.values()); cachedSuites.clear(); for ( int index=0; index < s.size(); index++) { WebAgentTestSuite suite = s.get(index); ...
java
public void setSuiteIdsUsingZeroBasedIndex() { synchronized (cachedSuites) { List<WebAgentTestSuite> s = new ArrayList<>(cachedSuites.values()); cachedSuites.clear(); for ( int index=0; index < s.size(); index++) { WebAgentTestSuite suite = s.get(index); ...
[ "public", "void", "setSuiteIdsUsingZeroBasedIndex", "(", ")", "{", "synchronized", "(", "cachedSuites", ")", "{", "List", "<", "WebAgentTestSuite", ">", "s", "=", "new", "ArrayList", "<>", "(", "cachedSuites", ".", "values", "(", ")", ")", ";", "cachedSuites",...
A testing hook to set the cached suites to have predictable keys
[ "A", "testing", "hook", "to", "set", "the", "cached", "suites", "to", "have", "predictable", "keys" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/services/chorus-webagent/src/main/java/org/chorusbdd/chorus/tools/webagent/WebAgentFeatureCache.java#L188-L197
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java
AbstractHBCIJob.setSegVersion
public void setSegVersion(int version) { if (version < 1) { log.warn("tried to change segment version for task " + this.jobName + " explicit, but no version given"); return; } // Wenn sich die Versionsnummer nicht geaendert hat, muessen wir die // Huehner ja nich...
java
public void setSegVersion(int version) { if (version < 1) { log.warn("tried to change segment version for task " + this.jobName + " explicit, but no version given"); return; } // Wenn sich die Versionsnummer nicht geaendert hat, muessen wir die // Huehner ja nich...
[ "public", "void", "setSegVersion", "(", "int", "version", ")", "{", "if", "(", "version", "<", "1", ")", "{", "log", ".", "warn", "(", "\"tried to change segment version for task \"", "+", "this", ".", "jobName", "+", "\" explicit, but no version given\"", ")", ...
Legt die Versionsnummer des Segments manuell fest. Ist u.a. noetig, um HKTAN-Segmente in genau der Version zu senden, in der auch die HITANS empfangen wurden. Andernfalls koennte es passieren, dass wir ein HKTAN mit einem TAN-Verfahren senden, welches in dieser HKTAN-Version gar nicht von der Bank unterstuetzt wird. Da...
[ "Legt", "die", "Versionsnummer", "des", "Segments", "manuell", "fest", ".", "Ist", "u", ".", "a", ".", "noetig", "um", "HKTAN", "-", "Segmente", "in", "genau", "der", "Version", "zu", "senden", "in", "der", "auch", "die", "HITANS", "empfangen", "wurden", ...
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java#L607-L651
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java
AbstractHBCIJob.getOrderAccount
public Konto getOrderAccount() { // Checken, ob wir das Konto unter "My.[number/iban]" haben String prefix = this.getName() + ".My."; String number = this.getLowlevelParam(prefix + "number"); String iban = this.getLowlevelParam(prefix + "iban"); if ((number == null || number.leng...
java
public Konto getOrderAccount() { // Checken, ob wir das Konto unter "My.[number/iban]" haben String prefix = this.getName() + ".My."; String number = this.getLowlevelParam(prefix + "number"); String iban = this.getLowlevelParam(prefix + "iban"); if ((number == null || number.leng...
[ "public", "Konto", "getOrderAccount", "(", ")", "{", "// Checken, ob wir das Konto unter \"My.[number/iban]\" haben", "String", "prefix", "=", "this", ".", "getName", "(", ")", "+", "\".My.\"", ";", "String", "number", "=", "this", ".", "getLowlevelParam", "(", "pre...
Liefert das Auftraggeber-Konto, wie es ab HKTAN5 erforderlich ist. @return das Auftraggeber-Konto oder NULL, wenn keines angegeben ist.
[ "Liefert", "das", "Auftraggeber", "-", "Konto", "wie", "es", "ab", "HKTAN5", "erforderlich", "ist", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/AbstractHBCIJob.java#L951-L973
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/parsers/AbstractSepaParser.java
AbstractSepaParser.put
void put(HashMap<String, String> props, Names name, String value) { // BUGZILLA 1610 - "java.util.Properties" ist von Hashtable abgeleitet und unterstuetzt keine NULL-Werte if (value == null) return; props.put(name.getValue(), value); }
java
void put(HashMap<String, String> props, Names name, String value) { // BUGZILLA 1610 - "java.util.Properties" ist von Hashtable abgeleitet und unterstuetzt keine NULL-Werte if (value == null) return; props.put(name.getValue(), value); }
[ "void", "put", "(", "HashMap", "<", "String", ",", "String", ">", "props", ",", "Names", "name", ",", "String", "value", ")", "{", "// BUGZILLA 1610 - \"java.util.Properties\" ist von Hashtable abgeleitet und unterstuetzt keine NULL-Werte", "if", "(", "value", "==", "nu...
Speichert den Wert in den Properties. @param props die Properties. @param name das Property. @param value der Wert.
[ "Speichert", "den", "Wert", "in", "den", "Properties", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/parsers/AbstractSepaParser.java#L18-L24
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/DocumentTranslationRequestDataChangeSet.java
DocumentTranslationRequestDataChangeSet.setTargetLanguagesMap
public DocumentTranslationRequestDataChangeSet setTargetLanguagesMap( Map<String, Map<String, Set<String>>> targetLanguagesMap) { // TODO - check empty map? if (targetLanguagesMap == null) { throw new NullPointerException("The input map is null."); } this.targetLa...
java
public DocumentTranslationRequestDataChangeSet setTargetLanguagesMap( Map<String, Map<String, Set<String>>> targetLanguagesMap) { // TODO - check empty map? if (targetLanguagesMap == null) { throw new NullPointerException("The input map is null."); } this.targetLa...
[ "public", "DocumentTranslationRequestDataChangeSet", "setTargetLanguagesMap", "(", "Map", "<", "String", ",", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", ">", "targetLanguagesMap", ")", "{", "// TODO - check empty map?", "if", "(", "targetLanguagesMap",...
Sets a map containing target languages indexed by document ids. This method adopts the input map without creating a safe copy. @param targetLanguagesMap A map containing target languages indexed by document ids. @return This object. @throws NullPointerException When the input <code>targetLanguagesMap</code> is null...
[ "Sets", "a", "map", "containing", "target", "languages", "indexed", "by", "document", "ids", ".", "This", "method", "adopts", "the", "input", "map", "without", "creating", "a", "safe", "copy", "." ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/DocumentTranslationRequestDataChangeSet.java#L57-L65
train
Chorus-bdd/Chorus
interpreter/chorus-results/src/main/java/org/chorusbdd/chorus/results/FeatureToken.java
FeatureToken.getEndState
public EndState getEndState() { EndState result = EndState.PASSED; for ( ScenarioToken s : scenarios) { if ( s.getEndState() == EndState.FAILED) { result = EndState.FAILED; break; } } if ( result != EndState.FAILED) { f...
java
public EndState getEndState() { EndState result = EndState.PASSED; for ( ScenarioToken s : scenarios) { if ( s.getEndState() == EndState.FAILED) { result = EndState.FAILED; break; } } if ( result != EndState.FAILED) { f...
[ "public", "EndState", "getEndState", "(", ")", "{", "EndState", "result", "=", "EndState", ".", "PASSED", ";", "for", "(", "ScenarioToken", "s", ":", "scenarios", ")", "{", "if", "(", "s", ".", "getEndState", "(", ")", "==", "EndState", ".", "FAILED", ...
fail if any scenarios failed, otherwise pending if any pending, or passed
[ "fail", "if", "any", "scenarios", "failed", "otherwise", "pending", "if", "any", "pending", "or", "passed" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-results/src/main/java/org/chorusbdd/chorus/results/FeatureToken.java#L179-L196
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/protocol/DE.java
DE.propagateValue
@Override public boolean propagateValue(String destPath, String valueString, boolean tryToCreate, boolean allowOverwrite) { boolean ret = false; // wenn dieses de gemeint ist if (destPath.equals(getPath())) { if (this.value != null) { // es gibt schon einen Wert ...
java
@Override public boolean propagateValue(String destPath, String valueString, boolean tryToCreate, boolean allowOverwrite) { boolean ret = false; // wenn dieses de gemeint ist if (destPath.equals(getPath())) { if (this.value != null) { // es gibt schon einen Wert ...
[ "@", "Override", "public", "boolean", "propagateValue", "(", "String", "destPath", ",", "String", "valueString", ",", "boolean", "tryToCreate", ",", "boolean", "allowOverwrite", ")", "{", "boolean", "ret", "=", "false", ";", "// wenn dieses de gemeint ist", "if", ...
setzen des wertes des de
[ "setzen", "des", "wertes", "des", "de" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/protocol/DE.java#L67-L84
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/protocol/DE.java
DE.parseValue
private void parseValue(StringBuffer res, HashMap<String, String> predefs, char preDelim, HashMap<String, String> valids) { int len = res.length(); if (preDelim != (char) 0 && res.charAt(0) != preDelim) { if (len == 0) { throw new ParseErrorExcept...
java
private void parseValue(StringBuffer res, HashMap<String, String> predefs, char preDelim, HashMap<String, String> valids) { int len = res.length(); if (preDelim != (char) 0 && res.charAt(0) != preDelim) { if (len == 0) { throw new ParseErrorExcept...
[ "private", "void", "parseValue", "(", "StringBuffer", "res", ",", "HashMap", "<", "String", ",", "String", ">", "predefs", ",", "char", "preDelim", ",", "HashMap", "<", "String", ",", "String", ">", "valids", ")", "{", "int", "len", "=", "res", ".", "l...
anlegen eines de beim parsen funktioniert analog zum anlegen eines de bei der message-synthese
[ "anlegen", "eines", "de", "beim", "parsen", "funktioniert", "analog", "zum", "anlegen", "eines", "de", "bei", "der", "message", "-", "synthese" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/protocol/DE.java#L191-L239
train
imsweb/seerapi-client-java
src/main/java/com/imsweb/seerapi/client/SeerApi.java
SeerApi.getMapper
static ObjectMapper getMapper() { ObjectMapper mapper = new ObjectMapper(); // do not write null values mapper.setSerializationInclusion(Include.NON_NULL); mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE); mapper.setVisibility(PropertyAccessor.FIELD, J...
java
static ObjectMapper getMapper() { ObjectMapper mapper = new ObjectMapper(); // do not write null values mapper.setSerializationInclusion(Include.NON_NULL); mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE); mapper.setVisibility(PropertyAccessor.FIELD, J...
[ "static", "ObjectMapper", "getMapper", "(", ")", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "// do not write null values", "mapper", ".", "setSerializationInclusion", "(", "Include", ".", "NON_NULL", ")", ";", "mapper", ".", "setVisi...
Return the internal ObjectMapper @return an Objectmapper
[ "Return", "the", "internal", "ObjectMapper" ]
04f509961c3a5ece7b232ecb8d8cb8f89d810a85
https://github.com/imsweb/seerapi-client-java/blob/04f509961c3a5ece7b232ecb8d8cb8f89d810a85/src/main/java/com/imsweb/seerapi/client/SeerApi.java#L96-L111
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/TranslationRequestData.java
TranslationRequestData.getTargetLanguagesByBundle
public Map<String, Set<String>> getTargetLanguagesByBundle() { if (targetLanguagesByBundle == null) { assert false; return Collections.emptyMap(); } return Collections.unmodifiableMap(targetLanguagesByBundle); }
java
public Map<String, Set<String>> getTargetLanguagesByBundle() { if (targetLanguagesByBundle == null) { assert false; return Collections.emptyMap(); } return Collections.unmodifiableMap(targetLanguagesByBundle); }
[ "public", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "getTargetLanguagesByBundle", "(", ")", "{", "if", "(", "targetLanguagesByBundle", "==", "null", ")", "{", "assert", "false", ";", "return", "Collections", ".", "emptyMap", "(", ")", ";",...
Returns the map containing target languages indexed by bundle IDs. This method always returns non-null map. @return The map containing target languages indexed by bundle IDs.
[ "Returns", "the", "map", "containing", "target", "languages", "indexed", "by", "bundle", "IDs", ".", "This", "method", "always", "returns", "non", "-", "null", "map", "." ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/TranslationRequestData.java#L88-L94
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/protocol/Message.java
Message.setMsgSizeValue
private void setMsgSizeValue(int value, boolean allowOverwrite) { String absPath = getPath() + ".MsgHead.msgsize"; SyntaxElement msgsizeElem = getElement(absPath); if (msgsizeElem == null) throw new NoSuchPathException(absPath); int size = ((DE) msgsizeElem).getMinSize(); ...
java
private void setMsgSizeValue(int value, boolean allowOverwrite) { String absPath = getPath() + ".MsgHead.msgsize"; SyntaxElement msgsizeElem = getElement(absPath); if (msgsizeElem == null) throw new NoSuchPathException(absPath); int size = ((DE) msgsizeElem).getMinSize(); ...
[ "private", "void", "setMsgSizeValue", "(", "int", "value", ",", "boolean", "allowOverwrite", ")", "{", "String", "absPath", "=", "getPath", "(", ")", "+", "\".MsgHead.msgsize\"", ";", "SyntaxElement", "msgsizeElem", "=", "getElement", "(", "absPath", ")", ";", ...
setzen des feldes "nachrichtengroesse" im nachrichtenkopf einer nachricht
[ "setzen", "des", "feldes", "nachrichtengroesse", "im", "nachrichtenkopf", "einer", "nachricht" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/protocol/Message.java#L96-L109
train
Chorus-bdd/Chorus
interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/ClasspathScanner.java
ClasspathScanner.getClasspathFileNames
static String[] getClasspathFileNames() throws IOException { //for performance we most likely only want to do this once for each interpreter session, //classpath should not change dynamically ChorusLog log = ChorusLogFactory.getLog(ClasspathScanner.class); log.debug("Getting file names "...
java
static String[] getClasspathFileNames() throws IOException { //for performance we most likely only want to do this once for each interpreter session, //classpath should not change dynamically ChorusLog log = ChorusLogFactory.getLog(ClasspathScanner.class); log.debug("Getting file names "...
[ "static", "String", "[", "]", "getClasspathFileNames", "(", ")", "throws", "IOException", "{", "//for performance we most likely only want to do this once for each interpreter session,", "//classpath should not change dynamically", "ChorusLog", "log", "=", "ChorusLogFactory", ".", ...
Returns the fully qualified class names of all the classes in the classpath. Checks directories and zip files. The FilenameFilter will be applied only to files that are in the zip files and the directories. In other words, the filter will not be used to sort directories.
[ "Returns", "the", "fully", "qualified", "class", "names", "of", "all", "the", "classes", "in", "the", "classpath", ".", "Checks", "directories", "and", "zip", "files", ".", "The", "FilenameFilter", "will", "be", "applied", "only", "to", "files", "that", "are...
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/ClasspathScanner.java#L144-L155
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/iam/TokenLifeCycleManager.java
TokenLifeCycleManager.getInstance
static TokenLifeCycleManager getInstance(final String iamEndpoint, final String apiKey) { if (iamEndpoint == null || iamEndpoint.isEmpty()) { throw new IllegalArgumentException( "Cannot initialize with null or empty IAM endpoint."); } if (apiKey == nul...
java
static TokenLifeCycleManager getInstance(final String iamEndpoint, final String apiKey) { if (iamEndpoint == null || iamEndpoint.isEmpty()) { throw new IllegalArgumentException( "Cannot initialize with null or empty IAM endpoint."); } if (apiKey == nul...
[ "static", "TokenLifeCycleManager", "getInstance", "(", "final", "String", "iamEndpoint", ",", "final", "String", "apiKey", ")", "{", "if", "(", "iamEndpoint", "==", "null", "||", "iamEndpoint", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgume...
Get an instance of TokenLifeCylceManager. Single instance is maintained for each unique pair of iamEndpoint and apiKey. The method is thread safe. @param iamEndpoint IAM endpoint. @param apiKey IAM API Key. @return Instance of TokenLifeCylceManager
[ "Get", "an", "instance", "of", "TokenLifeCylceManager", ".", "Single", "instance", "is", "maintained", "for", "each", "unique", "pair", "of", "iamEndpoint", "and", "apiKey", ".", "The", "method", "is", "thread", "safe", "." ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/iam/TokenLifeCycleManager.java#L184-L195
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/iam/TokenLifeCycleManager.java
TokenLifeCycleManager.getInstance
static TokenLifeCycleManager getInstance(final String jsonCredentials) { final JsonObject credentials = new JsonParser().parse(jsonCredentials) .getAsJsonObject(); if(credentials.get("apikey")==null || credentials.get("apikey").isJsonNull()||credentials.get("apikey").getAsString().isEmpt...
java
static TokenLifeCycleManager getInstance(final String jsonCredentials) { final JsonObject credentials = new JsonParser().parse(jsonCredentials) .getAsJsonObject(); if(credentials.get("apikey")==null || credentials.get("apikey").isJsonNull()||credentials.get("apikey").getAsString().isEmpt...
[ "static", "TokenLifeCycleManager", "getInstance", "(", "final", "String", "jsonCredentials", ")", "{", "final", "JsonObject", "credentials", "=", "new", "JsonParser", "(", ")", ".", "parse", "(", "jsonCredentials", ")", ".", "getAsJsonObject", "(", ")", ";", "if...
Get an instance of TokenLifeCylceManager. Single instance is maintained for each unique pair of iamEndpoint and apiKey. The method and the returned instance is thread safe. @param jsonCredentials Credentials in JSON format. The credentials should at minimum have these <key>:<value> pairs in the credentials json: { "ap...
[ "Get", "an", "instance", "of", "TokenLifeCylceManager", ".", "Single", "instance", "is", "maintained", "for", "each", "unique", "pair", "of", "iamEndpoint", "and", "apiKey", ".", "The", "method", "and", "the", "returned", "instance", "is", "thread", "safe", "....
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/iam/TokenLifeCycleManager.java#L222-L237
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/cryptalgs/ISO9796p2.java
ISO9796p2.adjustJ
private static BigInteger adjustJ(BigInteger J, BigInteger modulus) { byte[] ba = J.toByteArray(); int last = ba[ba.length - 1]; if ((last & 0x0F) == 0x0C) { return J; } BigInteger twelve = new BigInteger("12"); byte[] modulus2 = modulus.subtract(twelve).toB...
java
private static BigInteger adjustJ(BigInteger J, BigInteger modulus) { byte[] ba = J.toByteArray(); int last = ba[ba.length - 1]; if ((last & 0x0F) == 0x0C) { return J; } BigInteger twelve = new BigInteger("12"); byte[] modulus2 = modulus.subtract(twelve).toB...
[ "private", "static", "BigInteger", "adjustJ", "(", "BigInteger", "J", ",", "BigInteger", "modulus", ")", "{", "byte", "[", "]", "ba", "=", "J", ".", "toByteArray", "(", ")", ";", "int", "last", "=", "ba", "[", "ba", ".", "length", "-", "1", "]", ";...
entweder x oder n-x zurueckgeben
[ "entweder", "x", "oder", "n", "-", "x", "zurueckgeben" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/cryptalgs/ISO9796p2.java#L57-L74
train
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/handler/HandlerPatterns.java
HandlerPatterns.getNames
public static List<String> getNames(String nameList) { String[] names = nameList.split(","); List<String> results = new LinkedList<>(); for ( String p : names) { String configName = p.trim(); if ( configName.length() > 0) { results.add(configName); ...
java
public static List<String> getNames(String nameList) { String[] names = nameList.split(","); List<String> results = new LinkedList<>(); for ( String p : names) { String configName = p.trim(); if ( configName.length() > 0) { results.add(configName); ...
[ "public", "static", "List", "<", "String", ">", "getNames", "(", "String", "nameList", ")", "{", "String", "[", "]", "names", "=", "nameList", ".", "split", "(", "\",\"", ")", ";", "List", "<", "String", ">", "results", "=", "new", "LinkedList", "<>", ...
Get a List of process names from a comma separated list @param nameList a list of process names conforming to the processNameListPattern
[ "Get", "a", "List", "of", "process", "names", "from", "a", "comma", "separated", "list" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/handler/HandlerPatterns.java#L82-L92
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/ChallengeInfo.java
ChallengeInfo.applyParams
public void applyParams(AbstractHBCIJob task, AbstractHBCIJob hktan, HBCITwoStepMechanism hbciTwoStepMechanism) { String code = task.getHBCICode(); // Code des Geschaeftsvorfalls // Job-Parameter holen Job job = this.getData(code); // Den Geschaeftsvorfall kennen wir nicht. Dann brauch...
java
public void applyParams(AbstractHBCIJob task, AbstractHBCIJob hktan, HBCITwoStepMechanism hbciTwoStepMechanism) { String code = task.getHBCICode(); // Code des Geschaeftsvorfalls // Job-Parameter holen Job job = this.getData(code); // Den Geschaeftsvorfall kennen wir nicht. Dann brauch...
[ "public", "void", "applyParams", "(", "AbstractHBCIJob", "task", ",", "AbstractHBCIJob", "hktan", ",", "HBCITwoStepMechanism", "hbciTwoStepMechanism", ")", "{", "String", "code", "=", "task", ".", "getHBCICode", "(", ")", ";", "// Code des Geschaeftsvorfalls", "// Job...
Uebernimmt die Challenge-Parameter in den HKTAN-Geschaeftsvorfall. @param task der Job, zu dem die Challenge-Parameter ermittelt werden sollen. @param hktan der HKTAN-Geschaeftsvorfall, in dem die Parameter gesetzt werden sollen. @param hbciTwoStepMechanism die BPD-Informationen zum TAN-...
[ "Uebernimmt", "die", "Challenge", "-", "Parameter", "in", "den", "HKTAN", "-", "Geschaeftsvorfall", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/ChallengeInfo.java#L131-L185
train
Chorus-bdd/Chorus
extensions/chorus-websockets/src/main/java/org/chorusbdd/chorus/websockets/ChorusWebSocketServer.java
ChorusWebSocketServer.findClientIdForWebSocket
private Optional<String> findClientIdForWebSocket(WebSocket conn) { return clientIdToSocket.entrySet().stream() .filter(e -> e.getValue() == conn) .map(Map.Entry::getKey) .findFirst(); }
java
private Optional<String> findClientIdForWebSocket(WebSocket conn) { return clientIdToSocket.entrySet().stream() .filter(e -> e.getValue() == conn) .map(Map.Entry::getKey) .findFirst(); }
[ "private", "Optional", "<", "String", ">", "findClientIdForWebSocket", "(", "WebSocket", "conn", ")", "{", "return", "clientIdToSocket", ".", "entrySet", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "e", "->", "e", ".", "getValue", "(", ")", "=...
Unless a client has sent a CONNECT message we will not have a client Id associated with the socket
[ "Unless", "a", "client", "has", "sent", "a", "CONNECT", "message", "we", "will", "not", "have", "a", "client", "Id", "associated", "with", "the", "socket" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/extensions/chorus-websockets/src/main/java/org/chorusbdd/chorus/websockets/ChorusWebSocketServer.java#L87-L92
train
Chorus-bdd/Chorus
interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/ConfigReader.java
ConfigReader.mergeProperties
private void mergeProperties(Map<ExecutionConfigSource, Map<ExecutionProperty, List<String>>> sourceToPropertiesMap) { for ( ExecutionConfigSource s : propertySources) { Map<ExecutionProperty, List<String>> properties = sourceToPropertiesMap.get(s); for ( ExecutionProperty p : properties...
java
private void mergeProperties(Map<ExecutionConfigSource, Map<ExecutionProperty, List<String>>> sourceToPropertiesMap) { for ( ExecutionConfigSource s : propertySources) { Map<ExecutionProperty, List<String>> properties = sourceToPropertiesMap.get(s); for ( ExecutionProperty p : properties...
[ "private", "void", "mergeProperties", "(", "Map", "<", "ExecutionConfigSource", ",", "Map", "<", "ExecutionProperty", ",", "List", "<", "String", ">", ">", ">", "sourceToPropertiesMap", ")", "{", "for", "(", "ExecutionConfigSource", "s", ":", "propertySources", ...
deermine the final set of properties according to PropertySourceMode for each property
[ "deermine", "the", "final", "set", "of", "properties", "according", "to", "PropertySourceMode", "for", "each", "property" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/ConfigReader.java#L104-L115
train
Chorus-bdd/Chorus
interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/ConfigReader.java
ConfigReader.isTrue
public boolean isTrue(ExecutionProperty property) { return isSet(property) && propertyMap.get(property).size() == 1 && "true".equalsIgnoreCase(propertyMap.get(property).get(0)); }
java
public boolean isTrue(ExecutionProperty property) { return isSet(property) && propertyMap.get(property).size() == 1 && "true".equalsIgnoreCase(propertyMap.get(property).get(0)); }
[ "public", "boolean", "isTrue", "(", "ExecutionProperty", "property", ")", "{", "return", "isSet", "(", "property", ")", "&&", "propertyMap", ".", "get", "(", "property", ")", ".", "size", "(", ")", "==", "1", "&&", "\"true\"", ".", "equalsIgnoreCase", "(",...
for boolean properties, is the property set true
[ "for", "boolean", "properties", "is", "the", "property", "set", "true" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-config/src/main/java/org/chorusbdd/chorus/config/ConfigReader.java#L163-L166
train
Chorus-bdd/Chorus
interpreter/chorus-handlers/src/main/java/org/chorusbdd/chorus/handlers/choruscontext/ChorusContextHandler.java
ChorusContextHandler.initializeContextVariables
@Initialize(scope = Scope.SCENARIO) public void initializeContextVariables() { Properties p = new HandlerConfigLoader().loadProperties(configurationManager, "context"); for ( Map.Entry e : p.entrySet()) { ChorusContext.getContext().put(e.getKey().toString(), e.getValue().toString()); ...
java
@Initialize(scope = Scope.SCENARIO) public void initializeContextVariables() { Properties p = new HandlerConfigLoader().loadProperties(configurationManager, "context"); for ( Map.Entry e : p.entrySet()) { ChorusContext.getContext().put(e.getKey().toString(), e.getValue().toString()); ...
[ "@", "Initialize", "(", "scope", "=", "Scope", ".", "SCENARIO", ")", "public", "void", "initializeContextVariables", "(", ")", "{", "Properties", "p", "=", "new", "HandlerConfigLoader", "(", ")", ".", "loadProperties", "(", "configurationManager", ",", "\"contex...
Load any context properties defined in handler configuration files
[ "Load", "any", "context", "properties", "defined", "in", "handler", "configuration", "files" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-handlers/src/main/java/org/chorusbdd/chorus/handlers/choruscontext/ChorusContextHandler.java#L54-L60
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIInstitute.java
HBCIInstitute.updateBPD
void updateBPD(HashMap<String, String> result) { log.debug("extracting BPD from results"); HashMap<String, String> newBPD = new HashMap<>(); result.keySet().forEach(key -> { if (key.startsWith("BPD.")) { newBPD.put(key.substring(("BPD.").length()), result.get(key)); ...
java
void updateBPD(HashMap<String, String> result) { log.debug("extracting BPD from results"); HashMap<String, String> newBPD = new HashMap<>(); result.keySet().forEach(key -> { if (key.startsWith("BPD.")) { newBPD.put(key.substring(("BPD.").length()), result.get(key)); ...
[ "void", "updateBPD", "(", "HashMap", "<", "String", ",", "String", ">", "result", ")", "{", "log", ".", "debug", "(", "\"extracting BPD from results\"", ")", ";", "HashMap", "<", "String", ",", "String", ">", "newBPD", "=", "new", "HashMap", "<>", "(", "...
gets the BPD out of the result and store it in the passport field
[ "gets", "the", "BPD", "out", "of", "the", "result", "and", "store", "it", "in", "the", "passport", "field" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java#L68-L85
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIInstitute.java
HBCIInstitute.extractKeys
void extractKeys(HashMap<String, String> result) { boolean foundChanges = false; try { log.debug("extracting public institute keys from results"); for (int i = 0; i < 3; i++) { String head = HBCIUtils.withCounter("SendPubKey", i); String keyType ...
java
void extractKeys(HashMap<String, String> result) { boolean foundChanges = false; try { log.debug("extracting public institute keys from results"); for (int i = 0; i < 3; i++) { String head = HBCIUtils.withCounter("SendPubKey", i); String keyType ...
[ "void", "extractKeys", "(", "HashMap", "<", "String", ",", "String", ">", "result", ")", "{", "boolean", "foundChanges", "=", "false", ";", "try", "{", "log", ".", "debug", "(", "\"extracting public institute keys from results\"", ")", ";", "for", "(", "int", ...
gets the server public keys from the result and store them in the passport
[ "gets", "the", "server", "public", "keys", "from", "the", "result", "and", "store", "them", "in", "the", "passport" ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java#L90-L136
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIInstitute.java
HBCIInstitute.isBPDExpired
private boolean isBPDExpired() { Map<String, String> bpd = passport.getBPD(); log.info("[BPD] max age: " + maxAge + " days"); long maxMillis = -1L; try { int days = Integer.parseInt(maxAge); if (days == 0) { log.info("[BPD] auto-expiry disabled");...
java
private boolean isBPDExpired() { Map<String, String> bpd = passport.getBPD(); log.info("[BPD] max age: " + maxAge + " days"); long maxMillis = -1L; try { int days = Integer.parseInt(maxAge); if (days == 0) { log.info("[BPD] auto-expiry disabled");...
[ "private", "boolean", "isBPDExpired", "(", ")", "{", "Map", "<", "String", ",", "String", ">", "bpd", "=", "passport", ".", "getBPD", "(", ")", ";", "log", ".", "info", "(", "\"[BPD] max age: \"", "+", "maxAge", "+", "\" days\"", ")", ";", "long", "max...
Prueft, ob die BPD abgelaufen sind und neu geladen werden muessen. @return true, wenn die BPD abgelaufen sind.
[ "Prueft", "ob", "die", "BPD", "abgelaufen", "sind", "und", "neu", "geladen", "werden", "muessen", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java#L143-L181
train
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIInstitute.java
HBCIInstitute.fetchBPDAnonymous
void fetchBPDAnonymous() { // BPD abholen, wenn nicht vorhanden oder HBCI-Version geaendert Map<String, String> bpd = passport.getBPD(); String hbciVersionOfBPD = (bpd != null) ? bpd.get(BPD_KEY_HBCIVERSION) : null; final String version = passport.getBPDVersion(); if (version.eq...
java
void fetchBPDAnonymous() { // BPD abholen, wenn nicht vorhanden oder HBCI-Version geaendert Map<String, String> bpd = passport.getBPD(); String hbciVersionOfBPD = (bpd != null) ? bpd.get(BPD_KEY_HBCIVERSION) : null; final String version = passport.getBPDVersion(); if (version.eq...
[ "void", "fetchBPDAnonymous", "(", ")", "{", "// BPD abholen, wenn nicht vorhanden oder HBCI-Version geaendert", "Map", "<", "String", ",", "String", ">", "bpd", "=", "passport", ".", "getBPD", "(", ")", ";", "String", "hbciVersionOfBPD", "=", "(", "bpd", "!=", "nu...
Aktualisiert die BPD bei Bedarf.
[ "Aktualisiert", "die", "BPD", "bei", "Bedarf", "." ]
5e24f7e429d6b555e1d993196b4cf1adda6433cf
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIInstitute.java#L186-L248
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/FeatureFileParser.java
FeatureFileParser.getFeaturesWithConfigurations
private List<FeatureToken> getFeaturesWithConfigurations(List<String> configurationNames, FeatureToken parsedFeature) { List<FeatureToken> results = new ArrayList<>(); if (parsedFeature != null) { if (configurationNames == null) { results.add(parsedFeature); } els...
java
private List<FeatureToken> getFeaturesWithConfigurations(List<String> configurationNames, FeatureToken parsedFeature) { List<FeatureToken> results = new ArrayList<>(); if (parsedFeature != null) { if (configurationNames == null) { results.add(parsedFeature); } els...
[ "private", "List", "<", "FeatureToken", ">", "getFeaturesWithConfigurations", "(", "List", "<", "String", ">", "configurationNames", ",", "FeatureToken", "parsedFeature", ")", "{", "List", "<", "FeatureToken", ">", "results", "=", "new", "ArrayList", "<>", "(", ...
If parsedFeature has no configurations then we can return a single item list containg the parsedFeature If configurations are present we need to return a list with one feature per supported configuration @param configurationNames @param parsedFeature @return
[ "If", "parsedFeature", "has", "no", "configurations", "then", "we", "can", "return", "a", "single", "item", "list", "containg", "the", "parsedFeature", "If", "configurations", "are", "present", "we", "need", "to", "return", "a", "list", "with", "one", "feature...
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/FeatureFileParser.java#L308-L318
train
Chorus-bdd/Chorus
interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/FeatureFileParser.java
FeatureFileParser.extractTagsAndResetLastTagsLineField
private List<String> extractTagsAndResetLastTagsLineField() { String tags = lastTagsLine; List<String> result = extractTags(tags); resetLastTagsLine(); return result; }
java
private List<String> extractTagsAndResetLastTagsLineField() { String tags = lastTagsLine; List<String> result = extractTags(tags); resetLastTagsLine(); return result; }
[ "private", "List", "<", "String", ">", "extractTagsAndResetLastTagsLineField", "(", ")", "{", "String", "tags", "=", "lastTagsLine", ";", "List", "<", "String", ">", "result", "=", "extractTags", "(", "tags", ")", ";", "resetLastTagsLine", "(", ")", ";", "re...
Extracts the tags from the lastTagsLine field before setting it to null. @return the tags or null if lastTagsLine is null.
[ "Extracts", "the", "tags", "from", "the", "lastTagsLine", "field", "before", "setting", "it", "to", "null", "." ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-parser/src/main/java/org/chorusbdd/chorus/parser/FeatureFileParser.java#L445-L450
train
IBM-Cloud/gp-java-client
src/main/java/com/ibm/g11n/pipeline/client/TranslationRequestDataChangeSet.java
TranslationRequestDataChangeSet.setTargetLanguagesByBundle
public TranslationRequestDataChangeSet setTargetLanguagesByBundle( Map<String, Set<String>> targetLanguagesByBundle) { // TODO - check empty map? if (targetLanguagesByBundle == null) { throw new NullPointerException("The input map is null."); } this.targetLanguage...
java
public TranslationRequestDataChangeSet setTargetLanguagesByBundle( Map<String, Set<String>> targetLanguagesByBundle) { // TODO - check empty map? if (targetLanguagesByBundle == null) { throw new NullPointerException("The input map is null."); } this.targetLanguage...
[ "public", "TranslationRequestDataChangeSet", "setTargetLanguagesByBundle", "(", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "targetLanguagesByBundle", ")", "{", "// TODO - check empty map?", "if", "(", "targetLanguagesByBundle", "==", "null", ")", "{", ...
Sets a map containing target languages indexed by bundle IDs. This method adopts the input map without creating a safe copy. @param targetLanguagesByBundle A map containing target languages indexed by bundle IDs. @return This object. @throws NullPointerException When the input <code>targetLanguagesByBundle</code> i...
[ "Sets", "a", "map", "containing", "target", "languages", "indexed", "by", "bundle", "IDs", ".", "This", "method", "adopts", "the", "input", "map", "without", "creating", "a", "safe", "copy", "." ]
b015a081d7a7313bc48c448087fbc07bce860427
https://github.com/IBM-Cloud/gp-java-client/blob/b015a081d7a7313bc48c448087fbc07bce860427/src/main/java/com/ibm/g11n/pipeline/client/TranslationRequestDataChangeSet.java#L57-L65
train
Chorus-bdd/Chorus
interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/FilePathScanner.java
FilePathScanner.addFeaturesRecursively
private void addFeaturesRecursively(File directory, List<File> targetList, FileFilter fileFilter) { File[] files = directory.listFiles(); //sort the files here, since otherwise we get differences in execution order between 'nix, case sensitive //and win, case insensitive, toys 'r us Arr...
java
private void addFeaturesRecursively(File directory, List<File> targetList, FileFilter fileFilter) { File[] files = directory.listFiles(); //sort the files here, since otherwise we get differences in execution order between 'nix, case sensitive //and win, case insensitive, toys 'r us Arr...
[ "private", "void", "addFeaturesRecursively", "(", "File", "directory", ",", "List", "<", "File", ">", "targetList", ",", "FileFilter", "fileFilter", ")", "{", "File", "[", "]", "files", "=", "directory", ".", "listFiles", "(", ")", ";", "//sort the files here,...
Recursively scans subdirectories, adding all feature files to the targetList.
[ "Recursively", "scans", "subdirectories", "adding", "all", "feature", "files", "to", "the", "targetList", "." ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-pathscanner/src/main/java/org/chorusbdd/chorus/pathscanner/FilePathScanner.java#L69-L87
train
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java
PolledAssertion.await
public int await(TimeUnit unit, long length) { int pollPeriodMillis = getPollPeriodMillis(); long startTime = System.currentTimeMillis(); long expireTime = startTime + unit.toMillis(length); int iteration = 0; boolean success = false; while(true) { i...
java
public int await(TimeUnit unit, long length) { int pollPeriodMillis = getPollPeriodMillis(); long startTime = System.currentTimeMillis(); long expireTime = startTime + unit.toMillis(length); int iteration = 0; boolean success = false; while(true) { i...
[ "public", "int", "await", "(", "TimeUnit", "unit", ",", "long", "length", ")", "{", "int", "pollPeriodMillis", "=", "getPollPeriodMillis", "(", ")", ";", "long", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "expireTime", "=", ...
Wait for the assertions to pass for the specified time limit Validation will be attempted and errors handled silently until the timeout period expires after which assertion errors will be propagated and will cause test failure @return number of times validation was retried if it failed the first time
[ "Wait", "for", "the", "assertions", "to", "pass", "for", "the", "specified", "time", "limit" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java#L114-L154
train
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java
PolledAssertion.check
public int check(TimeUnit timeUnit, long count) { int pollPeriodMillis = getPollPeriodMillis(); long startTime = System.currentTimeMillis(); long expireTime = startTime + timeUnit.toMillis(count); int iteration = 0; while(true) { iteration++; try ...
java
public int check(TimeUnit timeUnit, long count) { int pollPeriodMillis = getPollPeriodMillis(); long startTime = System.currentTimeMillis(); long expireTime = startTime + timeUnit.toMillis(count); int iteration = 0; while(true) { iteration++; try ...
[ "public", "int", "check", "(", "TimeUnit", "timeUnit", ",", "long", "count", ")", "{", "int", "pollPeriodMillis", "=", "getPollPeriodMillis", "(", ")", ";", "long", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "long", "expireTime", "=...
check that the assertions pass for the whole duration of the period specified @return number of times validation was retried if it failed the first time
[ "check", "that", "the", "assertions", "pass", "for", "the", "whole", "duration", "of", "the", "period", "specified" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java#L173-L195
train
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java
PolledAssertion.propagateAsError
private void propagateAsError(Throwable t) { if ( t instanceof InvocationTargetException) { t = t.getCause(); } if ( Error.class.isAssignableFrom(t.getClass())) { throw (Error)t; } throw new PolledAssertionError(t); }
java
private void propagateAsError(Throwable t) { if ( t instanceof InvocationTargetException) { t = t.getCause(); } if ( Error.class.isAssignableFrom(t.getClass())) { throw (Error)t; } throw new PolledAssertionError(t); }
[ "private", "void", "propagateAsError", "(", "Throwable", "t", ")", "{", "if", "(", "t", "instanceof", "InvocationTargetException", ")", "{", "t", "=", "t", ".", "getCause", "(", ")", ";", "}", "if", "(", "Error", ".", "class", ".", "isAssignableFrom", "(...
Otherwise wrap with a PolledAssertionError and throw
[ "Otherwise", "wrap", "with", "a", "PolledAssertionError", "and", "throw" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/PolledAssertion.java#L211-L219
train
avast/syringe
src/main/java/com/avast/syringe/config/internal/ConfigClassAnalyzer.java
ConfigClassAnalyzer.stripDeep
public static Object stripDeep(Object decorated) { Object stripped = stripShallow(decorated); if (stripped == decorated) { return stripped; } else { return stripDeep(stripped); } }
java
public static Object stripDeep(Object decorated) { Object stripped = stripShallow(decorated); if (stripped == decorated) { return stripped; } else { return stripDeep(stripped); } }
[ "public", "static", "Object", "stripDeep", "(", "Object", "decorated", ")", "{", "Object", "stripped", "=", "stripShallow", "(", "decorated", ")", ";", "if", "(", "stripped", "==", "decorated", ")", "{", "return", "stripped", ";", "}", "else", "{", "return...
Strips all decorations from the decorated object. @param decorated the decorated object @return the stripped object
[ "Strips", "all", "decorations", "from", "the", "decorated", "object", "." ]
762da5e50776f2bc028e0cf17eac9bd09b5b6aab
https://github.com/avast/syringe/blob/762da5e50776f2bc028e0cf17eac9bd09b5b6aab/src/main/java/com/avast/syringe/config/internal/ConfigClassAnalyzer.java#L89-L96
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/support/JAXBUtils.java
JAXBUtils.writeObject
public static <T> void writeObject(final T entity, final Object destination, final String comment) { try { JAXBContext jaxbContext; if (entity instanceof JAXBElement) { jaxbContext = JAXBContext.newInstance(((JAXBElement) entity).getValue().getClass()); } else...
java
public static <T> void writeObject(final T entity, final Object destination, final String comment) { try { JAXBContext jaxbContext; if (entity instanceof JAXBElement) { jaxbContext = JAXBContext.newInstance(((JAXBElement) entity).getValue().getClass()); } else...
[ "public", "static", "<", "T", ">", "void", "writeObject", "(", "final", "T", "entity", ",", "final", "Object", "destination", ",", "final", "String", "comment", ")", "{", "try", "{", "JAXBContext", "jaxbContext", ";", "if", "(", "entity", "instanceof", "JA...
Write XML entity to the given destination. @param entity XML entity @param destination destination to write to. Supported destinations: {@link java.io.OutputStream}, {@link java.io.File}, {@link java.io.Writer} @param comment optional comment which will be added at the begining of the generated XML @throws IllegalArgu...
[ "Write", "XML", "entity", "to", "the", "given", "destination", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/support/JAXBUtils.java#L76-L104
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/support/JAXBUtils.java
JAXBUtils.writeObjectToString
public static <T> String writeObjectToString(final T entity) { ByteArrayOutputStream destination = new ByteArrayOutputStream(); writeObject(entity, destination, null); return destination.toString(); }
java
public static <T> String writeObjectToString(final T entity) { ByteArrayOutputStream destination = new ByteArrayOutputStream(); writeObject(entity, destination, null); return destination.toString(); }
[ "public", "static", "<", "T", ">", "String", "writeObjectToString", "(", "final", "T", "entity", ")", "{", "ByteArrayOutputStream", "destination", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "writeObject", "(", "entity", ",", "destination", ",", "null", ...
Write XML entity to the string. @param entity XML entity @throws IllegalArgumentException @throws SwidException @param <T> JAXB entity
[ "Write", "XML", "entity", "to", "the", "string", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/support/JAXBUtils.java#L116-L120
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/support/SwidUtils.java
SwidUtils.generateRegId
public static String generateRegId(final String domainCreationDate, final String reverseDomainName) { return generateRegId(domainCreationDate, reverseDomainName, null); }
java
public static String generateRegId(final String domainCreationDate, final String reverseDomainName) { return generateRegId(domainCreationDate, reverseDomainName, null); }
[ "public", "static", "String", "generateRegId", "(", "final", "String", "domainCreationDate", ",", "final", "String", "reverseDomainName", ")", "{", "return", "generateRegId", "(", "domainCreationDate", ",", "reverseDomainName", ",", "null", ")", ";", "}" ]
Generate RegId. @param domainCreationDate the date at which the entity creating the regid first owned the domain that is also used in the regid in year-month format; e.g. 2010-04 @param reverseDomainName the domain of the entity, in reverse order; e.g. com.labs64 @return generated RegId
[ "Generate", "RegId", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/support/SwidUtils.java#L59-L61
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/support/SwidUtils.java
SwidUtils.generateRegId
public static String generateRegId(final String domainCreationDate, final String reverseDomainName, final String suffix) { if (StringUtils.isBlank(domainCreationDate)) { throw new SwidException("domainCreationDate isn't defined"); } if (StringUtils.isBlank(reverseDomainNa...
java
public static String generateRegId(final String domainCreationDate, final String reverseDomainName, final String suffix) { if (StringUtils.isBlank(domainCreationDate)) { throw new SwidException("domainCreationDate isn't defined"); } if (StringUtils.isBlank(reverseDomainNa...
[ "public", "static", "String", "generateRegId", "(", "final", "String", "domainCreationDate", ",", "final", "String", "reverseDomainName", ",", "final", "String", "suffix", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "domainCreationDate", ")", ")", "...
Generate RegId with additional suffix. @param domainCreationDate the date at which the entity creating the regid first owned the domain that is also used in the regid in year-month format; e.g. 2010-04 @param reverseDomainName the domain of the entity, in reverse order; e.g. com.labs64 @param suffix additional sub-ent...
[ "Generate", "RegId", "with", "additional", "suffix", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/support/SwidUtils.java#L75-L95
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/processor/DefaultSwidProcessor.java
DefaultSwidProcessor.setGenerator
public void setGenerator(final IdGenerator generator) { if (generator != null) { this.idGenerator = generator; swidTag.setId(idGenerator.nextId()); } }
java
public void setGenerator(final IdGenerator generator) { if (generator != null) { this.idGenerator = generator; swidTag.setId(idGenerator.nextId()); } }
[ "public", "void", "setGenerator", "(", "final", "IdGenerator", "generator", ")", "{", "if", "(", "generator", "!=", "null", ")", "{", "this", ".", "idGenerator", "=", "generator", ";", "swidTag", ".", "setId", "(", "idGenerator", ".", "nextId", "(", ")", ...
Set element identifier generator. @param generator element identifier generator
[ "Set", "element", "identifier", "generator", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/processor/DefaultSwidProcessor.java#L53-L58
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/processor/DefaultSwidProcessor.java
DefaultSwidProcessor.validate
public void validate() { if (swidTag.getEntitlementRequiredIndicator() == null) { throw new SwidException("'entitlement_required_indicator' is not set"); } if (swidTag.getProductTitle() == null) { throw new SwidException("'product_title' is not set"); } if...
java
public void validate() { if (swidTag.getEntitlementRequiredIndicator() == null) { throw new SwidException("'entitlement_required_indicator' is not set"); } if (swidTag.getProductTitle() == null) { throw new SwidException("'product_title' is not set"); } if...
[ "public", "void", "validate", "(", ")", "{", "if", "(", "swidTag", ".", "getEntitlementRequiredIndicator", "(", ")", "==", "null", ")", "{", "throw", "new", "SwidException", "(", "\"'entitlement_required_indicator' is not set\"", ")", ";", "}", "if", "(", "swidT...
Validate whether processor configuration is valid. @throws com.labs64.utils.swid.exception.SwidException in case of invalid processor configuration
[ "Validate", "whether", "processor", "configuration", "is", "valid", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/processor/DefaultSwidProcessor.java#L221-L243
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/io/SwidWriter.java
SwidWriter.write
public void write(final SoftwareIdentificationTagComplexType swidTag, final java.io.OutputStream output) { JAXBUtils.writeObject(objectFactory.createSoftwareIdentificationTag(swidTag), output, getComment()); }
java
public void write(final SoftwareIdentificationTagComplexType swidTag, final java.io.OutputStream output) { JAXBUtils.writeObject(objectFactory.createSoftwareIdentificationTag(swidTag), output, getComment()); }
[ "public", "void", "write", "(", "final", "SoftwareIdentificationTagComplexType", "swidTag", ",", "final", "java", ".", "io", ".", "OutputStream", "output", ")", "{", "JAXBUtils", ".", "writeObject", "(", "objectFactory", ".", "createSoftwareIdentificationTag", "(", ...
Write the object into an output stream. @param swidTag The SWID Tag object to be written. @param output SWID Tag will be added to this stream. @throws com.labs64.utils.swid.exception.SwidException If any unexpected problem occurs during the writing. @throws IllegalArgumentException If any of the method parameters are...
[ "Write", "the", "object", "into", "an", "output", "stream", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/io/SwidWriter.java#L44-L46
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/io/SwidWriter.java
SwidWriter.write
public void write(final SoftwareIdentificationTagComplexType swidTag, final File file) { JAXBUtils.writeObject(objectFactory.createSoftwareIdentificationTag(swidTag), file, getComment()); }
java
public void write(final SoftwareIdentificationTagComplexType swidTag, final File file) { JAXBUtils.writeObject(objectFactory.createSoftwareIdentificationTag(swidTag), file, getComment()); }
[ "public", "void", "write", "(", "final", "SoftwareIdentificationTagComplexType", "swidTag", ",", "final", "File", "file", ")", "{", "JAXBUtils", ".", "writeObject", "(", "objectFactory", ".", "createSoftwareIdentificationTag", "(", "swidTag", ")", ",", "file", ",", ...
Write the object into a file. @param swidTag The root of content tree to be written. @param file File to be written. If this file already exists, it will be overwritten. @throws com.labs64.utils.swid.exception.SwidException If any unexpected problem occurs during the writing. @throws IllegalArgumentException If any o...
[ "Write", "the", "object", "into", "a", "file", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/io/SwidWriter.java#L61-L63
train
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/io/SwidWriter.java
SwidWriter.write
public void write(final SoftwareIdentificationTagComplexType swidTag, final java.io.Writer writer) { JAXBUtils.writeObject(objectFactory.createSoftwareIdentificationTag(swidTag), writer, getComment()); }
java
public void write(final SoftwareIdentificationTagComplexType swidTag, final java.io.Writer writer) { JAXBUtils.writeObject(objectFactory.createSoftwareIdentificationTag(swidTag), writer, getComment()); }
[ "public", "void", "write", "(", "final", "SoftwareIdentificationTagComplexType", "swidTag", ",", "final", "java", ".", "io", ".", "Writer", "writer", ")", "{", "JAXBUtils", ".", "writeObject", "(", "objectFactory", ".", "createSoftwareIdentificationTag", "(", "swidT...
Write the object into a Writer. @param swidTag The root of content tree to be written. @param writer SWID Tag will be sent to this writer. @throws com.labs64.utils.swid.exception.SwidException If any unexpected problem occurs during the writing. @throws IllegalArgumentException If any of the method parameters are nul...
[ "Write", "the", "object", "into", "a", "Writer", "." ]
cf78d2469469a09701bce7c5f966ac6de2b7c613
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/io/SwidWriter.java#L78-L80
train
aerogear/aerogear-unifiedpush-java-client
src/main/java/org/jboss/aerogear/unifiedpush/utils/HttpRequestUtil.java
HttpRequestUtil.post
public static URLConnection post(String url, String encodedCredentials, String jsonPayloadObject, Charset charset, ProxyConfig proxy, TrustStoreConfig customTrustStore, ConnectionSettings connectionSettings) throws Exception { if (url == null || encodedCredentials == null |...
java
public static URLConnection post(String url, String encodedCredentials, String jsonPayloadObject, Charset charset, ProxyConfig proxy, TrustStoreConfig customTrustStore, ConnectionSettings connectionSettings) throws Exception { if (url == null || encodedCredentials == null |...
[ "public", "static", "URLConnection", "post", "(", "String", "url", ",", "String", "encodedCredentials", ",", "String", "jsonPayloadObject", ",", "Charset", "charset", ",", "ProxyConfig", "proxy", ",", "TrustStoreConfig", "customTrustStore", ",", "ConnectionSettings", ...
Returns URLConnection that 'posts' the given JSON to the given UnifiedPush Server URL. @param url @param encodedCredentials @param jsonPayloadObject @param charset @param proxy @param customTrustStore @param connectionSettings @return {@link URLConnection} @throws Exception
[ "Returns", "URLConnection", "that", "posts", "the", "given", "JSON", "to", "the", "given", "UnifiedPush", "Server", "URL", "." ]
50705dc1b9e301a99fa73a9c5fd14e76c2a28c80
https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/50705dc1b9e301a99fa73a9c5fd14e76c2a28c80/src/main/java/org/jboss/aerogear/unifiedpush/utils/HttpRequestUtil.java#L99-L151
train
aerogear/aerogear-unifiedpush-java-client
src/main/java/org/jboss/aerogear/unifiedpush/DefaultPushSender.java
DefaultPushSender.submitPayload
private void submitPayload(String url, HttpRequestUtil.ConnectionSettings connectionSettings, String jsonPayloadObject, String pushApplicationId, String masterSecret, MessageResponseCallback callback, List<String> redirectUrls) { if (redirectUrls.contains(url)) { throw...
java
private void submitPayload(String url, HttpRequestUtil.ConnectionSettings connectionSettings, String jsonPayloadObject, String pushApplicationId, String masterSecret, MessageResponseCallback callback, List<String> redirectUrls) { if (redirectUrls.contains(url)) { throw...
[ "private", "void", "submitPayload", "(", "String", "url", ",", "HttpRequestUtil", ".", "ConnectionSettings", "connectionSettings", ",", "String", "jsonPayloadObject", ",", "String", "pushApplicationId", ",", "String", "masterSecret", ",", "MessageResponseCallback", "callb...
The actual method that does the real send and connection handling @param url the URL to use for the HTTP POST request. @param connectionSettings additional settings to use for the underlying {@link java.net.URLConnection}. @param jsonPayloadObject the JSON payload of the POST request @param pushApplicationId the regis...
[ "The", "actual", "method", "that", "does", "the", "real", "send", "and", "connection", "handling" ]
50705dc1b9e301a99fa73a9c5fd14e76c2a28c80
https://github.com/aerogear/aerogear-unifiedpush-java-client/blob/50705dc1b9e301a99fa73a9c5fd14e76c2a28c80/src/main/java/org/jboss/aerogear/unifiedpush/DefaultPushSender.java#L281-L332
train
gekoh/yaGen
lib/yagen-api/src/main/java/com/github/gekoh/yagen/api/AuditInfo.java
AuditInfo.prePersist
public void prePersist() { this.createdAt = getCurrentTime(); if (this.createdBy == null || this.createdBy.trim().length()<1) { this.createdBy = getUserName(); } }
java
public void prePersist() { this.createdAt = getCurrentTime(); if (this.createdBy == null || this.createdBy.trim().length()<1) { this.createdBy = getUserName(); } }
[ "public", "void", "prePersist", "(", ")", "{", "this", ".", "createdAt", "=", "getCurrentTime", "(", ")", ";", "if", "(", "this", ".", "createdBy", "==", "null", "||", "this", ".", "createdBy", ".", "trim", "(", ")", ".", "length", "(", ")", "<", "...
Called by JPA container before sql insert.
[ "Called", "by", "JPA", "container", "before", "sql", "insert", "." ]
144cabeb294ce9d3d9e6f78403085d146579cc8e
https://github.com/gekoh/yaGen/blob/144cabeb294ce9d3d9e6f78403085d146579cc8e/lib/yagen-api/src/main/java/com/github/gekoh/yagen/api/AuditInfo.java#L77-L83
train
gekoh/yaGen
lib/yagen-api/src/main/java/com/github/gekoh/yagen/util/FieldInfo.java
FieldInfo.concatOverrides
private static String concatOverrides(String annotation, Collection<String> attributeOverrides) { if (attributeOverrides == null || attributeOverrides.size() < 1) { return annotation; } if (annotation == null) { annotation = ""; } else { Matche...
java
private static String concatOverrides(String annotation, Collection<String> attributeOverrides) { if (attributeOverrides == null || attributeOverrides.size() < 1) { return annotation; } if (annotation == null) { annotation = ""; } else { Matche...
[ "private", "static", "String", "concatOverrides", "(", "String", "annotation", ",", "Collection", "<", "String", ">", "attributeOverrides", ")", "{", "if", "(", "attributeOverrides", "==", "null", "||", "attributeOverrides", ".", "size", "(", ")", "<", "1", ")...
merges given collection of javax.persistence.AttributeOverride elements into an optionally existing javax.persistence.AttributeOverrides annotation with optionally pre-existing javax.persistence.AttributeOverride elements. @param annotation existing javax.persistence.AttributeOverrides annotation, if any, otherwise it...
[ "merges", "given", "collection", "of", "javax", ".", "persistence", ".", "AttributeOverride", "elements", "into", "an", "optionally", "existing", "javax", ".", "persistence", ".", "AttributeOverrides", "annotation", "with", "optionally", "pre", "-", "existing", "jav...
144cabeb294ce9d3d9e6f78403085d146579cc8e
https://github.com/gekoh/yaGen/blob/144cabeb294ce9d3d9e6f78403085d146579cc8e/lib/yagen-api/src/main/java/com/github/gekoh/yagen/util/FieldInfo.java#L349-L386
train
gekoh/yaGen
lib/yagen-api/src/main/java/com/github/gekoh/yagen/hibernate/PatchGlue.java
PatchGlue.schemaExportPerform
public static void schemaExportPerform (String[] sqlCommands, List exporters, SchemaExport schemaExport) { if (schemaExportPerform == null) { try { schemaExportPerform = SchemaExport.class.getMethod("performApi", String[].class, List.class, String.class); } catch (NoSuchM...
java
public static void schemaExportPerform (String[] sqlCommands, List exporters, SchemaExport schemaExport) { if (schemaExportPerform == null) { try { schemaExportPerform = SchemaExport.class.getMethod("performApi", String[].class, List.class, String.class); } catch (NoSuchM...
[ "public", "static", "void", "schemaExportPerform", "(", "String", "[", "]", "sqlCommands", ",", "List", "exporters", ",", "SchemaExport", "schemaExport", ")", "{", "if", "(", "schemaExportPerform", "==", "null", ")", "{", "try", "{", "schemaExportPerform", "=", ...
Hibernate 4.3.5
[ "Hibernate", "4", ".", "3", ".", "5" ]
144cabeb294ce9d3d9e6f78403085d146579cc8e
https://github.com/gekoh/yaGen/blob/144cabeb294ce9d3d9e6f78403085d146579cc8e/lib/yagen-api/src/main/java/com/github/gekoh/yagen/hibernate/PatchGlue.java#L268-L302
train
centic9/commons-test
src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java
SafeCloseSmtpServer.run
@Override public void run() { stopped = false; try { try { serverSocket = new ServerSocket(port); serverSocket.setSoTimeout(TIMEOUT); // Block for maximum of 1.5 seconds } finally { // Notify when server socket has been created startupBarrier.countDown(); } // Server: loop until stoppe...
java
@Override public void run() { stopped = false; try { try { serverSocket = new ServerSocket(port); serverSocket.setSoTimeout(TIMEOUT); // Block for maximum of 1.5 seconds } finally { // Notify when server socket has been created startupBarrier.countDown(); } // Server: loop until stoppe...
[ "@", "Override", "public", "void", "run", "(", ")", "{", "stopped", "=", "false", ";", "try", "{", "try", "{", "serverSocket", "=", "new", "ServerSocket", "(", "port", ")", ";", "serverSocket", ".", "setSoTimeout", "(", "TIMEOUT", ")", ";", "// Block for...
Main loop of the SMTP server.
[ "Main", "loop", "of", "the", "SMTP", "server", "." ]
562047c198133ecb116f2472e9aeb15e866579f5
https://github.com/centic9/commons-test/blob/562047c198133ecb116f2472e9aeb15e866579f5/src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java#L104-L164
train
centic9/commons-test
src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java
SafeCloseSmtpServer.stop
public synchronized void stop() { // Mark us closed stopped = true; try { // Kick the server accept loop serverSocket.close(); // acquire all semaphores so that we wait for all connections to finish before we report back as closed semaphore.acquireUninterruptibly(MAXIMUM_CONCURRENT_READERS); } catc...
java
public synchronized void stop() { // Mark us closed stopped = true; try { // Kick the server accept loop serverSocket.close(); // acquire all semaphores so that we wait for all connections to finish before we report back as closed semaphore.acquireUninterruptibly(MAXIMUM_CONCURRENT_READERS); } catc...
[ "public", "synchronized", "void", "stop", "(", ")", "{", "// Mark us closed", "stopped", "=", "true", ";", "try", "{", "// Kick the server accept loop", "serverSocket", ".", "close", "(", ")", ";", "// acquire all semaphores so that we wait for all connections to finish bef...
Stops the server. Server is shutdown after processing of the current request is complete.
[ "Stops", "the", "server", ".", "Server", "is", "shutdown", "after", "processing", "of", "the", "current", "request", "is", "complete", "." ]
562047c198133ecb116f2472e9aeb15e866579f5
https://github.com/centic9/commons-test/blob/562047c198133ecb116f2472e9aeb15e866579f5/src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java#L179-L191
train
centic9/commons-test
src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java
SafeCloseSmtpServer.handleTransaction
private List<SmtpMessage> handleTransaction(PrintWriter out, BufferedReader input) throws IOException { // Initialize the state machine SmtpState smtpState = SmtpState.CONNECT; SmtpRequest smtpRequest = new SmtpRequest(SmtpActionType.CONNECT, "", smtpState); // Execute the connection request SmtpResponse smt...
java
private List<SmtpMessage> handleTransaction(PrintWriter out, BufferedReader input) throws IOException { // Initialize the state machine SmtpState smtpState = SmtpState.CONNECT; SmtpRequest smtpRequest = new SmtpRequest(SmtpActionType.CONNECT, "", smtpState); // Execute the connection request SmtpResponse smt...
[ "private", "List", "<", "SmtpMessage", ">", "handleTransaction", "(", "PrintWriter", "out", ",", "BufferedReader", "input", ")", "throws", "IOException", "{", "// Initialize the state machine", "SmtpState", "smtpState", "=", "SmtpState", ".", "CONNECT", ";", "SmtpRequ...
Handle an SMTP transaction, i.e. all activity between initial connect and QUIT command. @param out output stream @param input input stream @return List of SmtpMessage
[ "Handle", "an", "SMTP", "transaction", "i", ".", "e", ".", "all", "activity", "between", "initial", "connect", "and", "QUIT", "command", "." ]
562047c198133ecb116f2472e9aeb15e866579f5
https://github.com/centic9/commons-test/blob/562047c198133ecb116f2472e9aeb15e866579f5/src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java#L200-L243
train
centic9/commons-test
src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java
SafeCloseSmtpServer.sendResponse
private static void sendResponse(PrintWriter out, SmtpResponse smtpResponse) { if (smtpResponse.getCode() > 0) { int code = smtpResponse.getCode(); String message = smtpResponse.getMessage(); out.print(code + " " + message + "\r\n"); out.flush(); } }
java
private static void sendResponse(PrintWriter out, SmtpResponse smtpResponse) { if (smtpResponse.getCode() > 0) { int code = smtpResponse.getCode(); String message = smtpResponse.getMessage(); out.print(code + " " + message + "\r\n"); out.flush(); } }
[ "private", "static", "void", "sendResponse", "(", "PrintWriter", "out", ",", "SmtpResponse", "smtpResponse", ")", "{", "if", "(", "smtpResponse", ".", "getCode", "(", ")", ">", "0", ")", "{", "int", "code", "=", "smtpResponse", ".", "getCode", "(", ")", ...
Send response to client. @param out socket output stream @param smtpResponse response object
[ "Send", "response", "to", "client", "." ]
562047c198133ecb116f2472e9aeb15e866579f5
https://github.com/centic9/commons-test/blob/562047c198133ecb116f2472e9aeb15e866579f5/src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java#L251-L258
train
centic9/commons-test
src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java
SafeCloseSmtpServer.start
public static SafeCloseSmtpServer start(int port) { SafeCloseSmtpServer server = new SafeCloseSmtpServer(port); Thread t = new Thread(server, "Mock SMTP Server Thread"); t.start(); // Block until the server socket is created try { server.startupBarrier.await(); } catch (InterruptedException e) { log....
java
public static SafeCloseSmtpServer start(int port) { SafeCloseSmtpServer server = new SafeCloseSmtpServer(port); Thread t = new Thread(server, "Mock SMTP Server Thread"); t.start(); // Block until the server socket is created try { server.startupBarrier.await(); } catch (InterruptedException e) { log....
[ "public", "static", "SafeCloseSmtpServer", "start", "(", "int", "port", ")", "{", "SafeCloseSmtpServer", "server", "=", "new", "SafeCloseSmtpServer", "(", "port", ")", ";", "Thread", "t", "=", "new", "Thread", "(", "server", ",", "\"Mock SMTP Server Thread\"", "...
Creates an instance of SimpleSmtpServer and starts it. @param port port number the server should listen to @return a reference to the SMTP server
[ "Creates", "an", "instance", "of", "SimpleSmtpServer", "and", "starts", "it", "." ]
562047c198133ecb116f2472e9aeb15e866579f5
https://github.com/centic9/commons-test/blob/562047c198133ecb116f2472e9aeb15e866579f5/src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java#L284-L297
train
galan/commons
src/main/java/de/galan/commons/net/Ports.java
Ports.findFree
public static Integer findFree(int lowIncluse, int highInclusive) { int low = Math.max(1, Math.min(lowIncluse, highInclusive)); int high = Math.min(65535, Math.max(lowIncluse, highInclusive)); Integer result = null; int split = RandomUtils.nextInt(low, high + 1); for (int port = split; port <= high; port++) {...
java
public static Integer findFree(int lowIncluse, int highInclusive) { int low = Math.max(1, Math.min(lowIncluse, highInclusive)); int high = Math.min(65535, Math.max(lowIncluse, highInclusive)); Integer result = null; int split = RandomUtils.nextInt(low, high + 1); for (int port = split; port <= high; port++) {...
[ "public", "static", "Integer", "findFree", "(", "int", "lowIncluse", ",", "int", "highInclusive", ")", "{", "int", "low", "=", "Math", ".", "max", "(", "1", ",", "Math", ".", "min", "(", "lowIncluse", ",", "highInclusive", ")", ")", ";", "int", "high",...
Returns a free port in the defined range, returns null if none is available.
[ "Returns", "a", "free", "port", "in", "the", "defined", "range", "returns", "null", "if", "none", "is", "available", "." ]
45d2f36c69958d3f847e5fed66603ea629471822
https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/net/Ports.java#L27-L47
train
galan/commons
src/main/java/de/galan/commons/net/flux/Flux.java
Flux.addDefaultHeader
public static void addDefaultHeader(String key, String value) { if (isNotBlank(key) && isNotBlank(value)) { if (defaultHeader == null) { defaultHeader = new HashMap<String, String>(); } defaultHeader.put(key, value); } }
java
public static void addDefaultHeader(String key, String value) { if (isNotBlank(key) && isNotBlank(value)) { if (defaultHeader == null) { defaultHeader = new HashMap<String, String>(); } defaultHeader.put(key, value); } }
[ "public", "static", "void", "addDefaultHeader", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "isNotBlank", "(", "key", ")", "&&", "isNotBlank", "(", "value", ")", ")", "{", "if", "(", "defaultHeader", "==", "null", ")", "{", "defa...
Added default headers will always be send, can still be overriden using the builder.
[ "Added", "default", "headers", "will", "always", "be", "send", "can", "still", "be", "overriden", "using", "the", "builder", "." ]
45d2f36c69958d3f847e5fed66603ea629471822
https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/net/flux/Flux.java#L103-L110
train
galan/commons
src/main/java/de/galan/commons/net/flux/Flux.java
Flux.request
public static HttpBuilder request(String protocol, String host, Integer port, String path) { return defaults(createClient().request(protocol, host, port, path)); }
java
public static HttpBuilder request(String protocol, String host, Integer port, String path) { return defaults(createClient().request(protocol, host, port, path)); }
[ "public", "static", "HttpBuilder", "request", "(", "String", "protocol", ",", "String", "host", ",", "Integer", "port", ",", "String", "path", ")", "{", "return", "defaults", "(", "createClient", "(", ")", ".", "request", "(", "protocol", ",", "host", ",",...
Specifies the resource to be requested. @param protocol Protocol of the resource @param host Host of the resource @param port Port the host is listening on @param path Path for the resource @return The HttpBuilder
[ "Specifies", "the", "resource", "to", "be", "requested", "." ]
45d2f36c69958d3f847e5fed66603ea629471822
https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/net/flux/Flux.java#L150-L152
train