repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
jamesagnew/hapi-fhir
hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IdType.java
IdType.withServerBase
@Override public IdType withServerBase(String theServerBase, String theResourceType) { """ Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be used if the ID does not already contain those respective parts). Essentially, because IdType can contain eithe...
java
@Override public IdType withServerBase(String theServerBase, String theResourceType) { return new IdType(theServerBase, theResourceType, getIdPart(), getVersionIdPart()); }
[ "@", "Override", "public", "IdType", "withServerBase", "(", "String", "theServerBase", ",", "String", "theResourceType", ")", "{", "return", "new", "IdType", "(", "theServerBase", ",", "theResourceType", ",", "getIdPart", "(", ")", ",", "getVersionIdPart", "(", ...
Returns a view of this ID as a fully qualified URL, given a server base and resource name (which will only be used if the ID does not already contain those respective parts). Essentially, because IdType can contain either a complete URL or a partial one (or even jut a simple ID), this method may be used to translate in...
[ "Returns", "a", "view", "of", "this", "ID", "as", "a", "fully", "qualified", "URL", "given", "a", "server", "base", "and", "resource", "name", "(", "which", "will", "only", "be", "used", "if", "the", "ID", "does", "not", "already", "contain", "those", ...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/IdType.java#L668-L671
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/LineReader.java
LineReader.readLine
public int readLine(Text str, int maxLineLength) throws IOException { """ Read from the InputStream into the given Text. @param str the object to store the given line @param maxLineLength the maximum number of bytes to store into str. @return the number of bytes read including the newline @throws IOException i...
java
public int readLine(Text str, int maxLineLength) throws IOException { return readLine(str, maxLineLength, Integer.MAX_VALUE); }
[ "public", "int", "readLine", "(", "Text", "str", ",", "int", "maxLineLength", ")", "throws", "IOException", "{", "return", "readLine", "(", "str", ",", "maxLineLength", ",", "Integer", ".", "MAX_VALUE", ")", ";", "}" ]
Read from the InputStream into the given Text. @param str the object to store the given line @param maxLineLength the maximum number of bytes to store into str. @return the number of bytes read including the newline @throws IOException if the underlying stream throws
[ "Read", "from", "the", "InputStream", "into", "the", "given", "Text", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/LineReader.java#L301-L303
k0shk0sh/PermissionHelper
permission/src/main/java/com/fastaccess/permission/base/PermissionFragmentHelper.java
PermissionFragmentHelper.isPermissionGranted
public static boolean isPermissionGranted(@NonNull Fragment context, @NonNull String permission) { """ return true if permission is granted, false otherwise. <p/> can be used outside of activity. """ return ActivityCompat.checkSelfPermission(context.getContext(), permission) == PackageManager.PERMISS...
java
public static boolean isPermissionGranted(@NonNull Fragment context, @NonNull String permission) { return ActivityCompat.checkSelfPermission(context.getContext(), permission) == PackageManager.PERMISSION_GRANTED; }
[ "public", "static", "boolean", "isPermissionGranted", "(", "@", "NonNull", "Fragment", "context", ",", "@", "NonNull", "String", "permission", ")", "{", "return", "ActivityCompat", ".", "checkSelfPermission", "(", "context", ".", "getContext", "(", ")", ",", "pe...
return true if permission is granted, false otherwise. <p/> can be used outside of activity.
[ "return", "true", "if", "permission", "is", "granted", "false", "otherwise", ".", "<p", "/", ">", "can", "be", "used", "outside", "of", "activity", "." ]
train
https://github.com/k0shk0sh/PermissionHelper/blob/04edce2af49981d1dd321bcdfbe981a1000b29d7/permission/src/main/java/com/fastaccess/permission/base/PermissionFragmentHelper.java#L339-L341
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.findContentText
@Nullable public static String findContentText(final Node rootNode, final XPath xPath, final String expression) { """ Returns an string from a node's content. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match ...
java
@Nullable public static String findContentText(final Node rootNode, final XPath xPath, final String expression) { final Node node = findNode(rootNode, xPath, expression); if (node == null) { return null; } return node.getTextContent(); }
[ "@", "Nullable", "public", "static", "String", "findContentText", "(", "final", "Node", "rootNode", ",", "final", "XPath", "xPath", ",", "final", "String", "expression", ")", "{", "final", "Node", "node", "=", "findNode", "(", "rootNode", ",", "xPath", ",", ...
Returns an string from a node's content. @param rootNode Node to search. @param xPath XPath to use. @param expression XPath expression. @return Node or <code>null</code> if no match was found.
[ "Returns", "an", "string", "from", "a", "node", "s", "content", "." ]
train
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L61-L68
VoltDB/voltdb
src/frontend/org/voltdb/messaging/FastSerializer.java
FastSerializer.writeString
public static void writeString(String string, ByteBuffer buffer) throws IOException { """ Write a string in the standard VoltDB way without wrapping the byte buffer. """ if (string == null) { buffer.putInt(VoltType.NULL_STRING_LENGTH); return; } byte[] strbytes...
java
public static void writeString(String string, ByteBuffer buffer) throws IOException { if (string == null) { buffer.putInt(VoltType.NULL_STRING_LENGTH); return; } byte[] strbytes = string.getBytes(Constants.UTF8ENCODING); int len = strbytes.length; buffer...
[ "public", "static", "void", "writeString", "(", "String", "string", ",", "ByteBuffer", "buffer", ")", "throws", "IOException", "{", "if", "(", "string", "==", "null", ")", "{", "buffer", ".", "putInt", "(", "VoltType", ".", "NULL_STRING_LENGTH", ")", ";", ...
Write a string in the standard VoltDB way without wrapping the byte buffer.
[ "Write", "a", "string", "in", "the", "standard", "VoltDB", "way", "without", "wrapping", "the", "byte", "buffer", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/messaging/FastSerializer.java#L230-L241
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2ConnectionSettings.java
H2ConnectionSettings.processUpgradeHeaderSettings
protected void processUpgradeHeaderSettings(String settings) throws Http2Exception { """ A settings frame can be encoded as a base-64 string and passed as a header on the initial upgrade request. This method decodes that base-64 string and applies the encoded settings to this http2 connection. """ if...
java
protected void processUpgradeHeaderSettings(String settings) throws Http2Exception { if (settings != null) { byte[] decoded = decode(settings); if (decoded != null) { FrameSettings settingsFrame = new FrameSettings(0, decoded.length, (byte) 0x0, false, FrameDirection.REA...
[ "protected", "void", "processUpgradeHeaderSettings", "(", "String", "settings", ")", "throws", "Http2Exception", "{", "if", "(", "settings", "!=", "null", ")", "{", "byte", "[", "]", "decoded", "=", "decode", "(", "settings", ")", ";", "if", "(", "decoded", ...
A settings frame can be encoded as a base-64 string and passed as a header on the initial upgrade request. This method decodes that base-64 string and applies the encoded settings to this http2 connection.
[ "A", "settings", "frame", "can", "be", "encoded", "as", "a", "base", "-", "64", "string", "and", "passed", "as", "a", "header", "on", "the", "initial", "upgrade", "request", ".", "This", "method", "decodes", "that", "base", "-", "64", "string", "and", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2ConnectionSettings.java#L33-L43
nmorel/gwt-jackson
extensions/guava/src/main/java/com/github/nmorel/gwtjackson/guava/client/deser/BaseImmutableMapJsonDeserializer.java
BaseImmutableMapJsonDeserializer.buildMap
protected void buildMap( JsonReader reader, JsonDeserializationContext ctx, JsonDeserializerParameters params, Builder<K, V> builder ) { """ Build the {@link ImmutableMap} using the given builder. @param reader {@link JsonReader} used to read the JSON input @param ctx Context for the full deserialization proce...
java
protected void buildMap( JsonReader reader, JsonDeserializationContext ctx, JsonDeserializerParameters params, Builder<K, V> builder ) { reader.beginObject(); while ( JsonToken.END_OBJECT != reader.peek() ) { String name = reader.nextName(); K key = keyDeserializer.deserialize( n...
[ "protected", "void", "buildMap", "(", "JsonReader", "reader", ",", "JsonDeserializationContext", "ctx", ",", "JsonDeserializerParameters", "params", ",", "Builder", "<", "K", ",", "V", ">", "builder", ")", "{", "reader", ".", "beginObject", "(", ")", ";", "whi...
Build the {@link ImmutableMap} using the given builder. @param reader {@link JsonReader} used to read the JSON input @param ctx Context for the full deserialization process @param params Parameters for this deserialization @param builder {@link ImmutableMap.Builder} used to collect the entries
[ "Build", "the", "{", "@link", "ImmutableMap", "}", "using", "the", "given", "builder", "." ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/extensions/guava/src/main/java/com/github/nmorel/gwtjackson/guava/client/deser/BaseImmutableMapJsonDeserializer.java#L72-L81
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_voicemail_serviceName_greetings_id_GET
public OvhVoicemailGreetings billingAccount_voicemail_serviceName_greetings_id_GET(String billingAccount, String serviceName, Long id) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/voicemail/{serviceName}/greetings/{id} @param billingAccount [required] The name of yo...
java
public OvhVoicemailGreetings billingAccount_voicemail_serviceName_greetings_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/greetings/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceName, id); String r...
[ "public", "OvhVoicemailGreetings", "billingAccount_voicemail_serviceName_greetings_id_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/voicemail/{ser...
Get this object properties REST: GET /telephony/{billingAccount}/voicemail/{serviceName}/greetings/{id} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required] Id of the object
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7833-L7838
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/XMLValidator.java
XMLValidator.setXmlPreambleAndDTD
private String setXmlPreambleAndDTD(final String xml, final String dtdFileName, final String entities, final String dtdRootEleName) { """ Sets the DTD for an xml file. If there are any entities then they are removed. This function will also add the preamble to the XML if it doesn't exist. @param xml ...
java
private String setXmlPreambleAndDTD(final String xml, final String dtdFileName, final String entities, final String dtdRootEleName) { // Check if the XML already has a DOCTYPE. If it does then replace the values and remove entities for processing final Matcher matcher = DOCTYPE_PATTERN.matcher(xml); ...
[ "private", "String", "setXmlPreambleAndDTD", "(", "final", "String", "xml", ",", "final", "String", "dtdFileName", ",", "final", "String", "entities", ",", "final", "String", "dtdRootEleName", ")", "{", "// Check if the XML already has a DOCTYPE. If it does then replace the...
Sets the DTD for an xml file. If there are any entities then they are removed. This function will also add the preamble to the XML if it doesn't exist. @param xml The XML to add the DTD for. @param dtdFileName The file/url name of the DTD. @param dtdRootEleName The name of the root element in the XML tha...
[ "Sets", "the", "DTD", "for", "an", "xml", "file", ".", "If", "there", "are", "any", "entities", "then", "they", "are", "removed", ".", "This", "function", "will", "also", "add", "the", "preamble", "to", "the", "XML", "if", "it", "doesn", "t", "exist", ...
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/XMLValidator.java#L290-L332
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java
Log.shouldReport
protected boolean shouldReport(JavaFileObject file, int pos) { """ Returns true if an error needs to be reported for a given source name and pos. """ if (file == null) return true; Pair<JavaFileObject,Integer> coords = new Pair<>(file, pos); boolean shouldReport = !recorde...
java
protected boolean shouldReport(JavaFileObject file, int pos) { if (file == null) return true; Pair<JavaFileObject,Integer> coords = new Pair<>(file, pos); boolean shouldReport = !recorded.contains(coords); if (shouldReport) recorded.add(coords); return sh...
[ "protected", "boolean", "shouldReport", "(", "JavaFileObject", "file", ",", "int", "pos", ")", "{", "if", "(", "file", "==", "null", ")", "return", "true", ";", "Pair", "<", "JavaFileObject", ",", "Integer", ">", "coords", "=", "new", "Pair", "<>", "(", ...
Returns true if an error needs to be reported for a given source name and pos.
[ "Returns", "true", "if", "an", "error", "needs", "to", "be", "reported", "for", "a", "given", "source", "name", "and", "pos", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java#L499-L508
baratine/baratine
web/src/main/java/com/caucho/v5/util/CharCursor.java
CharCursor.regionMatchesIgnoreCase
public boolean regionMatchesIgnoreCase(char []cb, int offset, int length) { """ True if the cursor matches the character buffer If match fails, return the pointer to its original. """ int pos = getIndex(); char ch = current(); for (int i = 0; i < length; i++) { if (ch == DONE) { s...
java
public boolean regionMatchesIgnoreCase(char []cb, int offset, int length) { int pos = getIndex(); char ch = current(); for (int i = 0; i < length; i++) { if (ch == DONE) { setIndex(pos); return false; } if (Character.toLowerCase(cb[i + offset]) != Character.toLowerCase(...
[ "public", "boolean", "regionMatchesIgnoreCase", "(", "char", "[", "]", "cb", ",", "int", "offset", ",", "int", "length", ")", "{", "int", "pos", "=", "getIndex", "(", ")", ";", "char", "ch", "=", "current", "(", ")", ";", "for", "(", "int", "i", "=...
True if the cursor matches the character buffer If match fails, return the pointer to its original.
[ "True", "if", "the", "cursor", "matches", "the", "character", "buffer" ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/util/CharCursor.java#L145-L165
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java
HBasePanel.printHtmlTrailer
public void printHtmlTrailer(PrintWriter out, ResourceBundle reg) throws DBException { """ Print the top nav menu. @param out The html out stream. @param reg The resources object. @exception DBException File exception. """ char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams...
java
public void printHtmlTrailer(PrintWriter out, ResourceBundle reg) throws DBException { char chMenubar = HBasePanel.getFirstToUpper(this.getProperty(DBParams.TRAILERS), 'H'); if (chMenubar == 'H') if (((BasePanel)this.getScreenField()).isMainMenu()) chMenubar = 'Y'; if (ch...
[ "public", "void", "printHtmlTrailer", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "char", "chMenubar", "=", "HBasePanel", ".", "getFirstToUpper", "(", "this", ".", "getProperty", "(", "DBParams", ".", "TRAILERS", "...
Print the top nav menu. @param out The html out stream. @param reg The resources object. @exception DBException File exception.
[ "Print", "the", "top", "nav", "menu", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L295-L310
pravega/pravega
controller/src/main/java/io/pravega/controller/metrics/StreamMetrics.java
StreamMetrics.reportRetentionEvent
public static void reportRetentionEvent(String scope, String streamName) { """ This method increments the Stream-specific counter of retention operations. @param scope Scope. @param streamName Name of the Stream. """ DYNAMIC_LOGGER.recordMeterEvents(RETENTION_FREQUENCY, 1, streamTags(sco...
java
public static void reportRetentionEvent(String scope, String streamName) { DYNAMIC_LOGGER.recordMeterEvents(RETENTION_FREQUENCY, 1, streamTags(scope, streamName)); }
[ "public", "static", "void", "reportRetentionEvent", "(", "String", "scope", ",", "String", "streamName", ")", "{", "DYNAMIC_LOGGER", ".", "recordMeterEvents", "(", "RETENTION_FREQUENCY", ",", "1", ",", "streamTags", "(", "scope", ",", "streamName", ")", ")", ";"...
This method increments the Stream-specific counter of retention operations. @param scope Scope. @param streamName Name of the Stream.
[ "This", "method", "increments", "the", "Stream", "-", "specific", "counter", "of", "retention", "operations", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/metrics/StreamMetrics.java#L189-L191
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/fonts/cmaps/CMap.java
CMap.addMapping
public void addMapping( byte[] src, String dest ) throws IOException { """ This will add a mapping. @param src The src to the mapping. @param dest The dest to the mapping. @throws IOException if the src is invalid. """ if( src.length == 1 ) { singleByteMappings.put( Integer.v...
java
public void addMapping( byte[] src, String dest ) throws IOException { if( src.length == 1 ) { singleByteMappings.put( Integer.valueOf( src[0] & 0xff ), dest ); } else if( src.length == 2 ) { int intSrc = src[0]&0xFF; intSrc <<= 8; ...
[ "public", "void", "addMapping", "(", "byte", "[", "]", "src", ",", "String", "dest", ")", "throws", "IOException", "{", "if", "(", "src", ".", "length", "==", "1", ")", "{", "singleByteMappings", ".", "put", "(", "Integer", ".", "valueOf", "(", "src", ...
This will add a mapping. @param src The src to the mapping. @param dest The dest to the mapping. @throws IOException if the src is invalid.
[ "This", "will", "add", "a", "mapping", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/fonts/cmaps/CMap.java#L120-L137
steveohara/j2mod
src/main/java/com/ghgande/j2mod/modbus/msg/ModbusRequest.java
ModbusRequest.updateResponseWithHeader
ModbusResponse updateResponseWithHeader(ModbusResponse response, boolean ignoreFunctionCode) { """ Updates the response with the header information to match the request @param response Response to update @param ignoreFunctionCode True if the function code should stay unmolested @return Updated response ""...
java
ModbusResponse updateResponseWithHeader(ModbusResponse response, boolean ignoreFunctionCode) { // transfer header data response.setHeadless(isHeadless()); if (!isHeadless()) { response.setTransactionID(getTransactionID()); response.setProtocolID(getProtocolID()); ...
[ "ModbusResponse", "updateResponseWithHeader", "(", "ModbusResponse", "response", ",", "boolean", "ignoreFunctionCode", ")", "{", "// transfer header data", "response", ".", "setHeadless", "(", "isHeadless", "(", ")", ")", ";", "if", "(", "!", "isHeadless", "(", ")",...
Updates the response with the header information to match the request @param response Response to update @param ignoreFunctionCode True if the function code should stay unmolested @return Updated response
[ "Updates", "the", "response", "with", "the", "header", "information", "to", "match", "the", "request" ]
train
https://github.com/steveohara/j2mod/blob/67162c55d7c02564e50211a9df06b8314953b5f2/src/main/java/com/ghgande/j2mod/modbus/msg/ModbusRequest.java#L172-L188
knightliao/disconf
disconf-web/src/main/java/com/baidu/unbiz/common/genericdao/dao/GenericDao.java
GenericDao.count
public int count(String column, Object value) { """ 查询符合条件的结果计数 @param column 条件字段 @param value 条件字段的值。支持集合对象,支持数组,会按照in 操作来组装条件 @return """ return count(Operators.match(column, value)); }
java
public int count(String column, Object value) { return count(Operators.match(column, value)); }
[ "public", "int", "count", "(", "String", "column", ",", "Object", "value", ")", "{", "return", "count", "(", "Operators", ".", "match", "(", "column", ",", "value", ")", ")", ";", "}" ]
查询符合条件的结果计数 @param column 条件字段 @param value 条件字段的值。支持集合对象,支持数组,会按照in 操作来组装条件 @return
[ "查询符合条件的结果计数" ]
train
https://github.com/knightliao/disconf/blob/d413cbce9334fe38a5a24982ce4db3a6ed8e98ea/disconf-web/src/main/java/com/baidu/unbiz/common/genericdao/dao/GenericDao.java#L178-L180
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateRegexEntityModelAsync
public Observable<OperationStatus> updateRegexEntityModelAsync(UUID appId, String versionId, UUID regexEntityId, RegexModelUpdateObject regexEntityUpdateObject) { """ Updates the regex entity model . @param appId The application ID. @param versionId The version ID. @param regexEntityId The regex entity extrac...
java
public Observable<OperationStatus> updateRegexEntityModelAsync(UUID appId, String versionId, UUID regexEntityId, RegexModelUpdateObject regexEntityUpdateObject) { return updateRegexEntityModelWithServiceResponseAsync(appId, versionId, regexEntityId, regexEntityUpdateObject).map(new Func1<ServiceResponse<Operati...
[ "public", "Observable", "<", "OperationStatus", ">", "updateRegexEntityModelAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "regexEntityId", ",", "RegexModelUpdateObject", "regexEntityUpdateObject", ")", "{", "return", "updateRegexEntityModelWithServi...
Updates the regex entity model . @param appId The application ID. @param versionId The version ID. @param regexEntityId The regex entity extractor ID. @param regexEntityUpdateObject An object containing the new entity name and regex pattern. @throws IllegalArgumentException thrown if parameters fail the validation @re...
[ "Updates", "the", "regex", "entity", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L10300-L10307
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/CCheckOracle.java
CCheckOracle.checkTablespace
private List<Metric> checkTablespace(final Connection c, final ICommandLine cl) throws BadThresholdException, SQLException { """ Checks database usage. @param c The connection to the database @param cl The command line as received from JNRPE @return The plugin result @throws BadThresholdException - ""...
java
private List<Metric> checkTablespace(final Connection c, final ICommandLine cl) throws BadThresholdException, SQLException { // Metric : tblspace_usage List<Metric> metricList = new ArrayList<Metric>(); String sTablespace = cl.getOptionValue("tablespace").toUpperCase(); // FIXME : a ...
[ "private", "List", "<", "Metric", ">", "checkTablespace", "(", "final", "Connection", "c", ",", "final", "ICommandLine", "cl", ")", "throws", "BadThresholdException", ",", "SQLException", "{", "// Metric : tblspace_usage", "List", "<", "Metric", ">", "metricList", ...
Checks database usage. @param c The connection to the database @param cl The command line as received from JNRPE @return The plugin result @throws BadThresholdException -
[ "Checks", "database", "usage", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/CCheckOracle.java#L136-L177
EdwardRaff/JSAT
JSAT/src/jsat/linear/RowColumnOps.java
RowColumnOps.addMultRow
public static void addMultRow(Matrix A, int i, int start, int to, double t, double[] c) { """ Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+c[:]*<tt>t</tt>.<br> The Matrix <tt>A</tt> and array <tt>c</tt> do not need to have the same dimensions, so long as they both have indices in...
java
public static void addMultRow(Matrix A, int i, int start, int to, double t, double[] c) { for(int j = start; j < to; j++) A.increment(i, j, c[j]*t); }
[ "public", "static", "void", "addMultRow", "(", "Matrix", "A", ",", "int", "i", ",", "int", "start", ",", "int", "to", ",", "double", "t", ",", "double", "[", "]", "c", ")", "{", "for", "(", "int", "j", "=", "start", ";", "j", "<", "to", ";", ...
Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:]+c[:]*<tt>t</tt>.<br> The Matrix <tt>A</tt> and array <tt>c</tt> do not need to have the same dimensions, so long as they both have indices in the given range. @param A the matrix to perform he update on @param i the row to update @param sta...
[ "Updates", "the", "values", "of", "row", "<tt", ">", "i<", "/", "tt", ">", "in", "the", "given", "matrix", "to", "be", "A", "[", "i", ":", "]", "=", "A", "[", "i", ":", "]", "+", "c", "[", ":", "]", "*", "<tt", ">", "t<", "/", "tt", ">", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/RowColumnOps.java#L293-L297
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/RuntimeUtil.java
RuntimeUtil.getErrorResult
public static String getErrorResult(Process process, Charset charset) { """ 获取命令执行异常结果,获取后销毁进程 @param process {@link Process} 进程 @param charset 编码 @return 命令执行结果列表 @since 4.1.21 """ InputStream in = null; try { in = process.getErrorStream(); return IoUtil.read(in, charset); } finally { ...
java
public static String getErrorResult(Process process, Charset charset) { InputStream in = null; try { in = process.getErrorStream(); return IoUtil.read(in, charset); } finally { IoUtil.close(in); destroy(process); } }
[ "public", "static", "String", "getErrorResult", "(", "Process", "process", ",", "Charset", "charset", ")", "{", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "process", ".", "getErrorStream", "(", ")", ";", "return", "IoUtil", ".", "read", ...
获取命令执行异常结果,获取后销毁进程 @param process {@link Process} 进程 @param charset 编码 @return 命令执行结果列表 @since 4.1.21
[ "获取命令执行异常结果,获取后销毁进程" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/RuntimeUtil.java#L221-L230
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/xmlrpc/client/XmlRpcClientExecutorFactory.java
XmlRpcClientExecutorFactory.newExecutor
public static XmlRpcClientExecutor newExecutor(String url) throws XmlRpcClientExecutorException { """ <p>newExecutor.</p> @param url a {@link java.lang.String} object. @return a {@link com.greenpepper.server.rpc.xmlrpc.client.XmlRpcClientExecutor} object. @throws com.greenpepper.server.rpc.xmlrpc.client.XmlRp...
java
public static XmlRpcClientExecutor newExecutor(String url) throws XmlRpcClientExecutorException { try { LOGGER.debug("Instanciating new executor for url {} ", url); return new XmlRpcV2ClientImpl(url); } catch (Exception ex) { throw new XmlRpcClientExecutorException(G...
[ "public", "static", "XmlRpcClientExecutor", "newExecutor", "(", "String", "url", ")", "throws", "XmlRpcClientExecutorException", "{", "try", "{", "LOGGER", ".", "debug", "(", "\"Instanciating new executor for url {} \"", ",", "url", ")", ";", "return", "new", "XmlRpcV...
<p>newExecutor.</p> @param url a {@link java.lang.String} object. @return a {@link com.greenpepper.server.rpc.xmlrpc.client.XmlRpcClientExecutor} object. @throws com.greenpepper.server.rpc.xmlrpc.client.XmlRpcClientExecutorException if any.
[ "<p", ">", "newExecutor", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/xmlrpc/client/XmlRpcClientExecutorFactory.java#L41-L49
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/StringUtils.java
StringUtils.trimTrailingCharacter
public static String trimTrailingCharacter(final String str, final char trailingCharacter) { """ Trim all occurrences of the supplied trailing character from the given {@code String}. @param str the {@code String} to check @param trailingCharacter the trailing character to be trimmed @return the trimmed {@cod...
java
public static String trimTrailingCharacter(final String str, final char trailingCharacter) { if (!StringUtils.hasLength(str)) { return str; } final StringBuilder sb = new StringBuilder(str); while (sb.length() > 0 && sb.charAt(sb.length() - 1) == trailingCharacter) { sb.deleteCharAt(sb.leng...
[ "public", "static", "String", "trimTrailingCharacter", "(", "final", "String", "str", ",", "final", "char", "trailingCharacter", ")", "{", "if", "(", "!", "StringUtils", ".", "hasLength", "(", "str", ")", ")", "{", "return", "str", ";", "}", "final", "Stri...
Trim all occurrences of the supplied trailing character from the given {@code String}. @param str the {@code String} to check @param trailingCharacter the trailing character to be trimmed @return the trimmed {@code String}
[ "Trim", "all", "occurrences", "of", "the", "supplied", "trailing", "character", "from", "the", "given", "{", "@code", "String", "}", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/StringUtils.java#L330-L340
elki-project/elki
elki-index/src/main/java/de/lmu/ifi/dbs/elki/index/tree/TreeIndexHeader.java
TreeIndexHeader.writeEmptyPages
public void writeEmptyPages(Stack<Integer> emptyPages, RandomAccessFile file) throws IOException { """ Write the indices of empty pages the the end of <code>file</code>. Calling this method should be followed by a {@link #writeHeader(RandomAccessFile)}. @param emptyPages the stack of empty page ids which remai...
java
public void writeEmptyPages(Stack<Integer> emptyPages, RandomAccessFile file) throws IOException { if(emptyPages.isEmpty()) { this.emptyPagesSize = 0; return; // nothing to write } ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos)...
[ "public", "void", "writeEmptyPages", "(", "Stack", "<", "Integer", ">", "emptyPages", ",", "RandomAccessFile", "file", ")", "throws", "IOException", "{", "if", "(", "emptyPages", ".", "isEmpty", "(", ")", ")", "{", "this", ".", "emptyPagesSize", "=", "0", ...
Write the indices of empty pages the the end of <code>file</code>. Calling this method should be followed by a {@link #writeHeader(RandomAccessFile)}. @param emptyPages the stack of empty page ids which remain to be filled @param file File to work with @throws IOException thrown on IO errors
[ "Write", "the", "indices", "of", "empty", "pages", "the", "the", "end", "of", "<code", ">", "file<", "/", "code", ">", ".", "Calling", "this", "method", "should", "be", "followed", "by", "a", "{", "@link", "#writeHeader", "(", "RandomAccessFile", ")", "}...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index/src/main/java/de/lmu/ifi/dbs/elki/index/tree/TreeIndexHeader.java#L220-L237
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/asm/ModifierAdjustment.java
ModifierAdjustment.withFieldModifiers
public ModifierAdjustment withFieldModifiers(ElementMatcher<? super FieldDescription.InDefinedShape> matcher, ModifierContributor.ForField... modifierContributor) { """ Adjusts a field's modifiers if it fulfills the supplied matcher. @param matcher Th...
java
public ModifierAdjustment withFieldModifiers(ElementMatcher<? super FieldDescription.InDefinedShape> matcher, ModifierContributor.ForField... modifierContributor) { return withFieldModifiers(matcher, Arrays.asList(modifierContributor)); }
[ "public", "ModifierAdjustment", "withFieldModifiers", "(", "ElementMatcher", "<", "?", "super", "FieldDescription", ".", "InDefinedShape", ">", "matcher", ",", "ModifierContributor", ".", "ForField", "...", "modifierContributor", ")", "{", "return", "withFieldModifiers", ...
Adjusts a field's modifiers if it fulfills the supplied matcher. @param matcher The matcher that determines if a field's modifiers should be adjusted. @param modifierContributor The modifier contributors to enforce. @return A new modifier adjustment that enforces the given modifier contributors and any pre...
[ "Adjusts", "a", "field", "s", "modifiers", "if", "it", "fulfills", "the", "supplied", "matcher", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/ModifierAdjustment.java#L164-L167
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java
JobsInner.suspendAsync
public Observable<Void> suspendAsync(String resourceGroupName, String automationAccountName, UUID jobId) { """ Suspend the job identified by jobId. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The job id. @throws Illeg...
java
public Observable<Void> suspendAsync(String resourceGroupName, String automationAccountName, UUID jobId) { return suspendWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Voi...
[ "public", "Observable", "<", "Void", ">", "suspendAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "UUID", "jobId", ")", "{", "return", "suspendWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ","...
Suspend the job identified by jobId. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The job id. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Suspend", "the", "job", "identified", "by", "jobId", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java#L327-L334
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201808/productpackageservice/GetAllProductPackages.java
GetAllProductPackages.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the ProductPackageService. ProductPackageServiceInterface productPackageService = adManagerServices.get(session, ProductPackageServiceInterface.class); // Create a stat...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "// Get the ProductPackageService.", "ProductPackageServiceInterface", "productPackageService", "=", "adManagerServi...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201808/productpackageservice/GetAllProductPackages.java#L53-L87
m-m-m/util
text/src/main/java/net/sf/mmm/util/text/base/HyphenatorImpl.java
HyphenatorImpl.sortPatterns
private static HyphenationPattern[] sortPatterns(HyphenationPattern[] patternArray) { """ This method sorts the given {@link HyphenationPattern patterns} according to the {@link String#length() length} of their {@link HyphenationPattern#getWordPart() word-part}. @param patternArray are the unsorted {@link Hyph...
java
private static HyphenationPattern[] sortPatterns(HyphenationPattern[] patternArray) { Comparator<HyphenationPattern> comparator = new Comparator<HyphenationPattern>() { @Override public int compare(HyphenationPattern p1, HyphenationPattern p2) { return (p2.getWordPart().length() - p1.g...
[ "private", "static", "HyphenationPattern", "[", "]", "sortPatterns", "(", "HyphenationPattern", "[", "]", "patternArray", ")", "{", "Comparator", "<", "HyphenationPattern", ">", "comparator", "=", "new", "Comparator", "<", "HyphenationPattern", ">", "(", ")", "{",...
This method sorts the given {@link HyphenationPattern patterns} according to the {@link String#length() length} of their {@link HyphenationPattern#getWordPart() word-part}. @param patternArray are the unsorted {@link HyphenationPattern patterns}. @return the sorted {@link HyphenationPattern patterns}.
[ "This", "method", "sorts", "the", "given", "{", "@link", "HyphenationPattern", "patterns", "}", "according", "to", "the", "{", "@link", "String#length", "()", "length", "}", "of", "their", "{", "@link", "HyphenationPattern#getWordPart", "()", "word", "-", "part"...
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/text/src/main/java/net/sf/mmm/util/text/base/HyphenatorImpl.java#L80-L92
alkacon/opencms-core
src/org/opencms/ui/apps/CmsWorkplaceAppManager.java
CmsWorkplaceAppManager.storeAppSettings
public void storeAppSettings(CmsObject cms, Class<? extends I_CmsAppSettings> type, I_CmsAppSettings appSettings) { """ Stores the given app setting within the users additional info.<p> @param cms the cms context @param type the app setting type, used as the settings key @param appSettings the settings to sto...
java
public void storeAppSettings(CmsObject cms, Class<? extends I_CmsAppSettings> type, I_CmsAppSettings appSettings) { CmsUser user = cms.getRequestContext().getCurrentUser(); CmsUserSettings settings = new CmsUserSettings(user); String currentSetting = settings.getAdditionalPreference(type.getNa...
[ "public", "void", "storeAppSettings", "(", "CmsObject", "cms", ",", "Class", "<", "?", "extends", "I_CmsAppSettings", ">", "type", ",", "I_CmsAppSettings", "appSettings", ")", "{", "CmsUser", "user", "=", "cms", ".", "getRequestContext", "(", ")", ".", "getCur...
Stores the given app setting within the users additional info.<p> @param cms the cms context @param type the app setting type, used as the settings key @param appSettings the settings to store
[ "Stores", "the", "given", "app", "setting", "within", "the", "users", "additional", "info", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/CmsWorkplaceAppManager.java#L628-L646
buschmais/jqa-rdbms-plugin
src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java
AbstractSchemaScannerPlugin.getTableDescriptor
private TableDescriptor getTableDescriptor(Table table, SchemaDescriptor schemaDescriptor, Store store) { """ Create a table descriptor for the given table. @param store The store @param table The table @return The table descriptor """ TableDescriptor tableDescriptor; if (table instanceof ...
java
private TableDescriptor getTableDescriptor(Table table, SchemaDescriptor schemaDescriptor, Store store) { TableDescriptor tableDescriptor; if (table instanceof View) { View view = (View) table; ViewDescriptor viewDescriptor = store.create(ViewDescriptor.class); viewDe...
[ "private", "TableDescriptor", "getTableDescriptor", "(", "Table", "table", ",", "SchemaDescriptor", "schemaDescriptor", ",", "Store", "store", ")", "{", "TableDescriptor", "tableDescriptor", ";", "if", "(", "table", "instanceof", "View", ")", "{", "View", "view", ...
Create a table descriptor for the given table. @param store The store @param table The table @return The table descriptor
[ "Create", "a", "table", "descriptor", "for", "the", "given", "table", "." ]
train
https://github.com/buschmais/jqa-rdbms-plugin/blob/96c3919907deee00175cf5ab005867d76e01ba62/src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java#L336-L354
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java
GeometryFactory.createMultiPoint
public MultiPoint createMultiPoint(Point[] points) { """ Create a new {@link MultiPoint}, given an array of points. @param points An array of {@link Point} objects. @return Returns a {@link MultiPoint} geometry. """ if (points == null) { return new MultiPoint(srid, precision); } Point[] clones = ...
java
public MultiPoint createMultiPoint(Point[] points) { if (points == null) { return new MultiPoint(srid, precision); } Point[] clones = new Point[points.length]; for (int i = 0; i < points.length; i++) { clones[i] = (Point) points[i].clone(); } return new MultiPoint(srid, precision, clones); }
[ "public", "MultiPoint", "createMultiPoint", "(", "Point", "[", "]", "points", ")", "{", "if", "(", "points", "==", "null", ")", "{", "return", "new", "MultiPoint", "(", "srid", ",", "precision", ")", ";", "}", "Point", "[", "]", "clones", "=", "new", ...
Create a new {@link MultiPoint}, given an array of points. @param points An array of {@link Point} objects. @return Returns a {@link MultiPoint} geometry.
[ "Create", "a", "new", "{", "@link", "MultiPoint", "}", "given", "an", "array", "of", "points", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L230-L239
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java
DatabasesInner.removePrincipals
public DatabasePrincipalListResultInner removePrincipals(String resourceGroupName, String clusterName, String databaseName) { """ Remove Database principals permissions. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @par...
java
public DatabasePrincipalListResultInner removePrincipals(String resourceGroupName, String clusterName, String databaseName) { return removePrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); }
[ "public", "DatabasePrincipalListResultInner", "removePrincipals", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ")", "{", "return", "removePrincipalsWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ","...
Remove Database principals permissions. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @throws IllegalArgumentException thrown if parameters fail the validation @t...
[ "Remove", "Database", "principals", "permissions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java#L1234-L1236
osiam/connector4java
src/main/java/org/osiam/client/OsiamUserService.java
OsiamUserService.updateUser
@Deprecated User updateUser(String id, UpdateUser updateUser, AccessToken accessToken) { """ See {@link OsiamConnector#updateUser(String, UpdateUser, AccessToken)} @deprecated Updating with PATCH has been removed in OSIAM 3.0. This method is going to go away with version 1.12 or 2.0. """ if (upd...
java
@Deprecated User updateUser(String id, UpdateUser updateUser, AccessToken accessToken) { if (updateUser == null) { throw new IllegalArgumentException("The given updateUser can't be null."); } return updateResource(id, updateUser.getScimConformUpdateUser(), accessToken); }
[ "@", "Deprecated", "User", "updateUser", "(", "String", "id", ",", "UpdateUser", "updateUser", ",", "AccessToken", "accessToken", ")", "{", "if", "(", "updateUser", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The given updateUser ca...
See {@link OsiamConnector#updateUser(String, UpdateUser, AccessToken)} @deprecated Updating with PATCH has been removed in OSIAM 3.0. This method is going to go away with version 1.12 or 2.0.
[ "See", "{", "@link", "OsiamConnector#updateUser", "(", "String", "UpdateUser", "AccessToken", ")", "}" ]
train
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/client/OsiamUserService.java#L148-L154
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCBlob.java
JDBCBlob.getBinaryStream
public InputStream getBinaryStream(long pos, long length) throws SQLException { """ Returns an <code>InputStream</code> object that contains a partial <code>Blob</code> value, starting with the byte specified by pos, which is length bytes in length. @param pos the offset...
java
public InputStream getBinaryStream(long pos, long length) throws SQLException { final byte[] ldata = data; checkValid(ldata); final int dlen = ldata.length; if (pos < MIN_POS || pos > dlen) { throw Util.outOfRangeArgument("pos: " + p...
[ "public", "InputStream", "getBinaryStream", "(", "long", "pos", ",", "long", "length", ")", "throws", "SQLException", "{", "final", "byte", "[", "]", "ldata", "=", "data", ";", "checkValid", "(", "ldata", ")", ";", "final", "int", "dlen", "=", "ldata", "...
Returns an <code>InputStream</code> object that contains a partial <code>Blob</code> value, starting with the byte specified by pos, which is length bytes in length. @param pos the offset to the first byte of the partial value to be retrieved. The first byte in the <code>Blob</code> is at position 1 @param length the...
[ "Returns", "an", "<code", ">", "InputStream<", "/", "code", ">", "object", "that", "contains", "a", "partial", "<code", ">", "Blob<", "/", "code", ">", "value", "starting", "with", "the", "byte", "specified", "by", "pos", "which", "is", "length", "bytes", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCBlob.java#L756-L799
rey5137/material
material/src/main/java/com/rey/material/widget/EditText.java
EditText.setCompoundDrawablesWithIntrinsicBounds
public void setCompoundDrawablesWithIntrinsicBounds (int left, int top, int right, int bottom) { """ Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text. Use 0 if you do not want a Drawable there. The Drawables' bounds will be set to their intrinsic bounds. <p> Call...
java
public void setCompoundDrawablesWithIntrinsicBounds (int left, int top, int right, int bottom){ mInputView.setCompoundDrawablesWithIntrinsicBounds(left, top, right, bottom); }
[ "public", "void", "setCompoundDrawablesWithIntrinsicBounds", "(", "int", "left", ",", "int", "top", ",", "int", "right", ",", "int", "bottom", ")", "{", "mInputView", ".", "setCompoundDrawablesWithIntrinsicBounds", "(", "left", ",", "top", ",", "right", ",", "bo...
Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text. Use 0 if you do not want a Drawable there. The Drawables' bounds will be set to their intrinsic bounds. <p> Calling this method will overwrite any Drawables previously set using {@link #setCompoundDrawablesRelative} or rel...
[ "Sets", "the", "Drawables", "(", "if", "any", ")", "to", "appear", "to", "the", "left", "of", "above", "to", "the", "right", "of", "and", "below", "the", "text", ".", "Use", "0", "if", "you", "do", "not", "want", "a", "Drawable", "there", ".", "The...
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/EditText.java#L2809-L2811
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.getTroubleshootingAsync
public Observable<TroubleshootingResultInner> getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { """ Initiate troubleshooting on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of...
java
public Observable<TroubleshootingResultInner> getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceResponse<TroubleshootingRes...
[ "public", "Observable", "<", "TroubleshootingResultInner", ">", "getTroubleshootingAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "TroubleshootingParameters", "parameters", ")", "{", "return", "getTroubleshootingWithServiceResponseAsync", ...
Initiate troubleshooting on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that define the resource to troubleshoot. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Initiate", "troubleshooting", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1491-L1498
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.suppressField
@Deprecated public static synchronized void suppressField(Class<?> clazz, String... fieldNames) { """ Suppress multiple methods for a class. @param clazz The class whose methods will be suppressed. @param fieldNames The names of the methods that'll be suppressed. If field names are empty, <i>all</i> ...
java
@Deprecated public static synchronized void suppressField(Class<?> clazz, String... fieldNames) { SuppressCode.suppressField(clazz, fieldNames); }
[ "@", "Deprecated", "public", "static", "synchronized", "void", "suppressField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "...", "fieldNames", ")", "{", "SuppressCode", ".", "suppressField", "(", "clazz", ",", "fieldNames", ")", ";", "}" ]
Suppress multiple methods for a class. @param clazz The class whose methods will be suppressed. @param fieldNames The names of the methods that'll be suppressed. If field names are empty, <i>all</i> fields in the supplied class will be suppressed. @deprecated Use {@link #suppress(Field)} instead.
[ "Suppress", "multiple", "methods", "for", "a", "class", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1830-L1833
google/error-prone
check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java
NullnessPropagationTransfer.visitMethodInvocation
@Override Nullness visitMethodInvocation( MethodInvocationNode node, Updates thenUpdates, Updates elseUpdates, Updates bothUpdates) { """ Refines the receiver of a method invocation to type non-null after successful invocation, and refines the value of the expression as a whole to non-null if applicable (...
java
@Override Nullness visitMethodInvocation( MethodInvocationNode node, Updates thenUpdates, Updates elseUpdates, Updates bothUpdates) { ClassAndMethod callee = tryGetMethodSymbol(node.getTree(), Types.instance(context)); if (callee != null && !callee.isStatic) { setNonnullIfTrackable(bothUpdates, no...
[ "@", "Override", "Nullness", "visitMethodInvocation", "(", "MethodInvocationNode", "node", ",", "Updates", "thenUpdates", ",", "Updates", "elseUpdates", ",", "Updates", "bothUpdates", ")", "{", "ClassAndMethod", "callee", "=", "tryGetMethodSymbol", "(", "node", ".", ...
Refines the receiver of a method invocation to type non-null after successful invocation, and refines the value of the expression as a whole to non-null if applicable (e.g., if the method returns a primitive type). <p>NOTE: This transfer makes the unsound assumption that fields reachable via the actual params of this ...
[ "Refines", "the", "receiver", "of", "a", "method", "invocation", "to", "type", "non", "-", "null", "after", "successful", "invocation", "and", "refines", "the", "value", "of", "the", "expression", "as", "a", "whole", "to", "non", "-", "null", "if", "applic...
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/dataflow/nullnesspropagation/NullnessPropagationTransfer.java#L567-L583
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/component/DefaultHyperlinkActivationHandler.java
DefaultHyperlinkActivationHandler.handleUrlActivated
protected void handleUrlActivated(HyperlinkEvent e, URL url) { """ Called when the user clicks on a URL link e.g. <br> &lt;a href=&quot;http://some.site&quot;&gt;Go to Some Site&lt;/a&gt;. <p> This default implementation attempt to open the link in the systems default browser. """ try { ...
java
protected void handleUrlActivated(HyperlinkEvent e, URL url) { try { Desktop.getDesktop().browse(url.toURI()); } catch (Exception ex) { throw new ApplicationException("Error handling URL " + url, ex); } }
[ "protected", "void", "handleUrlActivated", "(", "HyperlinkEvent", "e", ",", "URL", "url", ")", "{", "try", "{", "Desktop", ".", "getDesktop", "(", ")", ".", "browse", "(", "url", ".", "toURI", "(", ")", ")", ";", "}", "catch", "(", "Exception", "ex", ...
Called when the user clicks on a URL link e.g. <br> &lt;a href=&quot;http://some.site&quot;&gt;Go to Some Site&lt;/a&gt;. <p> This default implementation attempt to open the link in the systems default browser.
[ "Called", "when", "the", "user", "clicks", "on", "a", "URL", "link", "e", ".", "g", ".", "<br", ">", "&lt", ";", "a", "href", "=", "&quot", ";", "http", ":", "//", "some", ".", "site&quot", ";", "&gt", ";", "Go", "to", "Some", "Site&lt", ";", "...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/component/DefaultHyperlinkActivationHandler.java#L53-L59
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java
ExceptionTableSensitiveMethodVisitor.onVisitMethodInsn
protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface) { """ Visits a method instruction. @param opcode The visited opcode. @param owner The method's owner. @param name The method's internal name. @param descriptor The method's descripto...
java
protected void onVisitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface) { super.visitMethodInsn(opcode, owner, name, descriptor, isInterface); }
[ "protected", "void", "onVisitMethodInsn", "(", "int", "opcode", ",", "String", "owner", ",", "String", "name", ",", "String", "descriptor", ",", "boolean", "isInterface", ")", "{", "super", ".", "visitMethodInsn", "(", "opcode", ",", "owner", ",", "name", ",...
Visits a method instruction. @param opcode The visited opcode. @param owner The method's owner. @param name The method's internal name. @param descriptor The method's descriptor. @param isInterface {@code true} if the method belongs to an interface.
[ "Visits", "a", "method", "instruction", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java#L179-L181
FasterXML/woodstox
src/main/java/com/ctc/wstx/stax/WstxInputFactory.java
WstxInputFactory.createXMLStreamReader
@Override public XMLStreamReader2 createXMLStreamReader(File f) throws XMLStreamException { """ Convenience factory method that allows for parsing a document stored in the specified file. """ /* true for auto-close, since caller has no access to the underlying * input stream creat...
java
@Override public XMLStreamReader2 createXMLStreamReader(File f) throws XMLStreamException { /* true for auto-close, since caller has no access to the underlying * input stream created from the File */ return createSR(f, false, true); }
[ "@", "Override", "public", "XMLStreamReader2", "createXMLStreamReader", "(", "File", "f", ")", "throws", "XMLStreamException", "{", "/* true for auto-close, since caller has no access to the underlying\n * input stream created from the File\n */", "return", "createSR", ...
Convenience factory method that allows for parsing a document stored in the specified file.
[ "Convenience", "factory", "method", "that", "allows", "for", "parsing", "a", "document", "stored", "in", "the", "specified", "file", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java#L491-L499
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/management/CronUtils.java
CronUtils.shrinkRepeating
private static String shrinkRepeating(String e, String min) { """ Converts repeating segments from "extended" SauronSoftware to "short" Quartz form form. For example &quot;0-59/5&quot; will be converted to &quot;0/5&quot;, &quot;/3&quot; will be converted to &quot;*&#47;3&quot; @param e Source item @param m...
java
private static String shrinkRepeating(String e, String min) { String[] parts = e.split(","); for (int i = 0; i < parts.length; ++i) { int indSlash = parts[i].indexOf('/'); int indDash = parts[i].indexOf('-'); if (indSlash >= 0 && indDash == -1) { if (parts[i].indexOf('*') >= 0) { parts[i] =...
[ "private", "static", "String", "shrinkRepeating", "(", "String", "e", ",", "String", "min", ")", "{", "String", "[", "]", "parts", "=", "e", ".", "split", "(", "\",\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parts", ".", "len...
Converts repeating segments from "extended" SauronSoftware to "short" Quartz form form. For example &quot;0-59/5&quot; will be converted to &quot;0/5&quot;, &quot;/3&quot; will be converted to &quot;*&#47;3&quot; @param e Source item @param max Maximal value in this item ("59" for minutes, "23" for hours, etc.) @retu...
[ "Converts", "repeating", "segments", "from", "extended", "SauronSoftware", "to", "short", "Quartz", "form", "form", ".", "For", "example", "&quot", ";", "0", "-", "59", "/", "5&quot", ";", "will", "be", "converted", "to", "&quot", ";", "0", "/", "5&quot", ...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/management/CronUtils.java#L222-L236
aws/aws-sdk-java
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsSecurityFinding.java
AwsSecurityFinding.withUserDefinedFields
public AwsSecurityFinding withUserDefinedFields(java.util.Map<String, String> userDefinedFields) { """ <p> A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a finding. </p> @param userDefinedFields A list of name/value string pairs associated with ...
java
public AwsSecurityFinding withUserDefinedFields(java.util.Map<String, String> userDefinedFields) { setUserDefinedFields(userDefinedFields); return this; }
[ "public", "AwsSecurityFinding", "withUserDefinedFields", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "userDefinedFields", ")", "{", "setUserDefinedFields", "(", "userDefinedFields", ")", ";", "return", "this", ";", "}" ]
<p> A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a finding. </p> @param userDefinedFields A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a finding. @return Returns a reference to this object ...
[ "<p", ">", "A", "list", "of", "name", "/", "value", "string", "pairs", "associated", "with", "the", "finding", ".", "These", "are", "custom", "user", "-", "defined", "fields", "added", "to", "a", "finding", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsSecurityFinding.java#L1201-L1204
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/config/ConfigValueHelper.java
ConfigValueHelper.checkPattern
protected static void checkPattern(String configKey, String configValue, Pattern pattern, String message) throws SofaRpcRuntimeException { """ 根据正则表达式检查字符串是否是正常值(含冒号),不是则抛出异常 @param configKey 配置项 @param configValue 配置值 @param pattern 正则表达式 @param message 消息 @throws SofaRpcRuntimeException ...
java
protected static void checkPattern(String configKey, String configValue, Pattern pattern, String message) throws SofaRpcRuntimeException { if (configValue != null && !match(pattern, configValue)) { throw ExceptionUtils.buildRuntime(configKey, configValue, message); } }
[ "protected", "static", "void", "checkPattern", "(", "String", "configKey", ",", "String", "configValue", ",", "Pattern", "pattern", ",", "String", "message", ")", "throws", "SofaRpcRuntimeException", "{", "if", "(", "configValue", "!=", "null", "&&", "!", "match...
根据正则表达式检查字符串是否是正常值(含冒号),不是则抛出异常 @param configKey 配置项 @param configValue 配置值 @param pattern 正则表达式 @param message 消息 @throws SofaRpcRuntimeException
[ "根据正则表达式检查字符串是否是正常值(含冒号),不是则抛出异常" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/config/ConfigValueHelper.java#L144-L149
OpenBEL/openbel-framework
org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/rdf/RelationshipTypeProperty.java
RelationshipTypeProperty.propertyFor
public static final Property propertyFor(RelationshipType rtype) { """ Retrieve the RDF {@link Property} for the BEL {@link RelationshipType}. @param rtype {@link RelationshipType}, the relationship type, which cannot be null @return {@link Property} the property for the {@link RelationshipType} @throws Inva...
java
public static final Property propertyFor(RelationshipType rtype) { if (rtype == null) { throw new InvalidArgument("rtype", rtype); } return TYPETOPROPERTY.get(rtype); }
[ "public", "static", "final", "Property", "propertyFor", "(", "RelationshipType", "rtype", ")", "{", "if", "(", "rtype", "==", "null", ")", "{", "throw", "new", "InvalidArgument", "(", "\"rtype\"", ",", "rtype", ")", ";", "}", "return", "TYPETOPROPERTY", ".",...
Retrieve the RDF {@link Property} for the BEL {@link RelationshipType}. @param rtype {@link RelationshipType}, the relationship type, which cannot be null @return {@link Property} the property for the {@link RelationshipType} @throws InvalidArgument Thrown if <tt>rtype</tt> is null
[ "Retrieve", "the", "RDF", "{", "@link", "Property", "}", "for", "the", "BEL", "{", "@link", "RelationshipType", "}", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/rdf/RelationshipTypeProperty.java#L84-L90
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/context/GenericsContext.java
GenericsContext.ownerGenericsMap
public Map<String, Type> ownerGenericsMap() { """ Inner class may use outer generics like this: <pre>{@code class Owner<T> { class Inner { T field; } }}</pre>. <p> NOTE: contains only owner type generics, not hidden by inner class generics. For example: <pre>{@code class Owner<T, K> { // hides outer gener...
java
public Map<String, Type> ownerGenericsMap() { return ownerGenerics.isEmpty() ? Collections.<String, Type>emptyMap() : new LinkedHashMap<String, Type>(ownerGenerics); }
[ "public", "Map", "<", "String", ",", "Type", ">", "ownerGenericsMap", "(", ")", "{", "return", "ownerGenerics", ".", "isEmpty", "(", ")", "?", "Collections", ".", "<", "String", ",", "Type", ">", "emptyMap", "(", ")", ":", "new", "LinkedHashMap", "<", ...
Inner class may use outer generics like this: <pre>{@code class Owner<T> { class Inner { T field; } }}</pre>. <p> NOTE: contains only owner type generics, not hidden by inner class generics. For example: <pre>{@code class Owner<T, K> { // hides outer generic class Inner<T> {} }}</pre> Here {@code ownerGenericsMap() == ...
[ "Inner", "class", "may", "use", "outer", "generics", "like", "this", ":", "<pre", ">", "{", "@code", "class", "Owner<T", ">", "{", "class", "Inner", "{", "T", "field", ";", "}", "}}", "<", "/", "pre", ">", ".", "<p", ">", "NOTE", ":", "contains", ...
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/context/GenericsContext.java#L117-L120
xiancloud/xian
xian-zookeeper/xian-curator/xian-curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java
ZKPaths.makePath
public static String makePath(String parent, String firstChild, String... restChildren) { """ Given a parent path and a list of children nodes, create a combined full path @param parent the parent @param firstChild the first children in the path @param restChildren the rest of the children in the path...
java
public static String makePath(String parent, String firstChild, String... restChildren) { StringBuilder path = new StringBuilder(); joinPath(path, parent, firstChild); if ( restChildren == null ) { return path.toString(); } else { for...
[ "public", "static", "String", "makePath", "(", "String", "parent", ",", "String", "firstChild", ",", "String", "...", "restChildren", ")", "{", "StringBuilder", "path", "=", "new", "StringBuilder", "(", ")", ";", "joinPath", "(", "path", ",", "parent", ",", ...
Given a parent path and a list of children nodes, create a combined full path @param parent the parent @param firstChild the first children in the path @param restChildren the rest of the children in the path @return full path
[ "Given", "a", "parent", "path", "and", "a", "list", "of", "children", "nodes", "create", "a", "combined", "full", "path" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-zookeeper/xian-curator/xian-curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java#L382-L401
drewnoakes/metadata-extractor
Source/com/drew/lang/GeoLocation.java
GeoLocation.degreesMinutesSecondsToDecimal
@Nullable public static Double degreesMinutesSecondsToDecimal(@NotNull final Rational degs, @NotNull final Rational mins, @NotNull final Rational secs, final boolean isNegative) { """ Converts DMS (degrees-minutes-seconds) rational values, as given in {@link com.drew.metadata.exif.GpsDirectory}, into a single...
java
@Nullable public static Double degreesMinutesSecondsToDecimal(@NotNull final Rational degs, @NotNull final Rational mins, @NotNull final Rational secs, final boolean isNegative) { double decimal = Math.abs(degs.doubleValue()) + mins.doubleValue() / 60.0d + secs.doubleValu...
[ "@", "Nullable", "public", "static", "Double", "degreesMinutesSecondsToDecimal", "(", "@", "NotNull", "final", "Rational", "degs", ",", "@", "NotNull", "final", "Rational", "mins", ",", "@", "NotNull", "final", "Rational", "secs", ",", "final", "boolean", "isNeg...
Converts DMS (degrees-minutes-seconds) rational values, as given in {@link com.drew.metadata.exif.GpsDirectory}, into a single value in degrees, as a double.
[ "Converts", "DMS", "(", "degrees", "-", "minutes", "-", "seconds", ")", "rational", "values", "as", "given", "in", "{" ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/GeoLocation.java#L106-L120
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/DateTime.java
DateTime.setUtc
public final void setUtc(final boolean utc) { """ Updates this date-time to display in UTC time if the argument is true. Otherwise, resets to the default timezone. @param utc The utc to set. """ // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().set...
java
public final void setUtc(final boolean utc) { // reset the timezone associated with this instance.. this.timezone = null; if (utc) { getFormat().setTimeZone(TimeZones.getUtcTimeZone()); } else { resetTimeZone(); } time = new Time(time, getFormat().getTimeZone(), utc); }
[ "public", "final", "void", "setUtc", "(", "final", "boolean", "utc", ")", "{", "// reset the timezone associated with this instance..", "this", ".", "timezone", "=", "null", ";", "if", "(", "utc", ")", "{", "getFormat", "(", ")", ".", "setTimeZone", "(", "Time...
Updates this date-time to display in UTC time if the argument is true. Otherwise, resets to the default timezone. @param utc The utc to set.
[ "Updates", "this", "date", "-", "time", "to", "display", "in", "UTC", "time", "if", "the", "argument", "is", "true", ".", "Otherwise", "resets", "to", "the", "default", "timezone", "." ]
train
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/DateTime.java#L445-L454
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createNicePartialMockForAllMethodsExcept
public static synchronized <T> T createNicePartialMockForAllMethodsExcept(Class<T> type, String... methodNames) { """ A utility method that may be used to specify several methods that should <i>not</i> be nicely mocked in an easy manner (by just passing in the method names of the method you wish <i>not</i> to mo...
java
public static synchronized <T> T createNicePartialMockForAllMethodsExcept(Class<T> type, String... methodNames) { if (methodNames != null && methodNames.length == 0) { return createNiceMock(type); } return createNiceMock(type, WhiteboxImpl.getAllMethodExcept(type, methodNames)); ...
[ "public", "static", "synchronized", "<", "T", ">", "T", "createNicePartialMockForAllMethodsExcept", "(", "Class", "<", "T", ">", "type", ",", "String", "...", "methodNames", ")", "{", "if", "(", "methodNames", "!=", "null", "&&", "methodNames", ".", "length", ...
A utility method that may be used to specify several methods that should <i>not</i> be nicely mocked in an easy manner (by just passing in the method names of the method you wish <i>not</i> to mock). Note that you cannot uniquely specify a method to exclude using this method if there are several methods with the same n...
[ "A", "utility", "method", "that", "may", "be", "used", "to", "specify", "several", "methods", "that", "should", "<i", ">", "not<", "/", "i", ">", "be", "nicely", "mocked", "in", "an", "easy", "manner", "(", "by", "just", "passing", "in", "the", "method...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L348-L354
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
ConstructorBuilder.buildSignature
public void buildSignature(XMLNode node, Content constructorDocTree) { """ Build the signature. @param node the XML element that specifies which components to document @param constructorDocTree the content tree to which the documentation will be added """ constructorDocTree.addContent( ...
java
public void buildSignature(XMLNode node, Content constructorDocTree) { constructorDocTree.addContent( writer.getSignature( (ConstructorDoc) constructors.get(currentConstructorIndex))); }
[ "public", "void", "buildSignature", "(", "XMLNode", "node", ",", "Content", "constructorDocTree", ")", "{", "constructorDocTree", ".", "addContent", "(", "writer", ".", "getSignature", "(", "(", "ConstructorDoc", ")", "constructors", ".", "get", "(", "currentConst...
Build the signature. @param node the XML element that specifies which components to document @param constructorDocTree the content tree to which the documentation will be added
[ "Build", "the", "signature", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java#L189-L193
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLocalizationPersistenceImpl.java
CPDefinitionLocalizationPersistenceImpl.findAll
@Override public List<CPDefinitionLocalization> findAll(int start, int end) { """ Returns a range of all the cp definition localizations. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes ...
java
@Override public List<CPDefinitionLocalization> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionLocalization", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp definition localizations. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both...
[ "Returns", "a", "range", "of", "all", "the", "cp", "definition", "localizations", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLocalizationPersistenceImpl.java#L1436-L1439
openengsb/openengsb
components/util/src/main/java/org/openengsb/core/util/DefaultOsgiUtilsService.java
DefaultOsgiUtilsService.waitForServiceFromTracker
private static Object waitForServiceFromTracker(ServiceTracker tracker, long timeout) throws OsgiServiceNotAvailableException { """ tries to retrieve the service from the given service-tracker for the amount of milliseconds provided by the given timeout. @throws OsgiServiceNotAvailableException if the ...
java
private static Object waitForServiceFromTracker(ServiceTracker tracker, long timeout) throws OsgiServiceNotAvailableException { synchronized (tracker) { tracker.open(); try { return tracker.waitForService(timeout); } catch (InterruptedException e) { ...
[ "private", "static", "Object", "waitForServiceFromTracker", "(", "ServiceTracker", "tracker", ",", "long", "timeout", ")", "throws", "OsgiServiceNotAvailableException", "{", "synchronized", "(", "tracker", ")", "{", "tracker", ".", "open", "(", ")", ";", "try", "{...
tries to retrieve the service from the given service-tracker for the amount of milliseconds provided by the given timeout. @throws OsgiServiceNotAvailableException if the service could not be found within the given timeout
[ "tries", "to", "retrieve", "the", "service", "from", "the", "given", "service", "-", "tracker", "for", "the", "amount", "of", "milliseconds", "provided", "by", "the", "given", "timeout", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/DefaultOsgiUtilsService.java#L261-L273
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithPath.java
PactDslRequestWithPath.matchHeader
public PactDslRequestWithPath matchHeader(String header, String regex) { """ Match a request header. A random example header value will be generated from the provided regular expression. @param header Header to match @param regex Regular expression to match """ return matchHeader(header, regex, ne...
java
public PactDslRequestWithPath matchHeader(String header, String regex) { return matchHeader(header, regex, new Generex(regex).random()); }
[ "public", "PactDslRequestWithPath", "matchHeader", "(", "String", "header", ",", "String", "regex", ")", "{", "return", "matchHeader", "(", "header", ",", "regex", ",", "new", "Generex", "(", "regex", ")", ".", "random", "(", ")", ")", ";", "}" ]
Match a request header. A random example header value will be generated from the provided regular expression. @param header Header to match @param regex Regular expression to match
[ "Match", "a", "request", "header", ".", "A", "random", "example", "header", "value", "will", "be", "generated", "from", "the", "provided", "regular", "expression", "." ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithPath.java#L335-L337
groovy/groovy-core
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.eachRow
public void eachRow(Map params, String sql, Closure closure) throws SQLException { """ A variant of {@link #eachRow(String, java.util.List, groovy.lang.Closure)} useful when providing the named parameters as named arguments. @param params a map of named parameters @param sql the sql statement @param clo...
java
public void eachRow(Map params, String sql, Closure closure) throws SQLException { eachRow(sql, singletonList(params), closure); }
[ "public", "void", "eachRow", "(", "Map", "params", ",", "String", "sql", ",", "Closure", "closure", ")", "throws", "SQLException", "{", "eachRow", "(", "sql", ",", "singletonList", "(", "params", ")", ",", "closure", ")", ";", "}" ]
A variant of {@link #eachRow(String, java.util.List, groovy.lang.Closure)} useful when providing the named parameters as named arguments. @param params a map of named parameters @param sql the sql statement @param closure called for each row with a GroovyResultSet @throws SQLException if a database access error o...
[ "A", "variant", "of", "{", "@link", "#eachRow", "(", "String", "java", ".", "util", ".", "List", "groovy", ".", "lang", ".", "Closure", ")", "}", "useful", "when", "providing", "the", "named", "parameters", "as", "named", "arguments", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L1418-L1420
amzn/ion-java
src/com/amazon/ion/impl/lite/ReverseBinaryEncoder.java
ReverseBinaryEncoder.writePrefix
private void writePrefix(int type, int length) { """ Writes the prefix (type and length) preceding the body of an encoded value. This method is only called <em>after</em> a value's body is written to the buffer. @param type the value's type, a four-bit high-nibble mask @param length the number of bytes (oc...
java
private void writePrefix(int type, int length) { if (length >= lnIsVarLen) { writeVarUInt(length); length = lnIsVarLen; } int offset = myOffset; if (--offset < 0) { offset = growBuffer(offset); } myBuffer[offset] = (byte) (...
[ "private", "void", "writePrefix", "(", "int", "type", ",", "int", "length", ")", "{", "if", "(", "length", ">=", "lnIsVarLen", ")", "{", "writeVarUInt", "(", "length", ")", ";", "length", "=", "lnIsVarLen", ";", "}", "int", "offset", "=", "myOffset", "...
Writes the prefix (type and length) preceding the body of an encoded value. This method is only called <em>after</em> a value's body is written to the buffer. @param type the value's type, a four-bit high-nibble mask @param length the number of bytes (octets) in the body, excluding the prefix itself
[ "Writes", "the", "prefix", "(", "type", "and", "length", ")", "preceding", "the", "body", "of", "an", "encoded", "value", ".", "This", "method", "is", "only", "called", "<em", ">", "after<", "/", "em", ">", "a", "value", "s", "body", "is", "written", ...
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/ReverseBinaryEncoder.java#L636-L650
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsLock.java
CmsLock.buildLockDialog
public static String buildLockDialog(CmsDialog dialog) throws CmsException { """ Returns the html code to build the lock dialog.<p> @return html code @throws CmsException if something goes wrong """ return buildLockDialog(dialog, null, null, 2000, false); }
java
public static String buildLockDialog(CmsDialog dialog) throws CmsException { return buildLockDialog(dialog, null, null, 2000, false); }
[ "public", "static", "String", "buildLockDialog", "(", "CmsDialog", "dialog", ")", "throws", "CmsException", "{", "return", "buildLockDialog", "(", "dialog", ",", "null", ",", "null", ",", "2000", ",", "false", ")", ";", "}" ]
Returns the html code to build the lock dialog.<p> @return html code @throws CmsException if something goes wrong
[ "Returns", "the", "html", "code", "to", "build", "the", "lock", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsLock.java#L205-L208
akquinet/needle
src/main/java/de/akquinet/jbosscc/needle/db/transaction/TransactionHelper.java
TransactionHelper.loadObject
public final <T> T loadObject(final Class<T> clazz, final Object id) throws Exception { """ Finds and returns the object of the given id in the persistence context. @param <T> type of searched object @param clazz type of searched object @param id technical id of searched object @return found object @thro...
java
public final <T> T loadObject(final Class<T> clazz, final Object id) throws Exception { return executeInTransaction(new Runnable<T>() { @Override public T run(final EntityManager entityManager) { return loadObject(entityManager, clazz, id); } }); }
[ "public", "final", "<", "T", ">", "T", "loadObject", "(", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Object", "id", ")", "throws", "Exception", "{", "return", "executeInTransaction", "(", "new", "Runnable", "<", "T", ">", "(", ")", "{", ...
Finds and returns the object of the given id in the persistence context. @param <T> type of searched object @param clazz type of searched object @param id technical id of searched object @return found object @throws Exception finding object failed
[ "Finds", "and", "returns", "the", "object", "of", "the", "given", "id", "in", "the", "persistence", "context", "." ]
train
https://github.com/akquinet/needle/blob/8b411c521246b8212882485edc01644f9aac7e24/src/main/java/de/akquinet/jbosscc/needle/db/transaction/TransactionHelper.java#L51-L58
dita-ot/dita-ot
src/main/java/org/dita/dost/platform/Integrator.java
Integrator.loadPlugin
private boolean loadPlugin(final String plugin) { """ Load the plug-ins and aggregate them by feature and fill into feature table. @param plugin plugin ID @return {@code true}> if plugin was loaded, otherwise {@code false} """ if (checkPlugin(plugin)) { final Features pluginFeatures = ...
java
private boolean loadPlugin(final String plugin) { if (checkPlugin(plugin)) { final Features pluginFeatures = pluginTable.get(plugin); final Map<String, List<String>> featureSet = pluginFeatures.getAllFeatures(); for (final Map.Entry<String, List<String>> currentFeature : feat...
[ "private", "boolean", "loadPlugin", "(", "final", "String", "plugin", ")", "{", "if", "(", "checkPlugin", "(", "plugin", ")", ")", "{", "final", "Features", "pluginFeatures", "=", "pluginTable", ".", "get", "(", "plugin", ")", ";", "final", "Map", "<", "...
Load the plug-ins and aggregate them by feature and fill into feature table. @param plugin plugin ID @return {@code true}> if plugin was loaded, otherwise {@code false}
[ "Load", "the", "plug", "-", "ins", "and", "aggregate", "them", "by", "feature", "and", "fill", "into", "feature", "table", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/platform/Integrator.java#L698-L734
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.pressText
public static void pressText(InputStream srcStream, OutputStream destStream, String pressText, Color color, Font font, int x, int y, float alpha) { """ 给图片添加文字水印<br> 此方法并不关闭流 @param srcStream 源图像流 @param destStream 目标图像流 @param pressText 水印文字 @param color 水印的字体颜色 @param font {@link Font} 字体相关信息,如果默认则为{@cod...
java
public static void pressText(InputStream srcStream, OutputStream destStream, String pressText, Color color, Font font, int x, int y, float alpha) { pressText(read(srcStream), getImageOutputStream(destStream), pressText, color, font, x, y, alpha); }
[ "public", "static", "void", "pressText", "(", "InputStream", "srcStream", ",", "OutputStream", "destStream", ",", "String", "pressText", ",", "Color", "color", ",", "Font", "font", ",", "int", "x", ",", "int", "y", ",", "float", "alpha", ")", "{", "pressTe...
给图片添加文字水印<br> 此方法并不关闭流 @param srcStream 源图像流 @param destStream 目标图像流 @param pressText 水印文字 @param color 水印的字体颜色 @param font {@link Font} 字体相关信息,如果默认则为{@code null} @param x 修正值。 默认在中间,偏移量相对于中间偏移 @param y 修正值。 默认在中间,偏移量相对于中间偏移 @param alpha 透明度:alpha 必须是范围 [0.0, 1.0] 之内(包含边界值)的一个浮点数字
[ "给图片添加文字水印<br", ">", "此方法并不关闭流" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L771-L773
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/sqlite/SQLDatabaseFactory.java
SQLDatabaseFactory.openSQLDatabase
public static SQLDatabase openSQLDatabase(File dbFile, KeyProvider provider) throws IOException, SQLException { """ <p> Open or create a database file, and return a connection to it, optionally backed by a SQLCipher enabled database. </p> <p> If the database file does not exist, it will be created, and any in...
java
public static SQLDatabase openSQLDatabase(File dbFile, KeyProvider provider) throws IOException, SQLException { Misc.checkNotNull(dbFile, "dbFile"); File dbDirectory = dbFile.getParentFile(); if (!dbDirectory.mkdirs()){ logger.info(String.format(Locale.ENGLISH, "Did not create direct...
[ "public", "static", "SQLDatabase", "openSQLDatabase", "(", "File", "dbFile", ",", "KeyProvider", "provider", ")", "throws", "IOException", ",", "SQLException", "{", "Misc", ".", "checkNotNull", "(", "dbFile", ",", "\"dbFile\"", ")", ";", "File", "dbDirectory", "...
<p> Open or create a database file, and return a connection to it, optionally backed by a SQLCipher enabled database. </p> <p> If the database file does not exist, it will be created, and any intermediate directories will be created as necessary. </p> @param dbFile full file path of the db file @param provider Key prov...
[ "<p", ">", "Open", "or", "create", "a", "database", "file", "and", "return", "a", "connection", "to", "it", "optionally", "backed", "by", "a", "SQLCipher", "enabled", "database", ".", "<", "/", "p", ">", "<p", ">", "If", "the", "database", "file", "doe...
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/sqlite/SQLDatabaseFactory.java#L91-L100
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.getFileParameterValue
private static String getFileParameterValue(FaxJob faxJob) { """ This function returns the file parameter value based on the file content. @param faxJob The fax job object @return The file parameter value """ String value=null; File file=faxJob.getFile(); if(file!=null) ...
java
private static String getFileParameterValue(FaxJob faxJob) { String value=null; File file=faxJob.getFile(); if(file!=null) { try { //read file (only text files supported) value=IOHelper.readTextFile(faxJob.getFile()); ...
[ "private", "static", "String", "getFileParameterValue", "(", "FaxJob", "faxJob", ")", "{", "String", "value", "=", "null", ";", "File", "file", "=", "faxJob", ".", "getFile", "(", ")", ";", "if", "(", "file", "!=", "null", ")", "{", "try", "{", "//read...
This function returns the file parameter value based on the file content. @param faxJob The fax job object @return The file parameter value
[ "This", "function", "returns", "the", "file", "parameter", "value", "based", "on", "the", "file", "content", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L261-L279
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDateTime.java
LocalDateTime.withNano
public LocalDateTime withNano(int nanoOfSecond) { """ Returns a copy of this {@code LocalDateTime} with the nano-of-second altered. <p> This instance is immutable and unaffected by this method call. @param nanoOfSecond the nano-of-second to set in the result, from 0 to 999,999,999 @return a {@code LocalDate...
java
public LocalDateTime withNano(int nanoOfSecond) { LocalTime newTime = time.withNano(nanoOfSecond); return with(date, newTime); }
[ "public", "LocalDateTime", "withNano", "(", "int", "nanoOfSecond", ")", "{", "LocalTime", "newTime", "=", "time", ".", "withNano", "(", "nanoOfSecond", ")", ";", "return", "with", "(", "date", ",", "newTime", ")", ";", "}" ]
Returns a copy of this {@code LocalDateTime} with the nano-of-second altered. <p> This instance is immutable and unaffected by this method call. @param nanoOfSecond the nano-of-second to set in the result, from 0 to 999,999,999 @return a {@code LocalDateTime} based on this date-time with the requested nanosecond, not...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "LocalDateTime", "}", "with", "the", "nano", "-", "of", "-", "second", "altered", ".", "<p", ">", "This", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDateTime.java#L1088-L1091
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java
StereoTool.getStereo
public static Stereo getStereo(IAtom atom1, IAtom atom2, IAtom atom3, IAtom atom4) { """ Take four atoms, and return Stereo.CLOCKWISE or Stereo.ANTI_CLOCKWISE. The first atom is the one pointing towards the observer. @param atom1 the atom pointing towards the observer @param atom2 the second atom (points away...
java
public static Stereo getStereo(IAtom atom1, IAtom atom2, IAtom atom3, IAtom atom4) { // a normal is calculated for the base atoms (2, 3, 4) and compared to // the first atom. PLUS indicates ACW. TetrahedralSign sign = StereoTool.getHandedness(atom2, atom3, atom4, atom1); if (sign == Te...
[ "public", "static", "Stereo", "getStereo", "(", "IAtom", "atom1", ",", "IAtom", "atom2", ",", "IAtom", "atom3", ",", "IAtom", "atom4", ")", "{", "// a normal is calculated for the base atoms (2, 3, 4) and compared to", "// the first atom. PLUS indicates ACW.", "TetrahedralSig...
Take four atoms, and return Stereo.CLOCKWISE or Stereo.ANTI_CLOCKWISE. The first atom is the one pointing towards the observer. @param atom1 the atom pointing towards the observer @param atom2 the second atom (points away) @param atom3 the third atom (points away) @param atom4 the fourth atom (points away) @return clo...
[ "Take", "four", "atoms", "and", "return", "Stereo", ".", "CLOCKWISE", "or", "Stereo", ".", "ANTI_CLOCKWISE", ".", "The", "first", "atom", "is", "the", "one", "pointing", "towards", "the", "observer", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java#L280-L291
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.instanceView
public VirtualMachineInstanceViewInner instanceView(String resourceGroupName, String vmName) { """ Retrieves information about the run-time state of a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException throw...
java
public VirtualMachineInstanceViewInner instanceView(String resourceGroupName, String vmName) { return instanceViewWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body(); }
[ "public", "VirtualMachineInstanceViewInner", "instanceView", "(", "String", "resourceGroupName", ",", "String", "vmName", ")", "{", "return", "instanceViewWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ")", ".", "toBlocking", "(", ")", ".", "single"...
Retrieves information about the run-time state of a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @thro...
[ "Retrieves", "information", "about", "the", "run", "-", "time", "state", "of", "a", "virtual", "machine", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L1048-L1050
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ChunkedIntArray.java
ChunkedIntArray.writeSlot
void writeSlot(int position, int w0, int w1, int w2, int w3) { """ Overwrite an entire (4-integer) record at the specified index. Mostly used to create record 0, the Document node. @param position integer Record number @param w0 int @param w1 int @param w2 int @param w3 int """ position *= slotsize...
java
void writeSlot(int position, int w0, int w1, int w2, int w3) { position *= slotsize; int chunkpos = position >> lowbits; int slotpos = (position & lowmask); // Grow if needed if (chunkpos > chunks.size() - 1) chunks.addElement(new int[chunkalloc]); int[] chunk = chunks.elementAt(c...
[ "void", "writeSlot", "(", "int", "position", ",", "int", "w0", ",", "int", "w1", ",", "int", "w2", ",", "int", "w3", ")", "{", "position", "*=", "slotsize", ";", "int", "chunkpos", "=", "position", ">>", "lowbits", ";", "int", "slotpos", "=", "(", ...
Overwrite an entire (4-integer) record at the specified index. Mostly used to create record 0, the Document node. @param position integer Record number @param w0 int @param w1 int @param w2 int @param w3 int
[ "Overwrite", "an", "entire", "(", "4", "-", "integer", ")", "record", "at", "the", "specified", "index", ".", "Mostly", "used", "to", "create", "record", "0", "the", "Document", "node", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ChunkedIntArray.java#L221-L235
alkacon/opencms-core
src/org/opencms/file/collectors/CmsPriorityResourceCollector.java
CmsPriorityResourceCollector.allMappedToUriPriorityDate
protected List<CmsResource> allMappedToUriPriorityDate(CmsObject cms, String param, boolean asc, int numResults) throws CmsException { """ Returns a list of all resource from specified folder that have been mapped to the currently requested uri, sorted by priority, then date ascending or descending.<p> @pa...
java
protected List<CmsResource> allMappedToUriPriorityDate(CmsObject cms, String param, boolean asc, int numResults) throws CmsException { CmsCollectorData data = new CmsCollectorData(param); String foldername = CmsResource.getFolderPath(data.getFileName()); CmsResourceFilter filter = CmsResou...
[ "protected", "List", "<", "CmsResource", ">", "allMappedToUriPriorityDate", "(", "CmsObject", "cms", ",", "String", "param", ",", "boolean", "asc", ",", "int", "numResults", ")", "throws", "CmsException", "{", "CmsCollectorData", "data", "=", "new", "CmsCollectorD...
Returns a list of all resource from specified folder that have been mapped to the currently requested uri, sorted by priority, then date ascending or descending.<p> @param cms the current OpenCms user context @param param the folder name to use @param asc if true, the date sort order is ascending, otherwise descending...
[ "Returns", "a", "list", "of", "all", "resource", "from", "specified", "folder", "that", "have", "been", "mapped", "to", "the", "currently", "requested", "uri", "sorted", "by", "priority", "then", "date", "ascending", "or", "descending", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/collectors/CmsPriorityResourceCollector.java#L295-L336
fflewddur/hola
src/main/java/net/straylightlabs/hola/utils/Utils.java
Utils.dumpPacket
@SuppressWarnings("unused") public static void dumpPacket(DatagramPacket packet, String prefix) { """ Save @packet to a new file beginning with @prefix. Append a sequential suffix to ensure we don't overwrite existing files. @param packet The data packet to dump to disk @param prefix The start of the file n...
java
@SuppressWarnings("unused") public static void dumpPacket(DatagramPacket packet, String prefix) { byte[] buffer = new byte[packet.getLength()]; System.arraycopy(packet.getData(), packet.getOffset(), buffer, 0, packet.getLength()); printBuffer(buffer, "Buffer to save"); try { ...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "void", "dumpPacket", "(", "DatagramPacket", "packet", ",", "String", "prefix", ")", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "packet", ".", "getLength", "(", ")", "]", ...
Save @packet to a new file beginning with @prefix. Append a sequential suffix to ensure we don't overwrite existing files. @param packet The data packet to dump to disk @param prefix The start of the file name
[ "Save" ]
train
https://github.com/fflewddur/hola/blob/08d9b9f3b807fd447181a5c1122f117a950db848/src/main/java/net/straylightlabs/hola/utils/Utils.java#L52-L64
buschmais/jqa-javaee6-plugin
src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/JsfFaceletScannerPlugin.java
JsfFaceletScannerPlugin.findJsfTemplateDescriptor
private JsfFaceletDescriptor findJsfTemplateDescriptor(String templateFqn, String path, ScannerContext context) { """ Try to find an existing {@link JsfFaceletDescriptor} with the given parameters. @param templateFqn full qualified name of the including file @param path the found path to the included file ...
java
private JsfFaceletDescriptor findJsfTemplateDescriptor(String templateFqn, String path, ScannerContext context) { String includedFile = absolutifyFilePath(path, templateFqn); return getJsfTemplateDescriptor(includedFile, context); }
[ "private", "JsfFaceletDescriptor", "findJsfTemplateDescriptor", "(", "String", "templateFqn", ",", "String", "path", ",", "ScannerContext", "context", ")", "{", "String", "includedFile", "=", "absolutifyFilePath", "(", "path", ",", "templateFqn", ")", ";", "return", ...
Try to find an existing {@link JsfFaceletDescriptor} with the given parameters. @param templateFqn full qualified name of the including file @param path the found path to the included file @param context The scanner context @return an existing {@link JsfFaceletDescriptor} or a new one if no descriptor exists.
[ "Try", "to", "find", "an", "existing", "{", "@link", "JsfFaceletDescriptor", "}", "with", "the", "given", "parameters", "." ]
train
https://github.com/buschmais/jqa-javaee6-plugin/blob/f5776604d9255206807e5aca90b8767bde494e14/src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/JsfFaceletScannerPlugin.java#L175-L178
groundupworks/wings
wings/src/main/java/com/groundupworks/wings/core/WingsDbHelper.java
WingsDbHelper.createShareRequest
public synchronized boolean createShareRequest(String filePath, Destination destination) { """ Creates a new {@link ShareRequest}. @param filePath the local path to the file to share. @param destination the destination of the share. @return true if successful; false otherwise. """ boolean isSuc...
java
public synchronized boolean createShareRequest(String filePath, Destination destination) { boolean isSuccessful = false; SQLiteDatabase db = null; try { db = getWritableDatabase(); // Create new record. ContentValues values = new ContentValues(); ...
[ "public", "synchronized", "boolean", "createShareRequest", "(", "String", "filePath", ",", "Destination", "destination", ")", "{", "boolean", "isSuccessful", "=", "false", ";", "SQLiteDatabase", "db", "=", "null", ";", "try", "{", "db", "=", "getWritableDatabase",...
Creates a new {@link ShareRequest}. @param filePath the local path to the file to share. @param destination the destination of the share. @return true if successful; false otherwise.
[ "Creates", "a", "new", "{", "@link", "ShareRequest", "}", "." ]
train
https://github.com/groundupworks/wings/blob/03d2827c30ef55f2db4e23f7500e016c7771fa39/wings/src/main/java/com/groundupworks/wings/core/WingsDbHelper.java#L157-L186
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java
EditService.updatePathTable
public static void updatePathTable(String columnName, Object newData, int path_id) { """ Updates a path table value for column columnName @param columnName name of the column to update @param newData new content to set @param path_id ID of the path to update """ PreparedStatement statement = null;...
java
public static void updatePathTable(String columnName, Object newData, int path_id) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_PATH + ...
[ "public", "static", "void", "updatePathTable", "(", "String", "columnName", ",", "Object", "newData", ",", "int", "path_id", ")", "{", "PreparedStatement", "statement", "=", "null", ";", "try", "(", "Connection", "sqlConnection", "=", "sqlService", ".", "getConn...
Updates a path table value for column columnName @param columnName name of the column to update @param newData new content to set @param path_id ID of the path to update
[ "Updates", "a", "path", "table", "value", "for", "column", "columnName" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java#L289-L311
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
ToStringStyle.appendDetail
protected void appendDetail(final StringBuffer buffer, final String fieldName, final Collection<?> coll) { """ <p>Append to the <code>toString</code> a <code>Collection</code>.</p> @param buffer the <code>StringBuffer</code> to populate @param fieldName the field name, typically not used as already appended ...
java
protected void appendDetail(final StringBuffer buffer, final String fieldName, final Collection<?> coll) { buffer.append(coll); }
[ "protected", "void", "appendDetail", "(", "final", "StringBuffer", "buffer", ",", "final", "String", "fieldName", ",", "final", "Collection", "<", "?", ">", "coll", ")", "{", "buffer", ".", "append", "(", "coll", ")", ";", "}" ]
<p>Append to the <code>toString</code> a <code>Collection</code>.</p> @param buffer the <code>StringBuffer</code> to populate @param fieldName the field name, typically not used as already appended @param coll the <code>Collection</code> to add to the <code>toString</code>, not <code>null</code>
[ "<p", ">", "Append", "to", "the", "<code", ">", "toString<", "/", "code", ">", "a", "<code", ">", "Collection<", "/", "code", ">", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java#L637-L639
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/MyImageUtils.java
MyImageUtils.resizeToWidth
public static BufferedImage resizeToWidth(BufferedImage originalImage, int widthOut) { """ Resizes an image to the specified width, changing width in the same proportion @param originalImage Image in memory @param widthOut The width to resize @return New Image in memory """ int width = originalImag...
java
public static BufferedImage resizeToWidth(BufferedImage originalImage, int widthOut) { int width = originalImage.getWidth(); int height = originalImage.getHeight(); int widthPercent = (widthOut * 100) / width; int newHeight = (height * widthPercent) / 100; BufferedImage resi...
[ "public", "static", "BufferedImage", "resizeToWidth", "(", "BufferedImage", "originalImage", ",", "int", "widthOut", ")", "{", "int", "width", "=", "originalImage", ".", "getWidth", "(", ")", ";", "int", "height", "=", "originalImage", ".", "getHeight", "(", "...
Resizes an image to the specified width, changing width in the same proportion @param originalImage Image in memory @param widthOut The width to resize @return New Image in memory
[ "Resizes", "an", "image", "to", "the", "specified", "width", "changing", "width", "in", "the", "same", "proportion" ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/MyImageUtils.java#L190-L207
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Preconditions.java
Preconditions.checkPreconditionD
public static double checkPreconditionD( final double value, final DoublePredicate predicate, final DoubleFunction<String> describer) { """ A {@code double} specialized version of {@link #checkPrecondition(Object, Predicate, Function)} @param value The value @param predicate The predicate @pa...
java
public static double checkPreconditionD( final double value, final DoublePredicate predicate, final DoubleFunction<String> describer) { final boolean ok; try { ok = predicate.test(value); } catch (final Throwable e) { final Violations violations = singleViolation(failedPredicate(e)...
[ "public", "static", "double", "checkPreconditionD", "(", "final", "double", "value", ",", "final", "DoublePredicate", "predicate", ",", "final", "DoubleFunction", "<", "String", ">", "describer", ")", "{", "final", "boolean", "ok", ";", "try", "{", "ok", "=", ...
A {@code double} specialized version of {@link #checkPrecondition(Object, Predicate, Function)} @param value The value @param predicate The predicate @param describer The describer of the predicate @return value @throws PreconditionViolationException If the predicate is false
[ "A", "{", "@code", "double", "}", "specialized", "version", "of", "{", "@link", "#checkPrecondition", "(", "Object", "Predicate", "Function", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Preconditions.java#L521-L536
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java
ProviderList.getService
public Service getService(String type, String name) { """ Return a Service describing an implementation of the specified algorithm from the Provider with the highest precedence that supports that algorithm. Return null if no Provider supports this algorithm. """ for (int i = 0; i < configs.length; i...
java
public Service getService(String type, String name) { for (int i = 0; i < configs.length; i++) { Provider p = getProvider(i); Service s = p.getService(type, name); if (s != null) { return s; } } return null; }
[ "public", "Service", "getService", "(", "String", "type", ",", "String", "name", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "configs", ".", "length", ";", "i", "++", ")", "{", "Provider", "p", "=", "getProvider", "(", "i", ")", ";...
Return a Service describing an implementation of the specified algorithm from the Provider with the highest precedence that supports that algorithm. Return null if no Provider supports this algorithm.
[ "Return", "a", "Service", "describing", "an", "implementation", "of", "the", "specified", "algorithm", "from", "the", "Provider", "with", "the", "highest", "precedence", "that", "supports", "that", "algorithm", ".", "Return", "null", "if", "no", "Provider", "sup...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L335-L344
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.withReader
public static <T> T withReader(Path self, @ClosureParams(value = SimpleType.class, options = "java.io.Reader") Closure<T> closure) throws IOException { """ Create a new BufferedReader for this file and then passes it into the closure, ensuring the reader is closed after the closure returns. @param self a f...
java
public static <T> T withReader(Path self, @ClosureParams(value = SimpleType.class, options = "java.io.Reader") Closure<T> closure) throws IOException { return IOGroovyMethods.withReader(newReader(self), closure); }
[ "public", "static", "<", "T", ">", "T", "withReader", "(", "Path", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.Reader\"", ")", "Closure", "<", "T", ">", "closure", ")", "throws", "IOEx...
Create a new BufferedReader for this file and then passes it into the closure, ensuring the reader is closed after the closure returns. @param self a file object @param closure a closure @return the value returned by the closure @throws java.io.IOException if an IOException occurs. @since 2.3.0
[ "Create", "a", "new", "BufferedReader", "for", "this", "file", "and", "then", "passes", "it", "into", "the", "closure", "ensuring", "the", "reader", "is", "closed", "after", "the", "closure", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1429-L1431
redisson/redisson
redisson/src/main/java/org/redisson/spring/cache/CacheConfig.java
CacheConfig.toJSON
public static String toJSON(Map<String, ? extends CacheConfig> config) throws IOException { """ Convert current configuration to JSON format @param config object @return json string @throws IOException error """ return new CacheConfigSupport().toJSON(config); }
java
public static String toJSON(Map<String, ? extends CacheConfig> config) throws IOException { return new CacheConfigSupport().toJSON(config); }
[ "public", "static", "String", "toJSON", "(", "Map", "<", "String", ",", "?", "extends", "CacheConfig", ">", "config", ")", "throws", "IOException", "{", "return", "new", "CacheConfigSupport", "(", ")", ".", "toJSON", "(", "config", ")", ";", "}" ]
Convert current configuration to JSON format @param config object @return json string @throws IOException error
[ "Convert", "current", "configuration", "to", "JSON", "format" ]
train
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/spring/cache/CacheConfig.java#L168-L170
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java
BpmnParse.parseMessages
public void parseMessages() { """ Parses the messages of the given definitions file. Messages are not contained within a process element, but they can be referenced from inner process elements. """ for (Element messageElement : rootElement.elements("message")) { String id = messageElement.attribute...
java
public void parseMessages() { for (Element messageElement : rootElement.elements("message")) { String id = messageElement.attribute("id"); String messageName = messageElement.attribute("name"); Expression messageExpression = null; if (messageName != null) { messageExpression = expre...
[ "public", "void", "parseMessages", "(", ")", "{", "for", "(", "Element", "messageElement", ":", "rootElement", ".", "elements", "(", "\"message\"", ")", ")", "{", "String", "id", "=", "messageElement", ".", "attribute", "(", "\"id\"", ")", ";", "String", "...
Parses the messages of the given definitions file. Messages are not contained within a process element, but they can be referenced from inner process elements.
[ "Parses", "the", "messages", "of", "the", "given", "definitions", "file", ".", "Messages", "are", "not", "contained", "within", "a", "process", "element", "but", "they", "can", "be", "referenced", "from", "inner", "process", "elements", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L372-L385
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.tileFeatureCount
public long tileFeatureCount(LatLng latLng, int zoom) { """ Get the count of features in the tile at the lat lng coordinate and zoom level @param latLng lat lng location @param zoom zoom level @return count """ Point point = new Point(latLng.longitude, latLng.latitude); long tileFeatures...
java
public long tileFeatureCount(LatLng latLng, int zoom) { Point point = new Point(latLng.longitude, latLng.latitude); long tileFeaturesCount = tileFeatureCount(point, zoom); return tileFeaturesCount; }
[ "public", "long", "tileFeatureCount", "(", "LatLng", "latLng", ",", "int", "zoom", ")", "{", "Point", "point", "=", "new", "Point", "(", "latLng", ".", "longitude", ",", "latLng", ".", "latitude", ")", ";", "long", "tileFeaturesCount", "=", "tileFeatureCount...
Get the count of features in the tile at the lat lng coordinate and zoom level @param latLng lat lng location @param zoom zoom level @return count
[ "Get", "the", "count", "of", "features", "in", "the", "tile", "at", "the", "lat", "lng", "coordinate", "and", "zoom", "level" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L216-L220
zaproxy/zaproxy
src/org/zaproxy/zap/extension/api/ApiImplementor.java
ApiImplementor.handleCallBack
public String handleCallBack(HttpMessage msg) throws ApiException { """ Override if handling callbacks @param msg the HTTP message containing the API request and response @return the API response (set in the HTTP response body) @throws ApiException if an error occurred while handling the API callback """ ...
java
public String handleCallBack(HttpMessage msg) throws ApiException { throw new ApiException (ApiException.Type.URL_NOT_FOUND, msg.getRequestHeader().getURI().toString()); }
[ "public", "String", "handleCallBack", "(", "HttpMessage", "msg", ")", "throws", "ApiException", "{", "throw", "new", "ApiException", "(", "ApiException", ".", "Type", ".", "URL_NOT_FOUND", ",", "msg", ".", "getRequestHeader", "(", ")", ".", "getURI", "(", ")",...
Override if handling callbacks @param msg the HTTP message containing the API request and response @return the API response (set in the HTTP response body) @throws ApiException if an error occurred while handling the API callback
[ "Override", "if", "handling", "callbacks" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/api/ApiImplementor.java#L374-L376
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor6.java
TypeKindVisitor6.visitNoType
@Override public R visitNoType(NoType t, P p) { """ Visits a {@link NoType} instance, dispatching to the visit method for the specific {@linkplain TypeKind kind} of pseudo-type: {@code VOID}, {@code PACKAGE}, or {@code NONE}. @param t {@inheritDoc} @param p {@inheritDoc} @return the result of the kind-...
java
@Override public R visitNoType(NoType t, P p) { TypeKind k = t.getKind(); switch (k) { case VOID: return visitNoTypeAsVoid(t, p); case PACKAGE: return visitNoTypeAsPackage(t, p); case NONE: return visitNoTypeAsNone(t, p); default...
[ "@", "Override", "public", "R", "visitNoType", "(", "NoType", "t", ",", "P", "p", ")", "{", "TypeKind", "k", "=", "t", ".", "getKind", "(", ")", ";", "switch", "(", "k", ")", "{", "case", "VOID", ":", "return", "visitNoTypeAsVoid", "(", "t", ",", ...
Visits a {@link NoType} instance, dispatching to the visit method for the specific {@linkplain TypeKind kind} of pseudo-type: {@code VOID}, {@code PACKAGE}, or {@code NONE}. @param t {@inheritDoc} @param p {@inheritDoc} @return the result of the kind-specific visit method
[ "Visits", "a", "{", "@link", "NoType", "}", "instance", "dispatching", "to", "the", "visit", "method", "for", "the", "specific", "{", "@linkplain", "TypeKind", "kind", "}", "of", "pseudo", "-", "type", ":", "{", "@code", "VOID", "}", "{", "@code", "PACKA...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor6.java#L254-L270
treasure-data/td-client-java
src/main/java/com/treasuredata/client/TDHttpClient.java
TDHttpClient.call
public <Result> Result call(TDApiRequest apiRequest, Optional<String> apiKeyCache, final Class<Result> resultType) throws TDClientException { """ Submit an API request, and bind the returned JSON data into an object of the given result type. For mapping it uses Jackson object mapper. @param apiRequ...
java
public <Result> Result call(TDApiRequest apiRequest, Optional<String> apiKeyCache, final Class<Result> resultType) throws TDClientException { return call(apiRequest, apiKeyCache, objectMapper.getTypeFactory().constructType(resultType)); }
[ "public", "<", "Result", ">", "Result", "call", "(", "TDApiRequest", "apiRequest", ",", "Optional", "<", "String", ">", "apiKeyCache", ",", "final", "Class", "<", "Result", ">", "resultType", ")", "throws", "TDClientException", "{", "return", "call", "(", "a...
Submit an API request, and bind the returned JSON data into an object of the given result type. For mapping it uses Jackson object mapper. @param apiRequest @param resultType @param <Result> @return @throws TDClientException
[ "Submit", "an", "API", "request", "and", "bind", "the", "returned", "JSON", "data", "into", "an", "object", "of", "the", "given", "result", "type", ".", "For", "mapping", "it", "uses", "Jackson", "object", "mapper", "." ]
train
https://github.com/treasure-data/td-client-java/blob/2769cbcf0e787d457344422cfcdde467399bd684/src/main/java/com/treasuredata/client/TDHttpClient.java#L514-L518
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/http/AbstractHttpRequest.java
AbstractHttpRequest.getProxiedConnection
protected static HttpURLConnection getProxiedConnection(String url) throws MalformedURLException, IOException { """ Creates an HTTP connection. Optionally checks for proxy parameters and creates a proxied connection using the system properties: "hellosign.proxy.url" - the URL of the HTTP proxy "hellosign.prox...
java
protected static HttpURLConnection getProxiedConnection(String url) throws MalformedURLException, IOException { HttpURLConnection conn = null; Proxy proxy = null; String proxyUrlStr = System.getProperty("hellosign.proxy.url"); String proxyPortStr = System.getProperty("hellosign.proxy.por...
[ "protected", "static", "HttpURLConnection", "getProxiedConnection", "(", "String", "url", ")", "throws", "MalformedURLException", ",", "IOException", "{", "HttpURLConnection", "conn", "=", "null", ";", "Proxy", "proxy", "=", "null", ";", "String", "proxyUrlStr", "="...
Creates an HTTP connection. Optionally checks for proxy parameters and creates a proxied connection using the system properties: "hellosign.proxy.url" - the URL of the HTTP proxy "hellosign.proxy.port" - the port of the HTTP proxy @param url String URL to connect to @return HttpUrlConnection the (proxied) connection ...
[ "Creates", "an", "HTTP", "connection", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/http/AbstractHttpRequest.java#L171-L189
vatbub/common
core/src/main/java/com/github/vatbub/common/core/Prefs.java
Prefs.getPreference
public String getPreference(String prefKey, String defaultValue) { """ Returns the value of the specified preference. @param prefKey The preference to look for @param defaultValue The value to be returned if the key was not found in the properties file @return The value of the specified preference or the...
java
public String getPreference(String prefKey, String defaultValue) { return props.getProperty(prefKey, defaultValue); }
[ "public", "String", "getPreference", "(", "String", "prefKey", ",", "String", "defaultValue", ")", "{", "return", "props", ".", "getProperty", "(", "prefKey", ",", "defaultValue", ")", ";", "}" ]
Returns the value of the specified preference. @param prefKey The preference to look for @param defaultValue The value to be returned if the key was not found in the properties file @return The value of the specified preference or the {@code defaultValue} if the key was not found
[ "Returns", "the", "value", "of", "the", "specified", "preference", "." ]
train
https://github.com/vatbub/common/blob/8b9fd2ece0a23d520ce53b66c84cbd094e378443/core/src/main/java/com/github/vatbub/common/core/Prefs.java#L85-L87
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_service_serviceName_repaymentConsumption_consumptionId_GET
public OvhRepaymentConsumption billingAccount_service_serviceName_repaymentConsumption_consumptionId_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/service/{serviceName}/repaymentConsumption/{consumptio...
java
public OvhRepaymentConsumption billingAccount_service_serviceName_repaymentConsumption_consumptionId_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException { String qPath = "/telephony/{billingAccount}/service/{serviceName}/repaymentConsumption/{consumptionId}"; StringBuilder sb = pat...
[ "public", "OvhRepaymentConsumption", "billingAccount_service_serviceName_repaymentConsumption_consumptionId_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "consumptionId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephon...
Get this object properties REST: GET /telephony/{billingAccount}/service/{serviceName}/repaymentConsumption/{consumptionId} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param consumptionId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L4088-L4093
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/spout/AmBaseSpout.java
AmBaseSpout.emitWithOnlyKey
protected void emitWithOnlyKey(StreamMessage message, Object messageKey) { """ Use only MessageKey(Use key history's value) and not use MessageId(Id identify by storm).<br> Send message to downstream component.<br> Use following situation. <ol> <li>Use this class's key history function.</li> <li>Not use storm...
java
protected void emitWithOnlyKey(StreamMessage message, Object messageKey) { if (this.recordHistory) { message.getHeader().addHistory(messageKey.toString()); } this.getCollector().emit(new Values("", message)); }
[ "protected", "void", "emitWithOnlyKey", "(", "StreamMessage", "message", ",", "Object", "messageKey", ")", "{", "if", "(", "this", ".", "recordHistory", ")", "{", "message", ".", "getHeader", "(", ")", ".", "addHistory", "(", "messageKey", ".", "toString", "...
Use only MessageKey(Use key history's value) and not use MessageId(Id identify by storm).<br> Send message to downstream component.<br> Use following situation. <ol> <li>Use this class's key history function.</li> <li>Not use storm's fault detect function.</li> </ol> @param message sending message @param messageKey Me...
[ "Use", "only", "MessageKey", "(", "Use", "key", "history", "s", "value", ")", "and", "not", "use", "MessageId", "(", "Id", "identify", "by", "storm", ")", ".", "<br", ">", "Send", "message", "to", "downstream", "component", ".", "<br", ">", "Use", "fol...
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/spout/AmBaseSpout.java#L425-L433
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestApiClient.java
RestApiClient.deleteUserFromGroup
public Response deleteUserFromGroup(String username, String groupName) { """ Delete user from group. @param username the username @param groupName the group name @return the response """ return restClient.delete("users/" + username + "/groups/" + groupName, new HashMap<String, String>()); }
java
public Response deleteUserFromGroup(String username, String groupName) { return restClient.delete("users/" + username + "/groups/" + groupName, new HashMap<String, String>()); }
[ "public", "Response", "deleteUserFromGroup", "(", "String", "username", ",", "String", "groupName", ")", "{", "return", "restClient", ".", "delete", "(", "\"users/\"", "+", "username", "+", "\"/groups/\"", "+", "groupName", ",", "new", "HashMap", "<", "String", ...
Delete user from group. @param username the username @param groupName the group name @return the response
[ "Delete", "user", "from", "group", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestApiClient.java#L535-L538
bwkimmel/java-util
src/main/java/ca/eandb/util/io/FileUtil.java
FileUtil.postOrderTraversal
public static boolean postOrderTraversal(File root, FileVisitor visitor) throws Exception { """ Walks a directory tree using post-order traversal. The contents of a directory are visited before the directory itself is visited. @param root The <code>File</code> indicating the file or directory to walk. @param ...
java
public static boolean postOrderTraversal(File root, FileVisitor visitor) throws Exception { if (root.isDirectory()) { for (File child : root.listFiles()) { if (!postOrderTraversal(child, visitor)) { return false; } } } return visitor.visit(root); }
[ "public", "static", "boolean", "postOrderTraversal", "(", "File", "root", ",", "FileVisitor", "visitor", ")", "throws", "Exception", "{", "if", "(", "root", ".", "isDirectory", "(", ")", ")", "{", "for", "(", "File", "child", ":", "root", ".", "listFiles",...
Walks a directory tree using post-order traversal. The contents of a directory are visited before the directory itself is visited. @param root The <code>File</code> indicating the file or directory to walk. @param visitor The <code>FileVisitor</code> to use to visit files and directories while walking the tree. @retur...
[ "Walks", "a", "directory", "tree", "using", "post", "-", "order", "traversal", ".", "The", "contents", "of", "a", "directory", "are", "visited", "before", "the", "directory", "itself", "is", "visited", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/io/FileUtil.java#L230-L239
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/service/RunService.java
RunService.addShutdownHookForStoppingContainers
public void addShutdownHookForStoppingContainers(final boolean keepContainer, final boolean removeVolumes, final boolean removeCustomNetworks) { """ Add a shutdown hook in order to stop all registered containers """ Runtime.getRuntime().addShutdownHook(new Thread() { @Override p...
java
public void addShutdownHookForStoppingContainers(final boolean keepContainer, final boolean removeVolumes, final boolean removeCustomNetworks) { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { try { stopStartedContaine...
[ "public", "void", "addShutdownHookForStoppingContainers", "(", "final", "boolean", "keepContainer", ",", "final", "boolean", "removeVolumes", ",", "final", "boolean", "removeCustomNetworks", ")", "{", "Runtime", ".", "getRuntime", "(", ")", ".", "addShutdownHook", "("...
Add a shutdown hook in order to stop all registered containers
[ "Add", "a", "shutdown", "hook", "in", "order", "to", "stop", "all", "registered", "containers" ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/service/RunService.java#L261-L272
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java
ViewHelper.setTextSize
public static void setTextSize(EfficientCacheView cacheView, int viewId, float size) { """ Equivalent to calling TextView.setTextSize @param cacheView The cache of views to get the view from @param viewId The id of the view whose text size should change @param size The scaled pixel size. """ ...
java
public static void setTextSize(EfficientCacheView cacheView, int viewId, float size) { View view = cacheView.findViewByIdEfficient(viewId); if (view instanceof TextView) { ((TextView) view).setTextSize(size); } }
[ "public", "static", "void", "setTextSize", "(", "EfficientCacheView", "cacheView", ",", "int", "viewId", ",", "float", "size", ")", "{", "View", "view", "=", "cacheView", ".", "findViewByIdEfficient", "(", "viewId", ")", ";", "if", "(", "view", "instanceof", ...
Equivalent to calling TextView.setTextSize @param cacheView The cache of views to get the view from @param viewId The id of the view whose text size should change @param size The scaled pixel size.
[ "Equivalent", "to", "calling", "TextView", ".", "setTextSize" ]
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java#L157-L162
softindex/datakernel
core-promise/src/main/java/io/datakernel/file/AsyncFile.java
AsyncFile.readFile
public static Promise<ByteBuf> readFile(Executor executor, Path path) { """ Reads all bytes from this channel into the given buffer. @param path the path of the file to read """ return openAsync(executor, path, set(READ)) .then(file -> file.read() .then(buf -> file.close() .whenException...
java
public static Promise<ByteBuf> readFile(Executor executor, Path path) { return openAsync(executor, path, set(READ)) .then(file -> file.read() .then(buf -> file.close() .whenException($ -> buf.recycle()) .map($ -> buf))); }
[ "public", "static", "Promise", "<", "ByteBuf", ">", "readFile", "(", "Executor", "executor", ",", "Path", "path", ")", "{", "return", "openAsync", "(", "executor", ",", "path", ",", "set", "(", "READ", ")", ")", ".", "then", "(", "file", "->", "file", ...
Reads all bytes from this channel into the given buffer. @param path the path of the file to read
[ "Reads", "all", "bytes", "from", "this", "channel", "into", "the", "given", "buffer", "." ]
train
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/core-promise/src/main/java/io/datakernel/file/AsyncFile.java#L201-L207
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/DefaultBeanContext.java
DefaultBeanContext.createBean
protected @Nonnull <T> T createBean(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) { """ Creates a bean. @param resolutionContext The bean resolution context @param beanType The bean type @param qualifier The qualifier @param ...
java
protected @Nonnull <T> T createBean(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) { ArgumentUtils.requireNonNull("beanType", beanType); Optional<BeanDefinition<T>> concreteCandidate = findConcreteCandidate(beanType, qualifier, true, fal...
[ "protected", "@", "Nonnull", "<", "T", ">", "T", "createBean", "(", "@", "Nullable", "BeanResolutionContext", "resolutionContext", ",", "@", "Nonnull", "Class", "<", "T", ">", "beanType", ",", "@", "Nullable", "Qualifier", "<", "T", ">", "qualifier", ")", ...
Creates a bean. @param resolutionContext The bean resolution context @param beanType The bean type @param qualifier The qualifier @param <T> The bean generic type @return The instance
[ "Creates", "a", "bean", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/DefaultBeanContext.java#L804-L820
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.deleteIssue
@Deprecated public void deleteIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException { """ Delete a project issue. <pre><code>DELETE /projects/:id/issues/:issue_iid</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project in...
java
@Deprecated public void deleteIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, getDefaultPerPageParam(), "projects", getProjectIdOrPath(p...
[ "@", "Deprecated", "public", "void", "deleteIssue", "(", "Object", "projectIdOrPath", ",", "Integer", "issueId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "...
Delete a project issue. <pre><code>DELETE /projects/:id/issues/:issue_iid</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param issueId the internal ID of a project's issue @throws GitLabApiException if any exception occurs @d...
[ "Delete", "a", "project", "issue", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1874-L1878
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readHistoricalPrincipal
public CmsHistoryPrincipal readHistoricalPrincipal(CmsRequestContext context, CmsUUID principalId) throws CmsException { """ Reads a principal (an user or group) from the historical archive based on its ID.<p> @param context the current request context @param principalId the id of the principal to read ...
java
public CmsHistoryPrincipal readHistoricalPrincipal(CmsRequestContext context, CmsUUID principalId) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsHistoryPrincipal result = null; try { result = m_driverManager.readHistoricalPrincipal(dbc, pr...
[ "public", "CmsHistoryPrincipal", "readHistoricalPrincipal", "(", "CmsRequestContext", "context", ",", "CmsUUID", "principalId", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "CmsHisto...
Reads a principal (an user or group) from the historical archive based on its ID.<p> @param context the current request context @param principalId the id of the principal to read @return the historical principal entry with the given id @throws CmsException if something goes wrong, ie. {@link CmsDbEntryNotFoundExcept...
[ "Reads", "a", "principal", "(", "an", "user", "or", "group", ")", "from", "the", "historical", "archive", "based", "on", "its", "ID", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4402-L4415
Azure/azure-sdk-for-java
dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/RecordSetsInner.java
RecordSetsInner.listByDnsZoneWithServiceResponseAsync
public Observable<ServiceResponse<Page<RecordSetInner>>> listByDnsZoneWithServiceResponseAsync(final String resourceGroupName, final String zoneName, final Integer top, final String recordsetnamesuffix) { """ Lists all record sets in a DNS zone. @param resourceGroupName The name of the resource group. @param z...
java
public Observable<ServiceResponse<Page<RecordSetInner>>> listByDnsZoneWithServiceResponseAsync(final String resourceGroupName, final String zoneName, final Integer top, final String recordsetnamesuffix) { return listByDnsZoneSinglePageAsync(resourceGroupName, zoneName, top, recordsetnamesuffix) .con...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "RecordSetInner", ">", ">", ">", "listByDnsZoneWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "zoneName", ",", "final", "Integer", "top", ",", "final",...
Lists all record sets in a DNS zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets. @param recordsetnamesuffix The suffix label of the...
[ "Lists", "all", "record", "sets", "in", "a", "DNS", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/RecordSetsInner.java#L1291-L1303
williamwebb/alogger
Utilities/src/main/java/com/jug6ernaut/android/utilites/Eula.java
Eula.show
public static boolean show(final Activity activity) { """ Displays the EULA if necessary. This method should be called from the onCreate() method of your main Activity. @param activity The Activity to finish if the user rejects the EULA. @return Whether the user has agreed already. """ final Share...
java
public static boolean show(final Activity activity) { final SharedPreferences preferences = activity.getSharedPreferences(PREFERENCES_EULA, Activity.MODE_PRIVATE); if (!preferences.getBoolean(PREFERENCE_EULA_ACCEPTED, false)) { final AlertDialog.Builder builder = new AlertDia...
[ "public", "static", "boolean", "show", "(", "final", "Activity", "activity", ")", "{", "final", "SharedPreferences", "preferences", "=", "activity", ".", "getSharedPreferences", "(", "PREFERENCES_EULA", ",", "Activity", ".", "MODE_PRIVATE", ")", ";", "if", "(", ...
Displays the EULA if necessary. This method should be called from the onCreate() method of your main Activity. @param activity The Activity to finish if the user rejects the EULA. @return Whether the user has agreed already.
[ "Displays", "the", "EULA", "if", "necessary", ".", "This", "method", "should", "be", "called", "from", "the", "onCreate", "()", "method", "of", "your", "main", "Activity", "." ]
train
https://github.com/williamwebb/alogger/blob/61fca49e0b8d9c3a76c40da8883ac354b240351e/Utilities/src/main/java/com/jug6ernaut/android/utilites/Eula.java#L62-L92
Credntia/MVBarcodeReader
mvbarcodereader/src/main/java/devliving/online/mvbarcodereader/BarcodeCaptureFragment.java
BarcodeCaptureFragment.onRequestPermissionsResult
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { """ Callback for the result from requesting permissions. This method is invoked for every call o...
java
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode != RC_HANDLE_CAMERA_PERM) { Log.d("BARCODE-SCANNER", "Got unexpect...
[ "@", "Override", "public", "void", "onRequestPermissionsResult", "(", "int", "requestCode", ",", "@", "NonNull", "String", "[", "]", "permissions", ",", "@", "NonNull", "int", "[", "]", "grantResults", ")", "{", "if", "(", "requestCode", "!=", "RC_HANDLE_CAMER...
Callback for the result from requesting permissions. This method is invoked for every call on {@link #requestPermissions(String[], int)}. <p> <strong>Note:</strong> It is possible that the permissions request interaction with the user is interrupted. In this case you will receive empty permissions and results arrays wh...
[ "Callback", "for", "the", "result", "from", "requesting", "permissions", ".", "This", "method", "is", "invoked", "for", "every", "call", "on", "{", "@link", "#requestPermissions", "(", "String", "[]", "int", ")", "}", ".", "<p", ">", "<strong", ">", "Note"...
train
https://github.com/Credntia/MVBarcodeReader/blob/2a2561f1c3b4d4e3c046a341fbf23a31eabfda8d/mvbarcodereader/src/main/java/devliving/online/mvbarcodereader/BarcodeCaptureFragment.java#L224-L259
meertensinstituut/mtas
src/main/java/mtas/codec/util/CodecSearchTree.java
CodecSearchTree.searchMtasTree
public static ArrayList<MtasTreeHit<?>> searchMtasTree(int position, IndexInput in, long ref, long objectRefApproxOffset) throws IOException { """ Search mtas tree. @param position the position @param in the in @param ref the ref @param objectRefApproxOffset the object ref approx offset @return the ar...
java
public static ArrayList<MtasTreeHit<?>> searchMtasTree(int position, IndexInput in, long ref, long objectRefApproxOffset) throws IOException { return searchMtasTree(position, position, in, ref, objectRefApproxOffset); }
[ "public", "static", "ArrayList", "<", "MtasTreeHit", "<", "?", ">", ">", "searchMtasTree", "(", "int", "position", ",", "IndexInput", "in", ",", "long", "ref", ",", "long", "objectRefApproxOffset", ")", "throws", "IOException", "{", "return", "searchMtasTree", ...
Search mtas tree. @param position the position @param in the in @param ref the ref @param objectRefApproxOffset the object ref approx offset @return the array list @throws IOException Signals that an I/O exception has occurred.
[ "Search", "mtas", "tree", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/CodecSearchTree.java#L121-L124
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ClassParameter.java
ClassParameter.validate
@Override public boolean validate(Class<? extends C> obj) throws ParameterException { """ Checks if the given parameter value is valid for this ClassParameter. If not a parameter exception is thrown. """ if(obj == null) { throw new UnspecifiedParameterException(this); } if(!restrictionClas...
java
@Override public boolean validate(Class<? extends C> obj) throws ParameterException { if(obj == null) { throw new UnspecifiedParameterException(this); } if(!restrictionClass.isAssignableFrom(obj)) { throw new WrongParameterValueException(this, obj.getName(), "Given class not a subclass / imple...
[ "@", "Override", "public", "boolean", "validate", "(", "Class", "<", "?", "extends", "C", ">", "obj", ")", "throws", "ParameterException", "{", "if", "(", "obj", "==", "null", ")", "{", "throw", "new", "UnspecifiedParameterException", "(", "this", ")", ";"...
Checks if the given parameter value is valid for this ClassParameter. If not a parameter exception is thrown.
[ "Checks", "if", "the", "given", "parameter", "value", "is", "valid", "for", "this", "ClassParameter", ".", "If", "not", "a", "parameter", "exception", "is", "thrown", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ClassParameter.java#L139-L148
colin-lee/mybatis-spring-support
src/main/java/com/github/mybatis/spring/ClassPathMapperScanner.java
ClassPathMapperScanner.registerFilters
public void registerFilters() { """ Configures parent scanner to search for the right interfaces. It can search for all interfaces or just for those that extends a markerInterface or/and those annotated with the annotationClass """ boolean acceptAllInterfaces = true; // if specified, use the given a...
java
public void registerFilters() { boolean acceptAllInterfaces = true; // if specified, use the given annotation and / or marker interface if (this.annotationClass != null) { addIncludeFilter(new AnnotationTypeFilter(this.annotationClass)); acceptAllInterfaces = false; } // override Assig...
[ "public", "void", "registerFilters", "(", ")", "{", "boolean", "acceptAllInterfaces", "=", "true", ";", "// if specified, use the given annotation and / or marker interface", "if", "(", "this", ".", "annotationClass", "!=", "null", ")", "{", "addIncludeFilter", "(", "ne...
Configures parent scanner to search for the right interfaces. It can search for all interfaces or just for those that extends a markerInterface or/and those annotated with the annotationClass
[ "Configures", "parent", "scanner", "to", "search", "for", "the", "right", "interfaces", ".", "It", "can", "search", "for", "all", "interfaces", "or", "just", "for", "those", "that", "extends", "a", "markerInterface", "or", "/", "and", "those", "annotated", "...
train
https://github.com/colin-lee/mybatis-spring-support/blob/de412e98d00e9a012c0619778fa1a61832863b82/src/main/java/com/github/mybatis/spring/ClassPathMapperScanner.java#L94-L130
sebastiangraf/perfidix
src/main/java/org/perfidix/ouput/asciitable/NiceTable.java
NiceTable.addHeader
public void addHeader(final String title, final char mark, final Alignment orientation) { """ Adds a header row to the table. can be used to give a table some title. <pre> addHeader(&quot;hello&quot;,'.',NiceTable.LEFT) would produce a row like ... hello .......................... {rows in here.} </pre>...
java
public void addHeader(final String title, final char mark, final Alignment orientation) { final Header header = new Header(title, mark, orientation, this); rows.add(header); }
[ "public", "void", "addHeader", "(", "final", "String", "title", ",", "final", "char", "mark", ",", "final", "Alignment", "orientation", ")", "{", "final", "Header", "header", "=", "new", "Header", "(", "title", ",", "mark", ",", "orientation", ",", "this",...
Adds a header row to the table. can be used to give a table some title. <pre> addHeader(&quot;hello&quot;,'.',NiceTable.LEFT) would produce a row like ... hello .......................... {rows in here.} </pre> @param title the string to display as a header @param mark the mark to use for the rest of the column @para...
[ "Adds", "a", "header", "row", "to", "the", "table", ".", "can", "be", "used", "to", "give", "a", "table", "some", "title", "." ]
train
https://github.com/sebastiangraf/perfidix/blob/f13aa793b6a3055215ed4edbb946c1bb5d564886/src/main/java/org/perfidix/ouput/asciitable/NiceTable.java#L93-L97