id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
43,400
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/mvp/SimpleClientFactory.java
SimpleClientFactory.setConfigDynamically
@Override public void setConfigDynamically(Config viewConfig) { if(viewConfig instanceof MapViewConfig) { MapViewConfig newMapViewConfig = (MapViewConfig) viewConfig; updateMapViewConfig(newMapViewConfig); } }
java
@Override public void setConfigDynamically(Config viewConfig) { if(viewConfig instanceof MapViewConfig) { MapViewConfig newMapViewConfig = (MapViewConfig) viewConfig; updateMapViewConfig(newMapViewConfig); } }
[ "@", "Override", "public", "void", "setConfigDynamically", "(", "Config", "viewConfig", ")", "{", "if", "(", "viewConfig", "instanceof", "MapViewConfig", ")", "{", "MapViewConfig", "newMapViewConfig", "=", "(", "MapViewConfig", ")", "viewConfig", ";", "updateMapView...
This method configures dynamically any config in the xml. Right now, only overrides the coordinates of the map but it could be use to override any configuration @param viewConfig
[ "This", "method", "configures", "dynamically", "any", "config", "in", "the", "xml", ".", "Right", "now", "only", "overrides", "the", "coordinates", "of", "the", "map", "but", "it", "could", "be", "use", "to", "override", "any", "configuration" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/mvp/SimpleClientFactory.java#L208-L215
43,401
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java
ValidationSessionComponent.sessionCheck
public void sessionCheck(HttpServletRequest req) { String authHeader = req.getHeader("Authorization"); if (authHeader != null && this.validationSessionCheck(authHeader)) { return; } if (req.getCookies() != null) { Cookie cookie = Arrays.stream(req.getCookies()).f...
java
public void sessionCheck(HttpServletRequest req) { String authHeader = req.getHeader("Authorization"); if (authHeader != null && this.validationSessionCheck(authHeader)) { return; } if (req.getCookies() != null) { Cookie cookie = Arrays.stream(req.getCookies()).f...
[ "public", "void", "sessionCheck", "(", "HttpServletRequest", "req", ")", "{", "String", "authHeader", "=", "req", ".", "getHeader", "(", "\"Authorization\"", ")", ";", "if", "(", "authHeader", "!=", "null", "&&", "this", ".", "validationSessionCheck", "(", "au...
Session check. @param req the req
[ "Session", "check", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java#L53-L74
43,402
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java
ValidationSessionComponent.checkAuth
public ValidationSessionInfo checkAuth(ValidationLoginInfo info, HttpServletRequest req, HttpServletResponse res) { if (info.getToken() == null || info.getToken().isEmpty()) { throw new ValidationLibException("UnAuthorization", HttpStatus.UNAUTHORIZED); } if (this.validationConfig.g...
java
public ValidationSessionInfo checkAuth(ValidationLoginInfo info, HttpServletRequest req, HttpServletResponse res) { if (info.getToken() == null || info.getToken().isEmpty()) { throw new ValidationLibException("UnAuthorization", HttpStatus.UNAUTHORIZED); } if (this.validationConfig.g...
[ "public", "ValidationSessionInfo", "checkAuth", "(", "ValidationLoginInfo", "info", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "if", "(", "info", ".", "getToken", "(", ")", "==", "null", "||", "info", ".", "getToken", "(", "...
Check auth validation session info. @param info the info @param req the req @param res the res @return the validation session info
[ "Check", "auth", "validation", "session", "info", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java#L84-L103
43,403
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java
ValidationSessionComponent.createSession
public ValidationSessionInfo createSession(HttpServletRequest req, HttpServletResponse res) { String key = this.getSessionKey(); ValidationSessionInfo sessionInfo = new ValidationSessionInfo(req, key); this.sessionMap.put(key, sessionInfo); res.addCookie(new Cookie("AuthToken", key)); ...
java
public ValidationSessionInfo createSession(HttpServletRequest req, HttpServletResponse res) { String key = this.getSessionKey(); ValidationSessionInfo sessionInfo = new ValidationSessionInfo(req, key); this.sessionMap.put(key, sessionInfo); res.addCookie(new Cookie("AuthToken", key)); ...
[ "public", "ValidationSessionInfo", "createSession", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "String", "key", "=", "this", ".", "getSessionKey", "(", ")", ";", "ValidationSessionInfo", "sessionInfo", "=", "new", "ValidationSession...
Create session validation session info. @param req the req @param res the res @return the validation session info
[ "Create", "session", "validation", "session", "info", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java#L122-L128
43,404
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java
ValidationSessionComponent.getSession
public Object getSession(HttpServletRequest req) { if (req.getCookies() == null) { return null; } Cookie cookie = Arrays.stream(req.getCookies()).filter(c -> c.getName().equalsIgnoreCase("ValidationSession")).findFirst().orElse(null); if (cookie == null) { retur...
java
public Object getSession(HttpServletRequest req) { if (req.getCookies() == null) { return null; } Cookie cookie = Arrays.stream(req.getCookies()).filter(c -> c.getName().equalsIgnoreCase("ValidationSession")).findFirst().orElse(null); if (cookie == null) { retur...
[ "public", "Object", "getSession", "(", "HttpServletRequest", "req", ")", "{", "if", "(", "req", ".", "getCookies", "(", ")", "==", "null", ")", "{", "return", "null", ";", "}", "Cookie", "cookie", "=", "Arrays", ".", "stream", "(", "req", ".", "getCook...
Gets session. @param req the req @return the session
[ "Gets", "session", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/setting/session/ValidationSessionComponent.java#L136-L147
43,405
lightblue-platform/lightblue-client
http/src/main/java/com/redhat/lightblue/client/http/transport/JavaNetHttpTransport.java
JavaNetHttpTransport.response
private String response(HttpURLConnection connection) throws LightblueHttpClientException { try (InputStream responseStream = connection.getInputStream()) { return readResponseStream(responseStream, connection); } catch (IOException e) { return readErrorStream(connection,e); ...
java
private String response(HttpURLConnection connection) throws LightblueHttpClientException { try (InputStream responseStream = connection.getInputStream()) { return readResponseStream(responseStream, connection); } catch (IOException e) { return readErrorStream(connection,e); ...
[ "private", "String", "response", "(", "HttpURLConnection", "connection", ")", "throws", "LightblueHttpClientException", "{", "try", "(", "InputStream", "responseStream", "=", "connection", ".", "getInputStream", "(", ")", ")", "{", "return", "readResponseStream", "(",...
Parses response, whether or not the request was successful, if possible. Reads entire input stream and closes it so the socket knows it is finished and may be put back into a pool for reuse.
[ "Parses", "response", "whether", "or", "not", "the", "request", "was", "successful", "if", "possible", ".", "Reads", "entire", "input", "stream", "and", "closes", "it", "so", "the", "socket", "knows", "it", "is", "finished", "and", "may", "be", "put", "bac...
03790aff34e90d3889f60fd6c603c21a21dc1a40
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/http/src/main/java/com/redhat/lightblue/client/http/transport/JavaNetHttpTransport.java#L207-L213
43,406
lightblue-platform/lightblue-client
http/src/main/java/com/redhat/lightblue/client/http/transport/JavaNetHttpTransport.java
JavaNetHttpTransport.readResponseStream
private String readResponseStream(InputStream responseStream, HttpURLConnection connection) throws IOException { LOGGER.debug("Reading response stream"); InputStream decodedStream = responseStream; if (compression == Compression.LZF && "lzf".equals(connection.getHeaderField("Content-...
java
private String readResponseStream(InputStream responseStream, HttpURLConnection connection) throws IOException { LOGGER.debug("Reading response stream"); InputStream decodedStream = responseStream; if (compression == Compression.LZF && "lzf".equals(connection.getHeaderField("Content-...
[ "private", "String", "readResponseStream", "(", "InputStream", "responseStream", ",", "HttpURLConnection", "connection", ")", "throws", "IOException", "{", "LOGGER", ".", "debug", "(", "\"Reading response stream\"", ")", ";", "InputStream", "decodedStream", "=", "respon...
Tries to efficiently allocate the response string if the "Content-Length" header is set.
[ "Tries", "to", "efficiently", "allocate", "the", "response", "string", "if", "the", "Content", "-", "Length", "header", "is", "set", "." ]
03790aff34e90d3889f60fd6c603c21a21dc1a40
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/http/src/main/java/com/redhat/lightblue/client/http/transport/JavaNetHttpTransport.java#L239-L255
43,407
needle4j/needle4j
src/main/java/org/needle4j/db/operation/AbstractDBOperation.java
AbstractDBOperation.openConnection
protected void openConnection() throws SQLException { if (connection == null) { try { Class.forName(configuration.getJdbcDriver()); } catch (NullPointerException npe) { throw new RuntimeException("error while lookup jdbc driver class. jdbc driver is not co...
java
protected void openConnection() throws SQLException { if (connection == null) { try { Class.forName(configuration.getJdbcDriver()); } catch (NullPointerException npe) { throw new RuntimeException("error while lookup jdbc driver class. jdbc driver is not co...
[ "protected", "void", "openConnection", "(", ")", "throws", "SQLException", "{", "if", "(", "connection", "==", "null", ")", "{", "try", "{", "Class", ".", "forName", "(", "configuration", ".", "getJdbcDriver", "(", ")", ")", ";", "}", "catch", "(", "Null...
Establish a connection to the given database. @throws SQLException if a database access error occurs
[ "Establish", "a", "connection", "to", "the", "given", "database", "." ]
55fbcdeed72be5cf26e4404b0fe40282792b51f2
https://github.com/needle4j/needle4j/blob/55fbcdeed72be5cf26e4404b0fe40282792b51f2/src/main/java/org/needle4j/db/operation/AbstractDBOperation.java#L43-L57
43,408
needle4j/needle4j
src/main/java/org/needle4j/db/operation/AbstractDBOperation.java
AbstractDBOperation.closeConnection
protected void closeConnection() throws SQLException { if (connection != null && !connection.isClosed()) { connection.close(); connection = null; } }
java
protected void closeConnection() throws SQLException { if (connection != null && !connection.isClosed()) { connection.close(); connection = null; } }
[ "protected", "void", "closeConnection", "(", ")", "throws", "SQLException", "{", "if", "(", "connection", "!=", "null", "&&", "!", "connection", ".", "isClosed", "(", ")", ")", "{", "connection", ".", "close", "(", ")", ";", "connection", "=", "null", ";...
Close the connection to the database. @throws SQLException if a database access error occurs
[ "Close", "the", "connection", "to", "the", "database", "." ]
55fbcdeed72be5cf26e4404b0fe40282792b51f2
https://github.com/needle4j/needle4j/blob/55fbcdeed72be5cf26e4404b0fe40282792b51f2/src/main/java/org/needle4j/db/operation/AbstractDBOperation.java#L65-L71
43,409
needle4j/needle4j
src/main/java/org/needle4j/db/operation/AbstractDBOperation.java
AbstractDBOperation.executeScript
protected void executeScript(final String filename, final Statement statement) throws SQLException { LOG.info("Executing sql script: " + filename); InputStream fileInputStream; try { fileInputStream = ConfigurationLoader.loadResource(filename); } catch (FileNotFoundException...
java
protected void executeScript(final String filename, final Statement statement) throws SQLException { LOG.info("Executing sql script: " + filename); InputStream fileInputStream; try { fileInputStream = ConfigurationLoader.loadResource(filename); } catch (FileNotFoundException...
[ "protected", "void", "executeScript", "(", "final", "String", "filename", ",", "final", "Statement", "statement", ")", "throws", "SQLException", "{", "LOG", ".", "info", "(", "\"Executing sql script: \"", "+", "filename", ")", ";", "InputStream", "fileInputStream", ...
Execute the given sql script. @param filename the filename of the sql script @param statement the {@link Statement} to be used for executing a SQL statement. @throws SQLException if a database access error occurs
[ "Execute", "the", "given", "sql", "script", "." ]
55fbcdeed72be5cf26e4404b0fe40282792b51f2
https://github.com/needle4j/needle4j/blob/55fbcdeed72be5cf26e4404b0fe40282792b51f2/src/main/java/org/needle4j/db/operation/AbstractDBOperation.java#L183-L196
43,410
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java
SerdesManagerImpl.register
@SuppressWarnings("unchecked") public <T> HandlerRegistration register(Deserializer<T> deserializer) { final HandlerRegistration reg = bindDeserializerToType(deserializer, deserializer.handledType()); if (deserializer instanceof HasImpl) { Class[] impls = ((HasImpl) deserializer).implTy...
java
@SuppressWarnings("unchecked") public <T> HandlerRegistration register(Deserializer<T> deserializer) { final HandlerRegistration reg = bindDeserializerToType(deserializer, deserializer.handledType()); if (deserializer instanceof HasImpl) { Class[] impls = ((HasImpl) deserializer).implTy...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "HandlerRegistration", "register", "(", "Deserializer", "<", "T", ">", "deserializer", ")", "{", "final", "HandlerRegistration", "reg", "=", "bindDeserializerToType", "(", "deserializer", ...
Register a deserializer of the given type. @param deserializer The deserializer of T. @param <T> The type of the object to be deserialized. @return The {@link com.google.web.bindery.event.shared.HandlerRegistration} object, capable of cancelling this HandlerRegistration to the {@link SerdesManagerImpl}.
[ "Register", "a", "deserializer", "of", "the", "given", "type", "." ]
40163a75cd17815d5089935d0dd97b8d652ad6d4
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java#L57-L82
43,411
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java
SerdesManagerImpl.register
@SuppressWarnings("unchecked") public <T> HandlerRegistration register(Serializer<T> serializer) { final HandlerRegistration reg = bindSerializerToType(serializer, serializer.handledType()); if (serializer instanceof HasImpl) { Class[] impls = ((HasImpl) serializer).implTypes(); ...
java
@SuppressWarnings("unchecked") public <T> HandlerRegistration register(Serializer<T> serializer) { final HandlerRegistration reg = bindSerializerToType(serializer, serializer.handledType()); if (serializer instanceof HasImpl) { Class[] impls = ((HasImpl) serializer).implTypes(); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "HandlerRegistration", "register", "(", "Serializer", "<", "T", ">", "serializer", ")", "{", "final", "HandlerRegistration", "reg", "=", "bindSerializerToType", "(", "serializer", ",", ...
Register a serializer of the given type. @param serializer The serializer of T. @param <T> The type of the object to be serialized. @return The {@link HandlerRegistration} object, capable of cancelling this HandlerRegistration to the {@link SerdesManagerImpl}.
[ "Register", "a", "serializer", "of", "the", "given", "type", "." ]
40163a75cd17815d5089935d0dd97b8d652ad6d4
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java#L93-L118
43,412
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java
SerdesManagerImpl.getDeserializer
@SuppressWarnings("unchecked") public <T> Deserializer<T> getDeserializer(Class<T> type, String mediaType) throws SerializationException { checkNotNull(type, "Type (Class<T>) cannot be null."); checkNotNull(mediaType, "Media-Type cannot be null."); final String typeName = getClassName(type)...
java
@SuppressWarnings("unchecked") public <T> Deserializer<T> getDeserializer(Class<T> type, String mediaType) throws SerializationException { checkNotNull(type, "Type (Class<T>) cannot be null."); checkNotNull(mediaType, "Media-Type cannot be null."); final String typeName = getClassName(type)...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "Deserializer", "<", "T", ">", "getDeserializer", "(", "Class", "<", "T", ">", "type", ",", "String", "mediaType", ")", "throws", "SerializationException", "{", "checkNotNull", "(", ...
Retrieve Deserializer from manager. @param type The type class of the deserializer. @param <T> The type of the deserializer. @return The deserializer of the specified type. @throws SerializationException if no deserializer was registered for the class.
[ "Retrieve", "Deserializer", "from", "manager", "." ]
40163a75cd17815d5089935d0dd97b8d652ad6d4
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java#L151-L179
43,413
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java
SerdesManagerImpl.getSerializer
@SuppressWarnings("unchecked") public <T> Serializer<T> getSerializer(Class<T> type, String mediaType) throws SerializationException { checkNotNull(type, "Type (Class<T>) cannot be null."); checkNotNull(mediaType, "Media-Type cannot be null."); final String typeName = getClassName(type); ...
java
@SuppressWarnings("unchecked") public <T> Serializer<T> getSerializer(Class<T> type, String mediaType) throws SerializationException { checkNotNull(type, "Type (Class<T>) cannot be null."); checkNotNull(mediaType, "Media-Type cannot be null."); final String typeName = getClassName(type); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "Serializer", "<", "T", ">", "getSerializer", "(", "Class", "<", "T", ">", "type", ",", "String", "mediaType", ")", "throws", "SerializationException", "{", "checkNotNull", "(", "ty...
Retrieve Serializer from manager. @param type The type class of the serializer. @param <T> The type of the serializer. @return The serializer of the specified type. @throws SerializationException if no serializer was registered for the class.
[ "Retrieve", "Serializer", "from", "manager", "." ]
40163a75cd17815d5089935d0dd97b8d652ad6d4
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java#L190-L218
43,414
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DataTableConversionUtility.java
DataTableConversionUtility.loadData
private RecordList loadData(AbstractDataTable table, DataSchema schema) { RecordListBuilder recordListBuilder = new RecordListBuilder(RecordListBuilder.CompressionMode.CANONICAL, schema); // simple check to ensure schema and table definitions are aligned if(schema.size()!= table.getNumberOfColum...
java
private RecordList loadData(AbstractDataTable table, DataSchema schema) { RecordListBuilder recordListBuilder = new RecordListBuilder(RecordListBuilder.CompressionMode.CANONICAL, schema); // simple check to ensure schema and table definitions are aligned if(schema.size()!= table.getNumberOfColum...
[ "private", "RecordList", "loadData", "(", "AbstractDataTable", "table", ",", "DataSchema", "schema", ")", "{", "RecordListBuilder", "recordListBuilder", "=", "new", "RecordListBuilder", "(", "RecordListBuilder", ".", "CompressionMode", ".", "CANONICAL", ",", "schema", ...
Given a schema, attempts to load table into internal structure @param table the existing DataTable/DataView containing rows to load into RecordList
[ "Given", "a", "schema", "attempts", "to", "load", "table", "into", "internal", "structure" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DataTableConversionUtility.java#L58-L85
43,415
lightblue-platform/lightblue-client
http/src/main/java/com/redhat/lightblue/client/http/auth/SslSocketFactories.java
SslSocketFactories.createNaiveTrustManager
private static TrustManager createNaiveTrustManager() { return new X509TrustManager() { public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { } public void checkServerTrusted(X509Certificate[] chain, String authType) throws Ce...
java
private static TrustManager createNaiveTrustManager() { return new X509TrustManager() { public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { } public void checkServerTrusted(X509Certificate[] chain, String authType) throws Ce...
[ "private", "static", "TrustManager", "createNaiveTrustManager", "(", ")", "{", "return", "new", "X509TrustManager", "(", ")", "{", "public", "void", "checkClientTrusted", "(", "X509Certificate", "[", "]", "chain", ",", "String", "authType", ")", "throws", "Certifi...
Naive trust manager trusts all.
[ "Naive", "trust", "manager", "trusts", "all", "." ]
03790aff34e90d3889f60fd6c603c21a21dc1a40
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/http/src/main/java/com/redhat/lightblue/client/http/auth/SslSocketFactories.java#L137-L149
43,416
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/AbstractYuiSliderGwtWidgetWithLabelMarkers.java
AbstractYuiSliderGwtWidgetWithLabelMarkers.onLoad
@Override protected void onLoad() { mainAbsolutePanel.setSize( String.valueOf(yuiSliderGwtWidget.getOffsetWidth()), String.valueOf(yuiSliderGwtWidget.getOffsetHeight()) ); setupMarkerLabels(); }
java
@Override protected void onLoad() { mainAbsolutePanel.setSize( String.valueOf(yuiSliderGwtWidget.getOffsetWidth()), String.valueOf(yuiSliderGwtWidget.getOffsetHeight()) ); setupMarkerLabels(); }
[ "@", "Override", "protected", "void", "onLoad", "(", ")", "{", "mainAbsolutePanel", ".", "setSize", "(", "String", ".", "valueOf", "(", "yuiSliderGwtWidget", ".", "getOffsetWidth", "(", ")", ")", ",", "String", ".", "valueOf", "(", "yuiSliderGwtWidget", ".", ...
override onLoad to know when absolutePanel's size can be set
[ "override", "onLoad", "to", "know", "when", "absolutePanel", "s", "size", "can", "be", "set" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/AbstractYuiSliderGwtWidgetWithLabelMarkers.java#L67-L77
43,417
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgSaver.java
MsgSaver.urlCheckAndSave
public void urlCheckAndSave(BasicCheckInfo basicCheckInfo, ParamType paramType, ReqUrl reqUrl, Class<?> type) { if (!this.validationConfig.isFreshUrlSave() || !basicCheckInfo.isUrlMapping()) { return; } List<ValidationData> datas = this.validationDataRepository.findByParamTypeAndMet...
java
public void urlCheckAndSave(BasicCheckInfo basicCheckInfo, ParamType paramType, ReqUrl reqUrl, Class<?> type) { if (!this.validationConfig.isFreshUrlSave() || !basicCheckInfo.isUrlMapping()) { return; } List<ValidationData> datas = this.validationDataRepository.findByParamTypeAndMet...
[ "public", "void", "urlCheckAndSave", "(", "BasicCheckInfo", "basicCheckInfo", ",", "ParamType", "paramType", ",", "ReqUrl", "reqUrl", ",", "Class", "<", "?", ">", "type", ")", "{", "if", "(", "!", "this", ".", "validationConfig", ".", "isFreshUrlSave", "(", ...
Url check and save. @param basicCheckInfo the basic check info @param paramType the param type @param reqUrl the req url @param type the type
[ "Url", "check", "and", "save", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgSaver.java#L74-L85
43,418
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/MapBuilder.java
MapBuilder.configureMapDimension
public MapBuilder configureMapDimension(Integer width, Integer height) { this.mapHeight = height; this.mapWidth = width; return this; }
java
public MapBuilder configureMapDimension(Integer width, Integer height) { this.mapHeight = height; this.mapWidth = width; return this; }
[ "public", "MapBuilder", "configureMapDimension", "(", "Integer", "width", ",", "Integer", "height", ")", "{", "this", ".", "mapHeight", "=", "height", ";", "this", ".", "mapWidth", "=", "width", ";", "return", "this", ";", "}" ]
Setup map display properties @param width value in px @param height value in px
[ "Setup", "map", "display", "properties" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/MapBuilder.java#L100-L104
43,419
OpenCompare/OpenCompare
org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java
ImportMatrixLoader.detectTypes
protected void detectTypes(ImportMatrix matrix) { for (int row = 0; row < matrix.getNumberOfRows(); row++) { for (int column = 0; column < matrix.getNumberOfColumns(); column++) { ImportCell cell = matrix.getCell(row, column); if (cell != null && cell.getInterpretatio...
java
protected void detectTypes(ImportMatrix matrix) { for (int row = 0; row < matrix.getNumberOfRows(); row++) { for (int column = 0; column < matrix.getNumberOfColumns(); column++) { ImportCell cell = matrix.getCell(row, column); if (cell != null && cell.getInterpretatio...
[ "protected", "void", "detectTypes", "(", "ImportMatrix", "matrix", ")", "{", "for", "(", "int", "row", "=", "0", ";", "row", "<", "matrix", ".", "getNumberOfRows", "(", ")", ";", "row", "++", ")", "{", "for", "(", "int", "column", "=", "0", ";", "c...
Detect types of each cell of the matrix @param matrix matrix
[ "Detect", "types", "of", "each", "cell", "of", "the", "matrix" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java#L90-L101
43,420
OpenCompare/OpenCompare
org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java
ImportMatrixLoader.detectDirection
protected PCMDirection detectDirection(ImportMatrix matrix) { // Compute homogeneity of rows double sumHomogeneityOfRow = 0; for (int row = 0; row < matrix.getNumberOfRows(); row++) { Map<String, Integer> types = new HashMap<>(); // Retrieve types of values ...
java
protected PCMDirection detectDirection(ImportMatrix matrix) { // Compute homogeneity of rows double sumHomogeneityOfRow = 0; for (int row = 0; row < matrix.getNumberOfRows(); row++) { Map<String, Integer> types = new HashMap<>(); // Retrieve types of values ...
[ "protected", "PCMDirection", "detectDirection", "(", "ImportMatrix", "matrix", ")", "{", "// Compute homogeneity of rows", "double", "sumHomogeneityOfRow", "=", "0", ";", "for", "(", "int", "row", "=", "0", ";", "row", "<", "matrix", ".", "getNumberOfRows", "(", ...
Detect if products are represented by a line or a column @param matrix matrix @return direction of the matrix
[ "Detect", "if", "products", "are", "represented", "by", "a", "line", "or", "a", "column" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java#L108-L151
43,421
OpenCompare/OpenCompare
org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java
ImportMatrixLoader.detectFeatures
protected IONode<String> detectFeatures(ImportMatrix matrix, PCMContainer pcmContainer) { IONode<String> root = new IONode<>(null); List<IONode<String>> parents = new ArrayList<>(); // Init parents for (int column = 0; column < matrix.getNumberOfColumns(); column++) { paren...
java
protected IONode<String> detectFeatures(ImportMatrix matrix, PCMContainer pcmContainer) { IONode<String> root = new IONode<>(null); List<IONode<String>> parents = new ArrayList<>(); // Init parents for (int column = 0; column < matrix.getNumberOfColumns(); column++) { paren...
[ "protected", "IONode", "<", "String", ">", "detectFeatures", "(", "ImportMatrix", "matrix", ",", "PCMContainer", "pcmContainer", ")", "{", "IONode", "<", "String", ">", "root", "=", "new", "IONode", "<>", "(", "null", ")", ";", "List", "<", "IONode", "<", ...
Detect features from the information contained in the matrix and the provided direction @param matrix matrix @param pcmContainer PCM container @return graph representing the hierarchy of features
[ "Detect", "features", "from", "the", "information", "contained", "in", "the", "matrix", "and", "the", "provided", "direction" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java#L172-L235
43,422
OpenCompare/OpenCompare
org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java
ImportMatrixLoader.createProducts
protected void createProducts(ImportMatrix matrix, PCMContainer pcmContainer, Map<Integer, Feature> positionToFeature) { int featuresDepth = pcmContainer.getPcm().getFeaturesDepth(); for (int row = featuresDepth; row < matrix.getNumberOfRows(); row++) { Product product = factory.createProd...
java
protected void createProducts(ImportMatrix matrix, PCMContainer pcmContainer, Map<Integer, Feature> positionToFeature) { int featuresDepth = pcmContainer.getPcm().getFeaturesDepth(); for (int row = featuresDepth; row < matrix.getNumberOfRows(); row++) { Product product = factory.createProd...
[ "protected", "void", "createProducts", "(", "ImportMatrix", "matrix", ",", "PCMContainer", "pcmContainer", ",", "Map", "<", "Integer", ",", "Feature", ">", "positionToFeature", ")", "{", "int", "featuresDepth", "=", "pcmContainer", ".", "getPcm", "(", ")", ".", ...
Detect and create products from the information contained in the matrix and the provided direction @param matrix matrix @param pcmContainer PCM container @param positionToFeature map between positions and features
[ "Detect", "and", "create", "products", "from", "the", "information", "contained", "in", "the", "matrix", "and", "the", "provided", "direction" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java/src/main/java/org/opencompare/api/java/io/ImportMatrixLoader.java#L270-L298
43,423
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationHttpUtil.java
ValidationHttpUtil.readBody
public static String readBody(HttpServletRequest request) { BufferedReader input = null; try { input = new BufferedReader(new InputStreamReader(request.getInputStream())); StringBuilder builder = new StringBuilder(); String buffer; while ((buffer = input....
java
public static String readBody(HttpServletRequest request) { BufferedReader input = null; try { input = new BufferedReader(new InputStreamReader(request.getInputStream())); StringBuilder builder = new StringBuilder(); String buffer; while ((buffer = input....
[ "public", "static", "String", "readBody", "(", "HttpServletRequest", "request", ")", "{", "BufferedReader", "input", "=", "null", ";", "try", "{", "input", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "request", ".", "getInputStream", "(",...
Read body string. @param request the request @return the string
[ "Read", "body", "string", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationHttpUtil.java#L25-L43
43,424
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DataTableExtensions.java
DataTableExtensions.convertDataTable
private RecordList convertDataTable(AbstractDataTable table, DataSchema schema) { return dataTableConversionUtility.convertDataTableToRecordList(schema, table); }
java
private RecordList convertDataTable(AbstractDataTable table, DataSchema schema) { return dataTableConversionUtility.convertDataTableToRecordList(schema, table); }
[ "private", "RecordList", "convertDataTable", "(", "AbstractDataTable", "table", ",", "DataSchema", "schema", ")", "{", "return", "dataTableConversionUtility", ".", "convertDataTableToRecordList", "(", "schema", ",", "table", ")", ";", "}" ]
covert a gwtDatatable to an internal RecordList @param table @param schema @return
[ "covert", "a", "gwtDatatable", "to", "an", "internal", "RecordList" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DataTableExtensions.java#L122-L124
43,425
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DataTableExtensions.java
DataTableExtensions.calculateRowsToFilter
private List<Integer> calculateRowsToFilter(DataView dataView, FilterQuery filterQuery, DataSchema schema) { JsArray<JavaScriptObject> propertiesJsArray = convertToColumnIndexAndValueArray(filterQuery, schema); JsArrayInteger jsArrayInteger = getFilteredRows(dataView, propertiesJsArray); return ...
java
private List<Integer> calculateRowsToFilter(DataView dataView, FilterQuery filterQuery, DataSchema schema) { JsArray<JavaScriptObject> propertiesJsArray = convertToColumnIndexAndValueArray(filterQuery, schema); JsArrayInteger jsArrayInteger = getFilteredRows(dataView, propertiesJsArray); return ...
[ "private", "List", "<", "Integer", ">", "calculateRowsToFilter", "(", "DataView", "dataView", ",", "FilterQuery", "filterQuery", ",", "DataSchema", "schema", ")", "{", "JsArray", "<", "JavaScriptObject", ">", "propertiesJsArray", "=", "convertToColumnIndexAndValueArray"...
Calculate the row indexes for rows that match all of the given filters. Parses the filterQuery @param dataView @param filterQuery @param schema @return a list of rows to filter
[ "Calculate", "the", "row", "indexes", "for", "rows", "that", "match", "all", "of", "the", "given", "filters", ".", "Parses", "the", "filterQuery" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/DataTableExtensions.java#L134-L138
43,426
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getDefaultObjectMapper
public static ObjectMapper getDefaultObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true); mapper.configure(SerializationFe...
java
public static ObjectMapper getDefaultObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL, true); mapper.configure(SerializationFe...
[ "public", "static", "ObjectMapper", "getDefaultObjectMapper", "(", ")", "{", "ObjectMapper", "mapper", "=", "new", "ObjectMapper", "(", ")", ";", "mapper", ".", "configure", "(", "DeserializationFeature", ".", "FAIL_ON_UNKNOWN_PROPERTIES", ",", "false", ")", ";", ...
Gets default object mapper. @return the default object mapper
[ "Gets", "default", "object", "mapper", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L34-L45
43,427
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.isNumberObj
public static boolean isNumberObj(Object type) { try { Double.valueOf(type + ""); } catch (NumberFormatException e) { return false; } return true; }
java
public static boolean isNumberObj(Object type) { try { Double.valueOf(type + ""); } catch (NumberFormatException e) { return false; } return true; }
[ "public", "static", "boolean", "isNumberObj", "(", "Object", "type", ")", "{", "try", "{", "Double", ".", "valueOf", "(", "type", "+", "\"\"", ")", ";", "}", "catch", "(", "NumberFormatException", "e", ")", "{", "return", "false", ";", "}", "return", "...
Is number obj boolean. @param type the type @return the boolean
[ "Is", "number", "obj", "boolean", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L70-L77
43,428
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.isDoubleType
public static boolean isDoubleType(Class<?> type) { return (type.isPrimitive() && type == float.class) || (type.isPrimitive() && type == double.class) || (!type.isPrimitive() && type == Float.class) || (!type.isPrimitive() && type == Double.class); }
java
public static boolean isDoubleType(Class<?> type) { return (type.isPrimitive() && type == float.class) || (type.isPrimitive() && type == double.class) || (!type.isPrimitive() && type == Float.class) || (!type.isPrimitive() && type == Double.class); }
[ "public", "static", "boolean", "isDoubleType", "(", "Class", "<", "?", ">", "type", ")", "{", "return", "(", "type", ".", "isPrimitive", "(", ")", "&&", "type", "==", "float", ".", "class", ")", "||", "(", "type", ".", "isPrimitive", "(", ")", "&&", ...
Is double type boolean. @param type the type @return the boolean
[ "Is", "double", "type", "boolean", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L95-L98
43,429
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.isIntType
public static boolean isIntType(Class<?> type) { return (type.isPrimitive() && type == int.class) || (type.isPrimitive() && type == long.class) || (!type.isPrimitive() && type == Integer.class) || (!type.isPrimitive() && type == Long.class); }
java
public static boolean isIntType(Class<?> type) { return (type.isPrimitive() && type == int.class) || (type.isPrimitive() && type == long.class) || (!type.isPrimitive() && type == Integer.class) || (!type.isPrimitive() && type == Long.class); }
[ "public", "static", "boolean", "isIntType", "(", "Class", "<", "?", ">", "type", ")", "{", "return", "(", "type", ".", "isPrimitive", "(", ")", "&&", "type", "==", "int", ".", "class", ")", "||", "(", "type", ".", "isPrimitive", "(", ")", "&&", "ty...
Is int type boolean. @param type the type @return the boolean
[ "Is", "int", "type", "boolean", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L107-L110
43,430
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getSetterMethodNotCheckParamType
public static Method getSetterMethodNotCheckParamType(Class<?> cType, String fieldName) { String methodName = getMethodName(fieldName, SET_METHOD_PREFIX); Method[] methods = cType.getMethods(); for (Method m : methods) { if (m.getName().equals(methodName) && m.getParameterCount() == ...
java
public static Method getSetterMethodNotCheckParamType(Class<?> cType, String fieldName) { String methodName = getMethodName(fieldName, SET_METHOD_PREFIX); Method[] methods = cType.getMethods(); for (Method m : methods) { if (m.getName().equals(methodName) && m.getParameterCount() == ...
[ "public", "static", "Method", "getSetterMethodNotCheckParamType", "(", "Class", "<", "?", ">", "cType", ",", "String", "fieldName", ")", "{", "String", "methodName", "=", "getMethodName", "(", "fieldName", ",", "SET_METHOD_PREFIX", ")", ";", "Method", "[", "]", ...
Gets setter method not check param type. @param cType the c type @param fieldName the field name @return the setter method not check param type
[ "Gets", "setter", "method", "not", "check", "param", "type", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L141-L150
43,431
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getSetterMethod
public static Method getSetterMethod(Class<?> cType, String fieldName, Class<?> paramType) { Class<?> subType = getSubType(paramType); String methodName = getMethodName(fieldName, SET_METHOD_PREFIX); try { return cType.getMethod(methodName, paramType); } catch (NoSuchMethod...
java
public static Method getSetterMethod(Class<?> cType, String fieldName, Class<?> paramType) { Class<?> subType = getSubType(paramType); String methodName = getMethodName(fieldName, SET_METHOD_PREFIX); try { return cType.getMethod(methodName, paramType); } catch (NoSuchMethod...
[ "public", "static", "Method", "getSetterMethod", "(", "Class", "<", "?", ">", "cType", ",", "String", "fieldName", ",", "Class", "<", "?", ">", "paramType", ")", "{", "Class", "<", "?", ">", "subType", "=", "getSubType", "(", "paramType", ")", ";", "St...
Gets setter method. @param cType the c type @param fieldName the field name @param paramType the param type @return the setter method
[ "Gets", "setter", "method", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L160-L175
43,432
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getMethodName
public static String getMethodName(String name, String prefix) { return prefix + name.substring(0, 1).toUpperCase() + name.substring(1); }
java
public static String getMethodName(String name, String prefix) { return prefix + name.substring(0, 1).toUpperCase() + name.substring(1); }
[ "public", "static", "String", "getMethodName", "(", "String", "name", ",", "String", "prefix", ")", "{", "return", "prefix", "+", "name", ".", "substring", "(", "0", ",", "1", ")", ".", "toUpperCase", "(", ")", "+", "name", ".", "substring", "(", "1", ...
Gets method name. @param name the name @param prefix the prefix @return the method name
[ "Gets", "method", "name", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L184-L186
43,433
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getFieldNameFromMethod
public static String getFieldNameFromMethod(Method m) { String methodName = m.getName(); if (methodName.startsWith(GET_METHOD_PREFIX)) { methodName = methodName.replaceFirst(GET_METHOD_PREFIX, ""); } else if (methodName.startsWith(IS_METHOD_PREFIX)) { methodName = method...
java
public static String getFieldNameFromMethod(Method m) { String methodName = m.getName(); if (methodName.startsWith(GET_METHOD_PREFIX)) { methodName = methodName.replaceFirst(GET_METHOD_PREFIX, ""); } else if (methodName.startsWith(IS_METHOD_PREFIX)) { methodName = method...
[ "public", "static", "String", "getFieldNameFromMethod", "(", "Method", "m", ")", "{", "String", "methodName", "=", "m", ".", "getName", "(", ")", ";", "if", "(", "methodName", ".", "startsWith", "(", "GET_METHOD_PREFIX", ")", ")", "{", "methodName", "=", "...
Gets field name from method. @param m the m @return the field name from method
[ "Gets", "field", "name", "from", "method", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L194-L207
43,434
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getGetterMethod
public static Method getGetterMethod(Class<?> c, String field) { try { return c.getMethod(getMethodName(field, GET_METHOD_PREFIX), EMPTY_CLASS); } catch (NoSuchMethodException e) { try { return c.getMethod(getMethodName(field, IS_METHOD_PREFIX), EMPTY_CLASS); ...
java
public static Method getGetterMethod(Class<?> c, String field) { try { return c.getMethod(getMethodName(field, GET_METHOD_PREFIX), EMPTY_CLASS); } catch (NoSuchMethodException e) { try { return c.getMethod(getMethodName(field, IS_METHOD_PREFIX), EMPTY_CLASS); ...
[ "public", "static", "Method", "getGetterMethod", "(", "Class", "<", "?", ">", "c", ",", "String", "field", ")", "{", "try", "{", "return", "c", ".", "getMethod", "(", "getMethodName", "(", "field", ",", "GET_METHOD_PREFIX", ")", ",", "EMPTY_CLASS", ")", ...
Gets getter method. @param c the c @param field the field @return the getter method
[ "Gets", "getter", "method", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L216-L228
43,435
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getValue
public static Object getValue(Object obj, String field) { Method getter = getGetterMethod(obj.getClass(), field); try { return getter.invoke(obj); } catch (IllegalAccessException | InvocationTargetException e) { return null; } }
java
public static Object getValue(Object obj, String field) { Method getter = getGetterMethod(obj.getClass(), field); try { return getter.invoke(obj); } catch (IllegalAccessException | InvocationTargetException e) { return null; } }
[ "public", "static", "Object", "getValue", "(", "Object", "obj", ",", "String", "field", ")", "{", "Method", "getter", "=", "getGetterMethod", "(", "obj", ".", "getClass", "(", ")", ",", "field", ")", ";", "try", "{", "return", "getter", ".", "invoke", ...
Gets value. @param obj the obj @param field the field @return the value
[ "Gets", "value", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L237-L245
43,436
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.objDeepCopy
public static Object objDeepCopy(Object from, Object to, String... copyFields) { if (from == null || to == null) { log.error("object deep copy from or to is null "); return to; } for (String field : copyFields) { copyFromTo(from, to, field); } ...
java
public static Object objDeepCopy(Object from, Object to, String... copyFields) { if (from == null || to == null) { log.error("object deep copy from or to is null "); return to; } for (String field : copyFields) { copyFromTo(from, to, field); } ...
[ "public", "static", "Object", "objDeepCopy", "(", "Object", "from", ",", "Object", "to", ",", "String", "...", "copyFields", ")", "{", "if", "(", "from", "==", "null", "||", "to", "==", "null", ")", "{", "log", ".", "error", "(", "\"object deep copy from...
Obj deep copy object. @param from the from @param to the to @param copyFields the copy fields @return the object
[ "Obj", "deep", "copy", "object", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L338-L349
43,437
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.objectDeepCopyWithWhiteList
public static <T> T objectDeepCopyWithWhiteList(Object from, Object to, String... copyFields) { return (T) to.getClass().cast(objDeepCopy(from, to, copyFields)); }
java
public static <T> T objectDeepCopyWithWhiteList(Object from, Object to, String... copyFields) { return (T) to.getClass().cast(objDeepCopy(from, to, copyFields)); }
[ "public", "static", "<", "T", ">", "T", "objectDeepCopyWithWhiteList", "(", "Object", "from", ",", "Object", "to", ",", "String", "...", "copyFields", ")", "{", "return", "(", "T", ")", "to", ".", "getClass", "(", ")", ".", "cast", "(", "objDeepCopy", ...
Object deep copy with white list t. @param <T> the type parameter @param from the from @param to the to @param copyFields the copy fields @return the t
[ "Object", "deep", "copy", "with", "white", "list", "t", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L360-L362
43,438
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.isGetterMethod
public static boolean isGetterMethod(Method m) { String methodName = m.getName(); if (methodName.equals("getClass")) { return false; } if (!methodName.startsWith(GET_METHOD_PREFIX) && !methodName.startsWith(IS_METHOD_PREFIX)) { return false; } i...
java
public static boolean isGetterMethod(Method m) { String methodName = m.getName(); if (methodName.equals("getClass")) { return false; } if (!methodName.startsWith(GET_METHOD_PREFIX) && !methodName.startsWith(IS_METHOD_PREFIX)) { return false; } i...
[ "public", "static", "boolean", "isGetterMethod", "(", "Method", "m", ")", "{", "String", "methodName", "=", "m", ".", "getName", "(", ")", ";", "if", "(", "methodName", ".", "equals", "(", "\"getClass\"", ")", ")", "{", "return", "false", ";", "}", "if...
Is getter method boolean. @param m the m @return the boolean
[ "Is", "getter", "method", "boolean", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L370-L386
43,439
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getObjectSize
public static Double getObjectSize(Object value) { double v = 1; if (value instanceof String) { v = ((String) value).length(); if (v < 1) { return null; } } else if (value instanceof List) { v = ((List) value).size(); } el...
java
public static Double getObjectSize(Object value) { double v = 1; if (value instanceof String) { v = ((String) value).length(); if (v < 1) { return null; } } else if (value instanceof List) { v = ((List) value).size(); } el...
[ "public", "static", "Double", "getObjectSize", "(", "Object", "value", ")", "{", "double", "v", "=", "1", ";", "if", "(", "value", "instanceof", "String", ")", "{", "v", "=", "(", "(", "String", ")", "value", ")", ".", "length", "(", ")", ";", "if"...
Gets object size. @param value the value @return the object size
[ "Gets", "object", "size", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L481-L497
43,440
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getListInnerClassFromGenericType
public static Class<?> getListInnerClassFromGenericType(Type genericType) { ParameterizedType innerClass = (ParameterizedType) genericType; return (Class<?>) innerClass.getActualTypeArguments()[0]; }
java
public static Class<?> getListInnerClassFromGenericType(Type genericType) { ParameterizedType innerClass = (ParameterizedType) genericType; return (Class<?>) innerClass.getActualTypeArguments()[0]; }
[ "public", "static", "Class", "<", "?", ">", "getListInnerClassFromGenericType", "(", "Type", "genericType", ")", "{", "ParameterizedType", "innerClass", "=", "(", "ParameterizedType", ")", "genericType", ";", "return", "(", "Class", "<", "?", ">", ")", "innerCla...
Gets list inner class from generic type. @param genericType the generic type @return the list inner class from generic type
[ "Gets", "list", "inner", "class", "from", "generic", "type", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L505-L508
43,441
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.replaceCallback
public MsgChecker replaceCallback(BasicCheckRule type, ValidationInvalidCallback cb) { this.callbackMap.put(type.name(), cb); return this; }
java
public MsgChecker replaceCallback(BasicCheckRule type, ValidationInvalidCallback cb) { this.callbackMap.put(type.name(), cb); return this; }
[ "public", "MsgChecker", "replaceCallback", "(", "BasicCheckRule", "type", ",", "ValidationInvalidCallback", "cb", ")", "{", "this", ".", "callbackMap", ".", "put", "(", "type", ".", "name", "(", ")", ",", "cb", ")", ";", "return", "this", ";", "}" ]
Replace callback msg checker. @param type the type @param cb the cb @return the msg checker
[ "Replace", "callback", "msg", "checker", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L36-L39
43,442
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.checkPoint
public void checkPoint(ValidationData param, ValidationRule rule, Object bodyObj, Object standardValue) { //check Object value = param.getValue(bodyObj); BaseValidationCheck checker = this.validationRuleStore.getValidationChecker(rule); if ((value != null && standardValue != null) || rul...
java
public void checkPoint(ValidationData param, ValidationRule rule, Object bodyObj, Object standardValue) { //check Object value = param.getValue(bodyObj); BaseValidationCheck checker = this.validationRuleStore.getValidationChecker(rule); if ((value != null && standardValue != null) || rul...
[ "public", "void", "checkPoint", "(", "ValidationData", "param", ",", "ValidationRule", "rule", ",", "Object", "bodyObj", ",", "Object", "standardValue", ")", "{", "//check", "Object", "value", "=", "param", ".", "getValue", "(", "bodyObj", ")", ";", "BaseValid...
Check point. @param param the param @param rule the rule @param bodyObj the body obj @param standardValue the standard value
[ "Check", "point", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L59-L76
43,443
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.checkPointListChild
public void checkPointListChild(ValidationData param, ValidationRule rule, Object bodyObj, Object standardValue) { ValidationData listParent = param.findListParent(); List list = (List) listParent.getValue(bodyObj); if (list == null || list.isEmpty()) { return; } lis...
java
public void checkPointListChild(ValidationData param, ValidationRule rule, Object bodyObj, Object standardValue) { ValidationData listParent = param.findListParent(); List list = (List) listParent.getValue(bodyObj); if (list == null || list.isEmpty()) { return; } lis...
[ "public", "void", "checkPointListChild", "(", "ValidationData", "param", ",", "ValidationRule", "rule", ",", "Object", "bodyObj", ",", "Object", "standardValue", ")", "{", "ValidationData", "listParent", "=", "param", ".", "findListParent", "(", ")", ";", "List", ...
Check point list child. @param param the param @param rule the rule @param bodyObj the body obj @param standardValue the standard value
[ "Check", "point", "list", "child", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L86-L97
43,444
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.checkDataInnerRules
public void checkDataInnerRules(ValidationData data, Object bodyObj) { data.getValidationRules().stream().filter(vr -> vr.isUse()).forEach(rule -> { if (data.isListChild()) { this.checkPointListChild(data, rule, bodyObj, rule.getStandardValue()); } else { ...
java
public void checkDataInnerRules(ValidationData data, Object bodyObj) { data.getValidationRules().stream().filter(vr -> vr.isUse()).forEach(rule -> { if (data.isListChild()) { this.checkPointListChild(data, rule, bodyObj, rule.getStandardValue()); } else { ...
[ "public", "void", "checkDataInnerRules", "(", "ValidationData", "data", ",", "Object", "bodyObj", ")", "{", "data", ".", "getValidationRules", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "vr", "->", "vr", ".", "isUse", "(", ")", ")", ".", "f...
Check data inner rules. @param data the data @param bodyObj the body obj
[ "Check", "data", "inner", "rules", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L105-L113
43,445
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.checkRequest
public void checkRequest(BasicCheckInfo basicCheckInfo, Object bodyObj) { String key = basicCheckInfo.getUniqueKey(); List<ValidationData> checkData = this.validationStore.getValidationDatas(basicCheckInfo.getParamType(), key); if (checkData == null || checkData.isEmpty()) { return...
java
public void checkRequest(BasicCheckInfo basicCheckInfo, Object bodyObj) { String key = basicCheckInfo.getUniqueKey(); List<ValidationData> checkData = this.validationStore.getValidationDatas(basicCheckInfo.getParamType(), key); if (checkData == null || checkData.isEmpty()) { return...
[ "public", "void", "checkRequest", "(", "BasicCheckInfo", "basicCheckInfo", ",", "Object", "bodyObj", ")", "{", "String", "key", "=", "basicCheckInfo", ".", "getUniqueKey", "(", ")", ";", "List", "<", "ValidationData", ">", "checkData", "=", "this", ".", "valid...
Check request. @param basicCheckInfo the basic check info @param bodyObj the body obj
[ "Check", "request", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L121-L132
43,446
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.applyDefaultValues
private void applyDefaultValues(Map<String, Object> parameterValues) { for (Parameter<?> parameter : allParameters) { parameterValues.put(parameter.getName(), getParameterDefaultValue(parameter)); } }
java
private void applyDefaultValues(Map<String, Object> parameterValues) { for (Parameter<?> parameter : allParameters) { parameterValues.put(parameter.getName(), getParameterDefaultValue(parameter)); } }
[ "private", "void", "applyDefaultValues", "(", "Map", "<", "String", ",", "Object", ">", "parameterValues", ")", "{", "for", "(", "Parameter", "<", "?", ">", "parameter", ":", "allParameters", ")", "{", "parameterValues", ".", "put", "(", "parameter", ".", ...
Apply default values for all parameters. @param parameterValues Parameter values
[ "Apply", "default", "values", "for", "all", "parameters", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L120-L124
43,447
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.getParameterDefaultValue
private <T> T getParameterDefaultValue(Parameter<T> parameter) { String defaultOsgiConfigProperty = parameter.getDefaultOsgiConfigProperty(); if (StringUtils.isNotBlank(defaultOsgiConfigProperty)) { String[] parts = StringUtils.split(defaultOsgiConfigProperty, ":"); String className = parts[0]; ...
java
private <T> T getParameterDefaultValue(Parameter<T> parameter) { String defaultOsgiConfigProperty = parameter.getDefaultOsgiConfigProperty(); if (StringUtils.isNotBlank(defaultOsgiConfigProperty)) { String[] parts = StringUtils.split(defaultOsgiConfigProperty, ":"); String className = parts[0]; ...
[ "private", "<", "T", ">", "T", "getParameterDefaultValue", "(", "Parameter", "<", "T", ">", "parameter", ")", "{", "String", "defaultOsgiConfigProperty", "=", "parameter", ".", "getDefaultOsgiConfigProperty", "(", ")", ";", "if", "(", "StringUtils", ".", "isNotB...
Get default value for parameter - from OSGi configuration property or parameter definition itself. @param parameter Parameter definition @return Default value or null
[ "Get", "default", "value", "for", "parameter", "-", "from", "OSGi", "configuration", "property", "or", "parameter", "definition", "itself", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L131-L144
43,448
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.applyOverrideSystemDefault
private void applyOverrideSystemDefault(Map<String, Object> parameterValues) { for (Parameter<?> parameter : allParameters) { Object overrideValue = parameterOverride.getOverrideSystemDefault(parameter); if (overrideValue != null) { parameterValues.put(parameter.getName(), overrideValue); ...
java
private void applyOverrideSystemDefault(Map<String, Object> parameterValues) { for (Parameter<?> parameter : allParameters) { Object overrideValue = parameterOverride.getOverrideSystemDefault(parameter); if (overrideValue != null) { parameterValues.put(parameter.getName(), overrideValue); ...
[ "private", "void", "applyOverrideSystemDefault", "(", "Map", "<", "String", ",", "Object", ">", "parameterValues", ")", "{", "for", "(", "Parameter", "<", "?", ">", "parameter", ":", "allParameters", ")", "{", "Object", "overrideValue", "=", "parameterOverride",...
Apply system-wide overrides for default values. @param parameterValues Parameter values
[ "Apply", "system", "-", "wide", "overrides", "for", "default", "values", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L150-L157
43,449
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.ensureValidValueTypes
private Map<String, Object> ensureValidValueTypes(Map<String, Object> parameterValues) { Map<String, Object> transformedParameterValues = new HashMap<>(); for (Map.Entry<String, Object> entry : parameterValues.entrySet()) { if (entry.getKey() == null || entry.getValue() == null) { continue; ...
java
private Map<String, Object> ensureValidValueTypes(Map<String, Object> parameterValues) { Map<String, Object> transformedParameterValues = new HashMap<>(); for (Map.Entry<String, Object> entry : parameterValues.entrySet()) { if (entry.getKey() == null || entry.getValue() == null) { continue; ...
[ "private", "Map", "<", "String", ",", "Object", ">", "ensureValidValueTypes", "(", "Map", "<", "String", ",", "Object", ">", "parameterValues", ")", "{", "Map", "<", "String", ",", "Object", ">", "transformedParameterValues", "=", "new", "HashMap", "<>", "("...
Make sure value types match with declared parameter types. Values which types do not match, or for which no parameter definition exists are removed. Types are converted from persistence format if required. @return Cleaned up parameter values
[ "Make", "sure", "value", "types", "match", "with", "declared", "parameter", "types", ".", "Values", "which", "types", "do", "not", "match", "or", "for", "which", "no", "parameter", "definition", "exists", "are", "removed", ".", "Types", "are", "converted", "...
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L198-L219
43,450
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.applyOverrideForce
private SortedSet<String> applyOverrideForce(String configurationId, Map<String, Object> parameterValues, SortedSet<String> ancestorLockedParameterNames) { for (Parameter<?> parameter : allParameters) { Object overrideValue = parameterOverride.getOverrideForce(configurationId, parameter); if (over...
java
private SortedSet<String> applyOverrideForce(String configurationId, Map<String, Object> parameterValues, SortedSet<String> ancestorLockedParameterNames) { for (Parameter<?> parameter : allParameters) { Object overrideValue = parameterOverride.getOverrideForce(configurationId, parameter); if (over...
[ "private", "SortedSet", "<", "String", ">", "applyOverrideForce", "(", "String", "configurationId", ",", "Map", "<", "String", ",", "Object", ">", "parameterValues", ",", "SortedSet", "<", "String", ">", "ancestorLockedParameterNames", ")", "{", "for", "(", "Par...
Apply forced overrides for a configurationId. @param configurationId Configuration id @param parameterValues Parameter values @param ancestorLockedParameterNames Set of locked parameter names on the configuration levels above. @return Set of locked parameter names on this configuration level combined with the from the ...
[ "Apply", "forced", "overrides", "for", "a", "configurationId", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L228-L241
43,451
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.validateParameterProviders
private void validateParameterProviders() { Set<String> parameterNames = new HashSet<>(); for (ParameterProvider provider : this.parameterProviders) { Set<String> applicationIdsOfThisProvider = new HashSet<>(); for (Parameter<?> parameter : provider.getParameters()) { if (StringUtils.isNotEm...
java
private void validateParameterProviders() { Set<String> parameterNames = new HashSet<>(); for (ParameterProvider provider : this.parameterProviders) { Set<String> applicationIdsOfThisProvider = new HashSet<>(); for (Parameter<?> parameter : provider.getParameters()) { if (StringUtils.isNotEm...
[ "private", "void", "validateParameterProviders", "(", ")", "{", "Set", "<", "String", ">", "parameterNames", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "ParameterProvider", "provider", ":", "this", ".", "parameterProviders", ")", "{", "Set", "<"...
Validate that application ids and configuration names are unique over all providers.
[ "Validate", "that", "application", "ids", "and", "configuration", "names", "are", "unique", "over", "all", "providers", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L246-L266
43,452
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java
ParameterResolverImpl.mergeSets
private SortedSet<String> mergeSets(SortedSet<String> primary, Set<String> secondary) { SortedSet<String> result = primary; if (!secondary.isEmpty()) { result = new TreeSet<>(); result.addAll(primary); result.addAll(secondary); } return result; }
java
private SortedSet<String> mergeSets(SortedSet<String> primary, Set<String> secondary) { SortedSet<String> result = primary; if (!secondary.isEmpty()) { result = new TreeSet<>(); result.addAll(primary); result.addAll(secondary); } return result; }
[ "private", "SortedSet", "<", "String", ">", "mergeSets", "(", "SortedSet", "<", "String", ">", "primary", ",", "Set", "<", "String", ">", "secondary", ")", "{", "SortedSet", "<", "String", ">", "result", "=", "primary", ";", "if", "(", "!", "secondary", ...
Merge two sets. If secondary set is empty return primary. @param primary Primary set @param secondary Secondary set @return Merged set
[ "Merge", "two", "sets", ".", "If", "secondary", "set", "is", "empty", "return", "primary", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/ParameterResolverImpl.java#L274-L282
43,453
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.equalUrl
public boolean equalUrl(ReqUrl url) { return url.getMethod().equalsIgnoreCase(this.method) && url.getUrl().equalsIgnoreCase(this.url); }
java
public boolean equalUrl(ReqUrl url) { return url.getMethod().equalsIgnoreCase(this.method) && url.getUrl().equalsIgnoreCase(this.url); }
[ "public", "boolean", "equalUrl", "(", "ReqUrl", "url", ")", "{", "return", "url", ".", "getMethod", "(", ")", ".", "equalsIgnoreCase", "(", "this", ".", "method", ")", "&&", "url", ".", "getUrl", "(", ")", ".", "equalsIgnoreCase", "(", "this", ".", "ur...
Equal url boolean. @param url the url @return the boolean
[ "Equal", "url", "boolean", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L99-L101
43,454
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.replaceValue
public void replaceValue(Object bodyObj, Object replaceValue) { Object parentObj = bodyObj; if(this.listChild) { ValidationData rootListParent = this.findListParent(); if(this.deepLevel - rootListParent.deepLevel > 1 ){ parentObj = this.parent.getValue(bodyObj); ...
java
public void replaceValue(Object bodyObj, Object replaceValue) { Object parentObj = bodyObj; if(this.listChild) { ValidationData rootListParent = this.findListParent(); if(this.deepLevel - rootListParent.deepLevel > 1 ){ parentObj = this.parent.getValue(bodyObj); ...
[ "public", "void", "replaceValue", "(", "Object", "bodyObj", ",", "Object", "replaceValue", ")", "{", "Object", "parentObj", "=", "bodyObj", ";", "if", "(", "this", ".", "listChild", ")", "{", "ValidationData", "rootListParent", "=", "this", ".", "findListParen...
Replace value. @param bodyObj the body obj @param replaceValue the replace value
[ "Replace", "value", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L137-L153
43,455
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.updateKey
public ValidationData updateKey(DetailParam detailParam) { if (detailParam == null) { return this; } this.methodKey = detailParam.getMethodKey(); this.parameterKey = this.paramType.getUniqueKey(this.methodKey); this.urlMapping = detailParam.isUrlMapping(); re...
java
public ValidationData updateKey(DetailParam detailParam) { if (detailParam == null) { return this; } this.methodKey = detailParam.getMethodKey(); this.parameterKey = this.paramType.getUniqueKey(this.methodKey); this.urlMapping = detailParam.isUrlMapping(); re...
[ "public", "ValidationData", "updateKey", "(", "DetailParam", "detailParam", ")", "{", "if", "(", "detailParam", "==", "null", ")", "{", "return", "this", ";", "}", "this", ".", "methodKey", "=", "detailParam", ".", "getMethodKey", "(", ")", ";", "this", "....
Update key validation data. @param detailParam the detail param @return the validation data
[ "Update", "key", "validation", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L216-L225
43,456
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.diffKey
public boolean diffKey(DetailParam detailParam){ if (detailParam == null) { return false; } if(!detailParam.getMethodKey().equals(this.methodKey)){ return true; } return detailParam.isUrlMapping() != this.isUrlMapping(); }
java
public boolean diffKey(DetailParam detailParam){ if (detailParam == null) { return false; } if(!detailParam.getMethodKey().equals(this.methodKey)){ return true; } return detailParam.isUrlMapping() != this.isUrlMapping(); }
[ "public", "boolean", "diffKey", "(", "DetailParam", "detailParam", ")", "{", "if", "(", "detailParam", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "!", "detailParam", ".", "getMethodKey", "(", ")", ".", "equals", "(", "this", ".", "...
Diff key boolean. @param detailParam the detail param @return the boolean
[ "Diff", "key", "boolean", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L233-L243
43,457
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.updateField
public void updateField(Field field) { this.name = field.getName(); this.obj = TypeCheckUtil.isObjClass(field); this.list = TypeCheckUtil.isListClass(field); this.number = TypeCheckUtil.isNumberClass(field); this.enumType = field.getType().isEnum(); this.typeClass = field...
java
public void updateField(Field field) { this.name = field.getName(); this.obj = TypeCheckUtil.isObjClass(field); this.list = TypeCheckUtil.isListClass(field); this.number = TypeCheckUtil.isNumberClass(field); this.enumType = field.getType().isEnum(); this.typeClass = field...
[ "public", "void", "updateField", "(", "Field", "field", ")", "{", "this", ".", "name", "=", "field", ".", "getName", "(", ")", ";", "this", ".", "obj", "=", "TypeCheckUtil", ".", "isObjClass", "(", "field", ")", ";", "this", ".", "list", "=", "TypeCh...
Update field. @param field the field
[ "Update", "field", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L250-L263
43,458
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.minimalize
public ValidationData minimalize() { this.setValidationRules(this.validationRules.stream().filter(vr -> vr.isUse()).collect(Collectors.toList())); return this; }
java
public ValidationData minimalize() { this.setValidationRules(this.validationRules.stream().filter(vr -> vr.isUse()).collect(Collectors.toList())); return this; }
[ "public", "ValidationData", "minimalize", "(", ")", "{", "this", ".", "setValidationRules", "(", "this", ".", "validationRules", ".", "stream", "(", ")", ".", "filter", "(", "vr", "->", "vr", ".", "isUse", "(", ")", ")", ".", "collect", "(", "Collectors"...
Minimalize validation data. @return the validation data
[ "Minimalize", "validation", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L294-L297
43,459
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.ruleSync
public ValidationData ruleSync(List<ValidationRule> rules) { List<ValidationRule> ruleList = new ArrayList<>(); rules.forEach(rule -> { ValidationRule existRule = this.getExistRule(rule); ruleList.add(existRule != null ? existRule : rule); }); this.validationRul...
java
public ValidationData ruleSync(List<ValidationRule> rules) { List<ValidationRule> ruleList = new ArrayList<>(); rules.forEach(rule -> { ValidationRule existRule = this.getExistRule(rule); ruleList.add(existRule != null ? existRule : rule); }); this.validationRul...
[ "public", "ValidationData", "ruleSync", "(", "List", "<", "ValidationRule", ">", "rules", ")", "{", "List", "<", "ValidationRule", ">", "ruleList", "=", "new", "ArrayList", "<>", "(", ")", ";", "rules", ".", "forEach", "(", "rule", "->", "{", "ValidationRu...
Rule sync validation data. @param rules the rules @return the validation data
[ "Rule", "sync", "validation", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L313-L328
43,460
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ValidationData.java
ValidationData.findListParent
public ValidationData findListParent() { if (!this.listChild) { return null; } ValidationData parent = this.parent; while (parent != null && !parent.isList()) { parent = parent.parent; } return parent; }
java
public ValidationData findListParent() { if (!this.listChild) { return null; } ValidationData parent = this.parent; while (parent != null && !parent.isList()) { parent = parent.parent; } return parent; }
[ "public", "ValidationData", "findListParent", "(", ")", "{", "if", "(", "!", "this", ".", "listChild", ")", "{", "return", "null", ";", "}", "ValidationData", "parent", "=", "this", ".", "parent", ";", "while", "(", "parent", "!=", "null", "&&", "!", "...
Find list parent validation data. @return the validation data
[ "Find", "list", "parent", "validation", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ValidationData.java#L335-L345
43,461
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/RecordList.java
RecordList.getUniqueRecordsBy
public RecordList getUniqueRecordsBy(String fieldName) { Set<String> uniqueKeys = new HashSet<String>(); final RecordListBuilder uniqueRecordListBuilder = new RecordListBuilder(schema); for (int rowIndex = 0; rowIndex < this.size(); rowIndex++) { final Record currentRecord = this.rec...
java
public RecordList getUniqueRecordsBy(String fieldName) { Set<String> uniqueKeys = new HashSet<String>(); final RecordListBuilder uniqueRecordListBuilder = new RecordListBuilder(schema); for (int rowIndex = 0; rowIndex < this.size(); rowIndex++) { final Record currentRecord = this.rec...
[ "public", "RecordList", "getUniqueRecordsBy", "(", "String", "fieldName", ")", "{", "Set", "<", "String", ">", "uniqueKeys", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "final", "RecordListBuilder", "uniqueRecordListBuilder", "=", "new", "RecordLis...
Picks the first available record by given fieldName @param fieldName the unique field value @return
[ "Picks", "the", "first", "available", "record", "by", "given", "fieldName" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/RecordList.java#L82-L94
43,462
OpenCompare/OpenCompare
org.opencompare/pcmdata-importers/src/main/java/pcm_Filter/mutate/Main.java
Main.main
public static void main(String[] args) throws IOException { // TODO : le pcm mutate est bien différent du pcm de base, mais les changements ne sont pas pris en compte. A travailler ! // inputpath = args[0]; inputpath = "off_output/pcms/test_paget/input"; outputpath = "off_output/pcms/test_paget/output"; ...
java
public static void main(String[] args) throws IOException { // TODO : le pcm mutate est bien différent du pcm de base, mais les changements ne sont pas pris en compte. A travailler ! // inputpath = args[0]; inputpath = "off_output/pcms/test_paget/input"; outputpath = "off_output/pcms/test_paget/output"; ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "IOException", "{", "// TODO : le pcm mutate est bien différent du pcm de base, mais les changements ne sont pas pris en compte. A travailler !", "// inputpath = args[0];", "inputpath", "=", "\"off_...
give path with argv
[ "give", "path", "with", "argv" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/pcm_Filter/mutate/Main.java#L27-L100
43,463
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/excel/PoiWorkBook.java
PoiWorkBook.writeFile
public void writeFile(String fn, HttpServletResponse res) { ValidationFileUtil.initFileSendHeader(res, ValidationFileUtil.getEncodingFileName(fn + ".xls"), null); try { this.workBook.write(res.getOutputStream()); } catch (IOException e) { throw new ValidationLibExceptio...
java
public void writeFile(String fn, HttpServletResponse res) { ValidationFileUtil.initFileSendHeader(res, ValidationFileUtil.getEncodingFileName(fn + ".xls"), null); try { this.workBook.write(res.getOutputStream()); } catch (IOException e) { throw new ValidationLibExceptio...
[ "public", "void", "writeFile", "(", "String", "fn", ",", "HttpServletResponse", "res", ")", "{", "ValidationFileUtil", ".", "initFileSendHeader", "(", "res", ",", "ValidationFileUtil", ".", "getEncodingFileName", "(", "fn", "+", "\".xls\"", ")", ",", "null", ")"...
Write file. @param fn the fn @param res the res
[ "Write", "file", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/excel/PoiWorkBook.java#L62-L71
43,464
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/mvp/view/filter/FilterViewUI.java
FilterViewUI.onSelectFilter
@EventHandler public void onSelectFilter(SelectFilterEvent selectFilterEvent){ for (FacetWidget facetWidget : filterList) { if(facetWidget.getFacetField().equals(selectFilterEvent.getFilterName())){ for (FacetWidgetItem facetWidgetItem : facetWidget.getFacetWidgetItems()) { ...
java
@EventHandler public void onSelectFilter(SelectFilterEvent selectFilterEvent){ for (FacetWidget facetWidget : filterList) { if(facetWidget.getFacetField().equals(selectFilterEvent.getFilterName())){ for (FacetWidgetItem facetWidgetItem : facetWidget.getFacetWidgetItems()) { ...
[ "@", "EventHandler", "public", "void", "onSelectFilter", "(", "SelectFilterEvent", "selectFilterEvent", ")", "{", "for", "(", "FacetWidget", "facetWidget", ":", "filterList", ")", "{", "if", "(", "facetWidget", ".", "getFacetField", "(", ")", ".", "equals", "(",...
When a SelectFilterEvent is triggered, this method will look for the filter and value and will select it.
[ "When", "a", "SelectFilterEvent", "is", "triggered", "this", "method", "will", "look", "for", "the", "filter", "and", "value", "and", "will", "select", "it", "." ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/mvp/view/filter/FilterViewUI.java#L414-L426
43,465
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/MapMarkerBuilder.java
MapMarkerBuilder.createMarker
public <T> GenericMarker<T> createMarker(T markerContext, GenericMapWidget mapWidget) { this.map = mapWidget; validateRequiredParameters(); if(map instanceof GoogleV3MapWidget){ return new GoogleV3Marker<T>(this, markerContext); } if(map instanceof OfflineMapWidget){ ...
java
public <T> GenericMarker<T> createMarker(T markerContext, GenericMapWidget mapWidget) { this.map = mapWidget; validateRequiredParameters(); if(map instanceof GoogleV3MapWidget){ return new GoogleV3Marker<T>(this, markerContext); } if(map instanceof OfflineMapWidget){ ...
[ "public", "<", "T", ">", "GenericMarker", "<", "T", ">", "createMarker", "(", "T", "markerContext", ",", "GenericMapWidget", "mapWidget", ")", "{", "this", ".", "map", "=", "mapWidget", ";", "validateRequiredParameters", "(", ")", ";", "if", "(", "map", "i...
Final build method of the builder, called once all parameters are setup for the Generic Marker @param markerContext the marker context is intended to hold a reference to the record set backing the marker, this used later in pop up panel and hover label construction to aid the client in building relevant markup from th...
[ "Final", "build", "method", "of", "the", "builder", "called", "once", "all", "parameters", "are", "setup", "for", "the", "Generic", "Marker" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/MapMarkerBuilder.java#L101-L111
43,466
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/impl/AdaptableUtil.java
AdaptableUtil.getResource
public static Resource getResource(Object adaptable) { if (adaptable instanceof Resource) { return (Resource)adaptable; } else if (adaptable instanceof SlingHttpServletRequest) { SlingHttpServletRequest request = (SlingHttpServletRequest)adaptable; return request.getResource(); } r...
java
public static Resource getResource(Object adaptable) { if (adaptable instanceof Resource) { return (Resource)adaptable; } else if (adaptable instanceof SlingHttpServletRequest) { SlingHttpServletRequest request = (SlingHttpServletRequest)adaptable; return request.getResource(); } r...
[ "public", "static", "Resource", "getResource", "(", "Object", "adaptable", ")", "{", "if", "(", "adaptable", "instanceof", "Resource", ")", "{", "return", "(", "Resource", ")", "adaptable", ";", "}", "else", "if", "(", "adaptable", "instanceof", "SlingHttpServ...
Tries to get the resource associated with the adaptable. @param adaptable Adaptable @return Resource or null
[ "Tries", "to", "get", "the", "resource", "associated", "with", "the", "adaptable", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/impl/AdaptableUtil.java#L39-L48
43,467
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwisterFast.java
MersenneTwisterFast.readState
public void readState(DataInputStream stream) throws IOException { int len = mt.length; for(int x=0;x<len;x++) mt[x] = stream.readInt(); len = mag01.length; for(int x=0;x<len;x++) mag01[x] = stream.readInt(); mti = stream.readInt(); __nextNextGau...
java
public void readState(DataInputStream stream) throws IOException { int len = mt.length; for(int x=0;x<len;x++) mt[x] = stream.readInt(); len = mag01.length; for(int x=0;x<len;x++) mag01[x] = stream.readInt(); mti = stream.readInt(); __nextNextGau...
[ "public", "void", "readState", "(", "DataInputStream", "stream", ")", "throws", "IOException", "{", "int", "len", "=", "mt", ".", "length", ";", "for", "(", "int", "x", "=", "0", ";", "x", "<", "len", ";", "x", "++", ")", "mt", "[", "x", "]", "="...
Reads the entire state of the MersenneTwister RNG from the stream @param stream @throws IOException
[ "Reads", "the", "entire", "state", "of", "the", "MersenneTwister", "RNG", "from", "the", "stream" ]
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwisterFast.java#L215-L226
43,468
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwisterFast.java
MersenneTwisterFast.writeState
public void writeState(DataOutputStream stream) throws IOException { int len = mt.length; for(int x=0;x<len;x++) stream.writeInt(mt[x]); len = mag01.length; for(int x=0;x<len;x++) stream.writeInt(mag01[x]); stream.writeInt(mti); stream.writeDoubl...
java
public void writeState(DataOutputStream stream) throws IOException { int len = mt.length; for(int x=0;x<len;x++) stream.writeInt(mt[x]); len = mag01.length; for(int x=0;x<len;x++) stream.writeInt(mag01[x]); stream.writeInt(mti); stream.writeDoubl...
[ "public", "void", "writeState", "(", "DataOutputStream", "stream", ")", "throws", "IOException", "{", "int", "len", "=", "mt", ".", "length", ";", "for", "(", "int", "x", "=", "0", ";", "x", "<", "len", ";", "x", "++", ")", "stream", ".", "writeInt",...
Writes the entire state of the MersenneTwister RNG to the stream @param stream @throws IOException
[ "Writes", "the", "entire", "state", "of", "the", "MersenneTwister", "RNG", "to", "the", "stream" ]
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwisterFast.java#L231-L242
43,469
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwisterFast.java
MersenneTwisterFast.setSeed
synchronized public void setSeed(final int[] array) { if (array.length == 0) throw new IllegalArgumentException("Array length must be greater than zero"); int i, j, k; setSeed(19650218); i=1; j=0; k = (N>array.length ? N : array.length); for (; k!=0; k...
java
synchronized public void setSeed(final int[] array) { if (array.length == 0) throw new IllegalArgumentException("Array length must be greater than zero"); int i, j, k; setSeed(19650218); i=1; j=0; k = (N>array.length ? N : array.length); for (; k!=0; k...
[ "synchronized", "public", "void", "setSeed", "(", "final", "int", "[", "]", "array", ")", "{", "if", "(", "array", ".", "length", "==", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"Array length must be greater than zero\"", ")", ";", "int", "i...
Sets the seed of the MersenneTwister using an array of integers. Your array must have a non-zero length. Only the first 624 integers in the array are used; if the array is shorter than this then integers are repeatedly used in a wrap-around fashion. @param array
[ "Sets", "the", "seed", "of", "the", "MersenneTwister", "using", "an", "array", "of", "integers", ".", "Your", "array", "must", "have", "a", "non", "-", "zero", "length", ".", "Only", "the", "first", "624", "integers", "in", "the", "array", "are", "used",...
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwisterFast.java#L316-L344
43,470
OpenCompare/OpenCompare
org.opencompare/pcmdata-importers/src/main/java/data_omdb/TexttoFile.java
Lireetecrire.lire
public void lire() { try { String adressedufichier = System.getProperty("user.dir") + "\\monfichier.txt"; FileReader fr = new FileReader(adressedufichier); BufferedReader br = new BufferedReader(fr); String texte = ""; int a = 0; while(a<2) //petite boucle 2 fois { text...
java
public void lire() { try { String adressedufichier = System.getProperty("user.dir") + "\\monfichier.txt"; FileReader fr = new FileReader(adressedufichier); BufferedReader br = new BufferedReader(fr); String texte = ""; int a = 0; while(a<2) //petite boucle 2 fois { text...
[ "public", "void", "lire", "(", ")", "{", "try", "{", "String", "adressedufichier", "=", "System", ".", "getProperty", "(", "\"user.dir\"", ")", "+", "\"\\\\monfichier.txt\"", ";", "FileReader", "fr", "=", "new", "FileReader", "(", "adressedufichier", ")", ";",...
je vais moins commenter cette partie c'est presque la meme chose
[ "je", "vais", "moins", "commenter", "cette", "partie", "c", "est", "presque", "la", "meme", "chose" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/data_omdb/TexttoFile.java#L73-L106
43,471
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/util/SerializationUtil.java
SerializationUtil.deserialize
public <T> T deserialize(Class<T> clazz, String stringContainingSerialisedInput) { T instance; try { instance = storageSerializer.deserialize(clazz, stringContainingSerialisedInput); } catch (SerializationException e) { throw new IllegalStateException("unable to serialise...
java
public <T> T deserialize(Class<T> clazz, String stringContainingSerialisedInput) { T instance; try { instance = storageSerializer.deserialize(clazz, stringContainingSerialisedInput); } catch (SerializationException e) { throw new IllegalStateException("unable to serialise...
[ "public", "<", "T", ">", "T", "deserialize", "(", "Class", "<", "T", ">", "clazz", ",", "String", "stringContainingSerialisedInput", ")", "{", "T", "instance", ";", "try", "{", "instance", "=", "storageSerializer", ".", "deserialize", "(", "clazz", ",", "s...
Returns an object from a serialised string @param clazz Class.name value @param stringContainingSerialisedInput @param <T> @return
[ "Returns", "an", "object", "from", "a", "serialised", "string" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/util/SerializationUtil.java#L65-L73
43,472
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/ClientSideSearchDataProvider.java
ClientSideSearchDataProvider.parseQuery
private BitSet parseQuery(FilterQuery filterQuery, DataSchema schema) { BitSet queryBitSet = new BitSet(); if(filterQuery instanceof MatchAllQuery || filterQuery.getFilterQueries().size() < 1) return queryBitSet; //facet drill down happens here for (String filterField : filterQuery.getF...
java
private BitSet parseQuery(FilterQuery filterQuery, DataSchema schema) { BitSet queryBitSet = new BitSet(); if(filterQuery instanceof MatchAllQuery || filterQuery.getFilterQueries().size() < 1) return queryBitSet; //facet drill down happens here for (String filterField : filterQuery.getF...
[ "private", "BitSet", "parseQuery", "(", "FilterQuery", "filterQuery", ",", "DataSchema", "schema", ")", "{", "BitSet", "queryBitSet", "=", "new", "BitSet", "(", ")", ";", "if", "(", "filterQuery", "instanceof", "MatchAllQuery", "||", "filterQuery", ".", "getFilt...
Calculates which documents are available given the current FilterQuery selection @param filterQuery @param schema @return a restrictedBitSetOfDocumentsAvailableAfterQuery document order is preserved
[ "Calculates", "which", "documents", "are", "available", "given", "the", "current", "FilterQuery", "selection" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/ClientSideSearchDataProvider.java#L578-L627
43,473
lightblue-platform/lightblue-client
core/src/main/java/com/redhat/lightblue/client/response/DefaultLightblueDataResponse.java
DefaultLightblueDataResponse.getResultMetadata
@Override public ResultMetadata[] getResultMetadata() throws LightblueParseException { JsonNode node=getJson().get("resultMetadata"); if(node instanceof ArrayNode) { try { return getMapper().readValue(node.traverse(),ResultMetadata[].class); } catch (IOExcepti...
java
@Override public ResultMetadata[] getResultMetadata() throws LightblueParseException { JsonNode node=getJson().get("resultMetadata"); if(node instanceof ArrayNode) { try { return getMapper().readValue(node.traverse(),ResultMetadata[].class); } catch (IOExcepti...
[ "@", "Override", "public", "ResultMetadata", "[", "]", "getResultMetadata", "(", ")", "throws", "LightblueParseException", "{", "JsonNode", "node", "=", "getJson", "(", ")", ".", "get", "(", "\"resultMetadata\"", ")", ";", "if", "(", "node", "instanceof", "Arr...
Returns a result metadata array where each element corresponds to the metadata for the result at the same index in processed array.
[ "Returns", "a", "result", "metadata", "array", "where", "each", "element", "corresponds", "to", "the", "metadata", "for", "the", "result", "at", "the", "same", "index", "in", "processed", "array", "." ]
03790aff34e90d3889f60fd6c603c21a21dc1a40
https://github.com/lightblue-platform/lightblue-client/blob/03790aff34e90d3889f60fd6c603c21a21dc1a40/core/src/main/java/com/redhat/lightblue/client/response/DefaultLightblueDataResponse.java#L60-L72
43,474
OpenCompare/OpenCompare
org.opencompare/api-java-impl/src/main/java/org/opencompare/api/java/impl/PCMImpl.java
PCMImpl.diffFeatures
private Map<Feature, Feature> diffFeatures(List<Feature> pcm1Features, List<Feature> pcm2Features, PCMElementComparator comparator, DiffResult result) { List<Feature> commonFeatures = new ArrayList<Feature>(); List<Feature> featuresOnlyInPCM1 = new ArrayList<Feature>(); List<Feature> featuresOnl...
java
private Map<Feature, Feature> diffFeatures(List<Feature> pcm1Features, List<Feature> pcm2Features, PCMElementComparator comparator, DiffResult result) { List<Feature> commonFeatures = new ArrayList<Feature>(); List<Feature> featuresOnlyInPCM1 = new ArrayList<Feature>(); List<Feature> featuresOnl...
[ "private", "Map", "<", "Feature", ",", "Feature", ">", "diffFeatures", "(", "List", "<", "Feature", ">", "pcm1Features", ",", "List", "<", "Feature", ">", "pcm2Features", ",", "PCMElementComparator", "comparator", ",", "DiffResult", "result", ")", "{", "List",...
Compare the features of two PCMs @param pcm1Features @param pcm2Features @param comparator @param result @return equivalent features
[ "Compare", "the", "features", "of", "two", "PCMs" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java-impl/src/main/java/org/opencompare/api/java/impl/PCMImpl.java#L383-L412
43,475
OpenCompare/OpenCompare
org.opencompare/api-java-impl/src/main/java/org/opencompare/api/java/impl/PCMImpl.java
PCMImpl.diffProducts
private Map<Product, Product> diffProducts(List<Product> pcm1Products, List<Product> pcm2Products, PCMElementComparator comparator, DiffResult result) { List<Product> commonProducts = new ArrayList<Product>(); List<Product> productsOnlyInPCM1 = new ArrayList<Product>(); List<Product> productsOnl...
java
private Map<Product, Product> diffProducts(List<Product> pcm1Products, List<Product> pcm2Products, PCMElementComparator comparator, DiffResult result) { List<Product> commonProducts = new ArrayList<Product>(); List<Product> productsOnlyInPCM1 = new ArrayList<Product>(); List<Product> productsOnl...
[ "private", "Map", "<", "Product", ",", "Product", ">", "diffProducts", "(", "List", "<", "Product", ">", "pcm1Products", ",", "List", "<", "Product", ">", "pcm2Products", ",", "PCMElementComparator", "comparator", ",", "DiffResult", "result", ")", "{", "List",...
Compare the products of two PCMs @param pcm1Products @param pcm2Products @param comparator @param result @return equivalent products
[ "Compare", "the", "products", "of", "two", "PCMs" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java-impl/src/main/java/org/opencompare/api/java/impl/PCMImpl.java#L422-L454
43,476
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/PersistenceTypeConversion.java
PersistenceTypeConversion.toPersistenceType
public static Object toPersistenceType(Object value, Class<?> parameterType) { if (!isTypeConversionRequired(parameterType)) { return value; } if (Map.class.isAssignableFrom(parameterType) && (value instanceof Map)) { Map<?, ?> map = (Map<?, ?>)value; Map.Entry<?, ?>[] entries = Iterators....
java
public static Object toPersistenceType(Object value, Class<?> parameterType) { if (!isTypeConversionRequired(parameterType)) { return value; } if (Map.class.isAssignableFrom(parameterType) && (value instanceof Map)) { Map<?, ?> map = (Map<?, ?>)value; Map.Entry<?, ?>[] entries = Iterators....
[ "public", "static", "Object", "toPersistenceType", "(", "Object", "value", ",", "Class", "<", "?", ">", "parameterType", ")", "{", "if", "(", "!", "isTypeConversionRequired", "(", "parameterType", ")", ")", "{", "return", "value", ";", "}", "if", "(", "Map...
Convert object to be persisted. @param value Configured value @param parameterType Parameter type @return value that can be persisted
[ "Convert", "object", "to", "be", "persisted", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/PersistenceTypeConversion.java#L63-L80
43,477
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/PersistenceTypeConversion.java
PersistenceTypeConversion.fromPersistenceType
public static Object fromPersistenceType(Object value, Class<?> parameterType) { if (!isTypeConversionRequired(parameterType)) { return value; } if (Map.class.isAssignableFrom(parameterType) && (value instanceof String[])) { String[] rows = (String[])value; Map<String, String> map = new Li...
java
public static Object fromPersistenceType(Object value, Class<?> parameterType) { if (!isTypeConversionRequired(parameterType)) { return value; } if (Map.class.isAssignableFrom(parameterType) && (value instanceof String[])) { String[] rows = (String[])value; Map<String, String> map = new Li...
[ "public", "static", "Object", "fromPersistenceType", "(", "Object", "value", ",", "Class", "<", "?", ">", "parameterType", ")", "{", "if", "(", "!", "isTypeConversionRequired", "(", "parameterType", ")", ")", "{", "return", "value", ";", "}", "if", "(", "M...
Convert object from persistence to be used in configuration. @param value Persisted value @param parameterType Parameter type @return Configured value
[ "Convert", "object", "from", "persistence", "to", "be", "used", "in", "configuration", "." ]
9a03d72a4314163a171c7ef815fb6a1eba181828
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/PersistenceTypeConversion.java#L88-L106
43,478
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java
FilterQuery.addFilter
public void addFilter(String field, String valueToFilter){ if(StringUtils.isEmpty(field) || StringUtils.isEmpty(valueToFilter)){ throw new IllegalArgumentException("Expected all attributes to be non empty"); } Set<String> valuesToFilter = new HashSet<String>(); valuesToFilter...
java
public void addFilter(String field, String valueToFilter){ if(StringUtils.isEmpty(field) || StringUtils.isEmpty(valueToFilter)){ throw new IllegalArgumentException("Expected all attributes to be non empty"); } Set<String> valuesToFilter = new HashSet<String>(); valuesToFilter...
[ "public", "void", "addFilter", "(", "String", "field", ",", "String", "valueToFilter", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "field", ")", "||", "StringUtils", ".", "isEmpty", "(", "valueToFilter", ")", ")", "{", "throw", "new", "Illegal...
add a filter to the to build FilterQuery instance @param field @param valueToFilter
[ "add", "a", "filter", "to", "the", "to", "build", "FilterQuery", "instance" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java#L91-L98
43,479
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java
FilterQuery.addMultipleValuesFilter
public void addMultipleValuesFilter(String field, Set<String> valueToFilter){ if(!valueToFilter.isEmpty()){ filterQueries.put(field, new FilterFieldValue(field, valueToFilter)); } }
java
public void addMultipleValuesFilter(String field, Set<String> valueToFilter){ if(!valueToFilter.isEmpty()){ filterQueries.put(field, new FilterFieldValue(field, valueToFilter)); } }
[ "public", "void", "addMultipleValuesFilter", "(", "String", "field", ",", "Set", "<", "String", ">", "valueToFilter", ")", "{", "if", "(", "!", "valueToFilter", ".", "isEmpty", "(", ")", ")", "{", "filterQueries", ".", "put", "(", "field", ",", "new", "F...
add a filter with multiple values to build FilterQuery instance @param field @param valueToFilter
[ "add", "a", "filter", "with", "multiple", "values", "to", "build", "FilterQuery", "instance" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FilterQuery.java#L105-L109
43,480
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwister.java
MersenneTwister.nextLong
public long nextLong(final long n) { if (n<=0) throw new IllegalArgumentException("n must be > 0"); long bits, val; do { bits = (nextLong() >>> 1); val = bits % n; } while(bits - val + (n-1) < 0); ret...
java
public long nextLong(final long n) { if (n<=0) throw new IllegalArgumentException("n must be > 0"); long bits, val; do { bits = (nextLong() >>> 1); val = bits % n; } while(bits - val + (n-1) < 0); ret...
[ "public", "long", "nextLong", "(", "final", "long", "n", ")", "{", "if", "(", "n", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"n must be > 0\"", ")", ";", "long", "bits", ",", "val", ";", "do", "{", "bits", "=", "(", "nextLong",...
This method is for completness' sake. Returns a long drawn uniformly from 0 to n-1. Suffice it to say, n must be > 0, or an IllegalArgumentException is raised. @param n @return ?
[ "This", "method", "is", "for", "completness", "sake", ".", "Returns", "a", "long", "drawn", "uniformly", "from", "0", "to", "n", "-", "1", ".", "Suffice", "it", "to", "say", "n", "must", "be", ">", "0", "or", "an", "IllegalArgumentException", "is", "ra...
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/utilities/random/MersenneTwister.java#L470-L483
43,481
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FieldInvertedIndex.java
FieldInvertedIndex.addDocument
public void addDocument(String... fields){ for (int i = 0; i < fields.length; i++) { final DataType type = schema.getType(i); String field = fields[i]; final Map<String, Set<Integer>> stringSetMap = this.fields.get(i); if(type == DataType.DateYear){ // reformat fi...
java
public void addDocument(String... fields){ for (int i = 0; i < fields.length; i++) { final DataType type = schema.getType(i); String field = fields[i]; final Map<String, Set<Integer>> stringSetMap = this.fields.get(i); if(type == DataType.DateYear){ // reformat fi...
[ "public", "void", "addDocument", "(", "String", "...", "fields", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fields", ".", "length", ";", "i", "++", ")", "{", "final", "DataType", "type", "=", "schema", ".", "getType", "(", "i", "...
add fields on index
[ "add", "fields", "on", "index" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/client/core/FieldInvertedIndex.java#L78-L94
43,482
OpenCompare/OpenCompare
org.opencompare/pcmdata-importers/src/main/java/misc/hints/MyPCMPrinter.java
MyPCMPrinter.print
public void print(PCM pcm) { // We start by listing the names of the products System.out.println("--- Products ---"); for (Product product : pcm.getProducts()) { System.out.println(product.getKeyContent()); } // Then, we use a visitor to print the content of the cel...
java
public void print(PCM pcm) { // We start by listing the names of the products System.out.println("--- Products ---"); for (Product product : pcm.getProducts()) { System.out.println(product.getKeyContent()); } // Then, we use a visitor to print the content of the cel...
[ "public", "void", "print", "(", "PCM", "pcm", ")", "{", "// We start by listing the names of the products", "System", ".", "out", ".", "println", "(", "\"--- Products ---\"", ")", ";", "for", "(", "Product", "product", ":", "pcm", ".", "getProducts", "(", ")", ...
Print some information contained in a PCM @param pcm: PCM to print
[ "Print", "some", "information", "contained", "in", "a", "PCM" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/misc/hints/MyPCMPrinter.java#L20-L32
43,483
OpenCompare/OpenCompare
org.opencompare/pcmdata-importers/src/main/java/misc/hints/MyPCMPrinter.java
MyPCMPrinter.visit
@Override public void visit(PCM pcm) { for (Product product : pcm.getProducts()) { product.accept(this); } }
java
@Override public void visit(PCM pcm) { for (Product product : pcm.getProducts()) { product.accept(this); } }
[ "@", "Override", "public", "void", "visit", "(", "PCM", "pcm", ")", "{", "for", "(", "Product", "product", ":", "pcm", ".", "getProducts", "(", ")", ")", "{", "product", ".", "accept", "(", "this", ")", ";", "}", "}" ]
Methods for the visitor
[ "Methods", "for", "the", "visitor" ]
6cd776466b375cb8ecca08fcd94e573d65e20b14
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/misc/hints/MyPCMPrinter.java#L37-L42
43,484
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/domain/ReqUrl.java
ReqUrl.getSheetName
public String getSheetName(int idx) { String name = method + "|" + url.replace("/", "|"); if (name.length() > 30) { return name.substring(0, 29) + idx; } return name; }
java
public String getSheetName(int idx) { String name = method + "|" + url.replace("/", "|"); if (name.length() > 30) { return name.substring(0, 29) + idx; } return name; }
[ "public", "String", "getSheetName", "(", "int", "idx", ")", "{", "String", "name", "=", "method", "+", "\"|\"", "+", "url", ".", "replace", "(", "\"/\"", ",", "\"|\"", ")", ";", "if", "(", "name", ".", "length", "(", ")", ">", "30", ")", "{", "re...
Gets sheet name. @param idx the idx @return the sheet name
[ "Gets", "sheet", "name", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/domain/ReqUrl.java#L70-L76
43,485
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
SurveyorCore/src/main/java/org/wwarn/surveyor/server/core/LuceneSearchServiceImpl.java
LuceneSearchServiceImpl.setupIndexMonitor
private void setupIndexMonitor(final DataSchema dataSchema, final GenericDataSource dataSource) { logger.log(FINE,"LuceneSearchServiceImpl::setupIndexMonitor Attempting to setup Index monitor..."); try { if(GoogleAppEngineUtil.isGaeEnv()){ return; // only use for pure lucene...
java
private void setupIndexMonitor(final DataSchema dataSchema, final GenericDataSource dataSource) { logger.log(FINE,"LuceneSearchServiceImpl::setupIndexMonitor Attempting to setup Index monitor..."); try { if(GoogleAppEngineUtil.isGaeEnv()){ return; // only use for pure lucene...
[ "private", "void", "setupIndexMonitor", "(", "final", "DataSchema", "dataSchema", ",", "final", "GenericDataSource", "dataSource", ")", "{", "logger", ".", "log", "(", "FINE", ",", "\"LuceneSearchServiceImpl::setupIndexMonitor Attempting to setup Index monitor...\"", ")", "...
setup a monitor to watch for changes in datasource @param dataSchema @param dataSource
[ "setup", "a", "monitor", "to", "watch", "for", "changes", "in", "datasource" ]
224280bcd6e8045bda6b673584caf0aea5e4c841
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/SurveyorCore/src/main/java/org/wwarn/surveyor/server/core/LuceneSearchServiceImpl.java#L120-L158
43,486
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationReqUrlUtil.java
ValidationReqUrlUtil.getUrlListFromValidationDatas
public static List<ReqUrl> getUrlListFromValidationDatas(List<ValidationData> datas) { Map<String, ReqUrl> urlMap = new HashMap<>(); datas.stream().forEach(data -> { ReqUrl url = new ReqUrl(data); urlMap.put(url.getUniqueKey(), url); }); return urlMap.entrySet()....
java
public static List<ReqUrl> getUrlListFromValidationDatas(List<ValidationData> datas) { Map<String, ReqUrl> urlMap = new HashMap<>(); datas.stream().forEach(data -> { ReqUrl url = new ReqUrl(data); urlMap.put(url.getUniqueKey(), url); }); return urlMap.entrySet()....
[ "public", "static", "List", "<", "ReqUrl", ">", "getUrlListFromValidationDatas", "(", "List", "<", "ValidationData", ">", "datas", ")", "{", "Map", "<", "String", ",", "ReqUrl", ">", "urlMap", "=", "new", "HashMap", "<>", "(", ")", ";", "datas", ".", "st...
Gets url list from validation datas. @param datas the datas @return the url list from validation datas
[ "Gets", "url", "list", "from", "validation", "datas", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationReqUrlUtil.java#L22-L30
43,487
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/intset/ConciseSet.java
ConciseSet.appendLiteral
private void appendLiteral(int word) { // when we have a zero sequence of the maximum lenght (that is, // 00.00000.1111111111111111111111111 = 0x01FFFFFF), it could happen // that we try to append a zero literal because the result of the given operation must be an // empty set. Whitout the follow...
java
private void appendLiteral(int word) { // when we have a zero sequence of the maximum lenght (that is, // 00.00000.1111111111111111111111111 = 0x01FFFFFF), it could happen // that we try to append a zero literal because the result of the given operation must be an // empty set. Whitout the follow...
[ "private", "void", "appendLiteral", "(", "int", "word", ")", "{", "// when we have a zero sequence of the maximum lenght (that is,\r", "// 00.00000.1111111111111111111111111 = 0x01FFFFFF), it could happen\r", "// that we try to append a zero literal because the result of the given operation must...
Append a literal word after the last word @param word the new literal word. Note that the leftmost bit <b>must</b> be set to 1.
[ "Append", "a", "literal", "word", "after", "the", "last", "word" ]
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/intset/ConciseSet.java#L809-L852
43,488
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/index/util/ValidationIndexUtil.java
ValidationIndexUtil.addIndexData
public static void addIndexData(ValidationData data, ValidationDataIndex index) { String key = index.getKey(data); List<ValidationData> datas = index.get(key); if (datas == null) { datas = new ArrayList<>(); } datas.add(data); index.getMap().put(key, datas); ...
java
public static void addIndexData(ValidationData data, ValidationDataIndex index) { String key = index.getKey(data); List<ValidationData> datas = index.get(key); if (datas == null) { datas = new ArrayList<>(); } datas.add(data); index.getMap().put(key, datas); ...
[ "public", "static", "void", "addIndexData", "(", "ValidationData", "data", ",", "ValidationDataIndex", "index", ")", "{", "String", "key", "=", "index", ".", "getKey", "(", "data", ")", ";", "List", "<", "ValidationData", ">", "datas", "=", "index", ".", "...
Add index data. @param data the data @param index the index
[ "Add", "index", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/index/util/ValidationIndexUtil.java#L21-L29
43,489
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/index/util/ValidationIndexUtil.java
ValidationIndexUtil.removeIndexData
public static void removeIndexData(ValidationData data, ValidationDataIndex index) { String key = index.getKey(data); List<ValidationData> datas = index.get(key); if (!datas.isEmpty()) { datas = datas.stream().filter(d -> !d.getId().equals(data.getId())).collect(Collectors.toList()...
java
public static void removeIndexData(ValidationData data, ValidationDataIndex index) { String key = index.getKey(data); List<ValidationData> datas = index.get(key); if (!datas.isEmpty()) { datas = datas.stream().filter(d -> !d.getId().equals(data.getId())).collect(Collectors.toList()...
[ "public", "static", "void", "removeIndexData", "(", "ValidationData", "data", ",", "ValidationDataIndex", "index", ")", "{", "String", "key", "=", "index", ".", "getKey", "(", "data", ")", ";", "List", "<", "ValidationData", ">", "datas", "=", "index", ".", ...
Remove index data. @param data the data @param index the index
[ "Remove", "index", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/index/util/ValidationIndexUtil.java#L37-L50
43,490
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/index/util/ValidationIndexUtil.java
ValidationIndexUtil.makeKey
public static String makeKey(String... keys) { StringBuffer keyBuffer = new StringBuffer(); for (String s : keys) { keyBuffer.append(s); keyBuffer.append(":"); } return keyBuffer.toString(); }
java
public static String makeKey(String... keys) { StringBuffer keyBuffer = new StringBuffer(); for (String s : keys) { keyBuffer.append(s); keyBuffer.append(":"); } return keyBuffer.toString(); }
[ "public", "static", "String", "makeKey", "(", "String", "...", "keys", ")", "{", "StringBuffer", "keyBuffer", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "String", "s", ":", "keys", ")", "{", "keyBuffer", ".", "append", "(", "s", ")", ";", ...
Make key string. @param keys the keys @return the string
[ "Make", "key", "string", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/index/util/ValidationIndexUtil.java#L58-L65
43,491
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ParameterMapper.java
ParameterMapper.findMethod
public static Method findMethod(Class<?> c, String methodName) { for (Method m : c.getMethods()) { if (!m.getName().equalsIgnoreCase(methodName)) { continue; } if (m.getParameterCount() != 1) { continue; } return m; ...
java
public static Method findMethod(Class<?> c, String methodName) { for (Method m : c.getMethods()) { if (!m.getName().equalsIgnoreCase(methodName)) { continue; } if (m.getParameterCount() != 1) { continue; } return m; ...
[ "public", "static", "Method", "findMethod", "(", "Class", "<", "?", ">", "c", ",", "String", "methodName", ")", "{", "for", "(", "Method", "m", ":", "c", ".", "getMethods", "(", ")", ")", "{", "if", "(", "!", "m", ".", "getName", "(", ")", ".", ...
Find method method. @param c the c @param methodName the method name @return the method
[ "Find", "method", "method", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ParameterMapper.java#L92-L104
43,492
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ParameterMapper.java
ParameterMapper.castValue
@SuppressWarnings("PMD.LooseCoupling") public static Object castValue(Method m, Class<?> castType, String value) { try { if (castType.isEnum()) { Method valueOf; try { valueOf = castType.getMethod("valueOf", String.class); ...
java
@SuppressWarnings("PMD.LooseCoupling") public static Object castValue(Method m, Class<?> castType, String value) { try { if (castType.isEnum()) { Method valueOf; try { valueOf = castType.getMethod("valueOf", String.class); ...
[ "@", "SuppressWarnings", "(", "\"PMD.LooseCoupling\"", ")", "public", "static", "Object", "castValue", "(", "Method", "m", ",", "Class", "<", "?", ">", "castType", ",", "String", "value", ")", "{", "try", "{", "if", "(", "castType", ".", "isEnum", "(", "...
Cast value object. @param m the m @param castType the cast type @param value the value @return the object
[ "Cast", "value", "object", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ParameterMapper.java#L114-L157
43,493
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ParameterMapper.java
ParameterMapper.mapToObject
public static Object mapToObject(Map<String, String> map, Class<?> c) { Method m = null; Object obj = null; try { obj = c.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.info("instance create fail : " + c.getName()); ...
java
public static Object mapToObject(Map<String, String> map, Class<?> c) { Method m = null; Object obj = null; try { obj = c.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.info("instance create fail : " + c.getName()); ...
[ "public", "static", "Object", "mapToObject", "(", "Map", "<", "String", ",", "String", ">", "map", ",", "Class", "<", "?", ">", "c", ")", "{", "Method", "m", "=", "null", ";", "Object", "obj", "=", "null", ";", "try", "{", "obj", "=", "c", ".", ...
Map to object object. @param map the map @param c the c @return the object
[ "Map", "to", "object", "object", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ParameterMapper.java#L167-L206
43,494
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findByIds
public List<ValidationData> findByIds(List<Long> ids) { return this.datas.stream().filter(d -> ids.contains(d.getId())).collect(Collectors.toList()); }
java
public List<ValidationData> findByIds(List<Long> ids) { return this.datas.stream().filter(d -> ids.contains(d.getId())).collect(Collectors.toList()); }
[ "public", "List", "<", "ValidationData", ">", "findByIds", "(", "List", "<", "Long", ">", "ids", ")", "{", "return", "this", ".", "datas", ".", "stream", "(", ")", ".", "filter", "(", "d", "->", "ids", ".", "contains", "(", "d", ".", "getId", "(", ...
Find by ids list. @param ids the ids @return the list
[ "Find", "by", "ids", "list", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L90-L92
43,495
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findAll
public List<ValidationData> findAll(boolean referenceCache) { if (referenceCache && this.datas != null) { return this.datas; } List<ValidationData> list = null; File repositroyFile = new File(this.validationConfig.getRepositoryPath()); try { String jsonS...
java
public List<ValidationData> findAll(boolean referenceCache) { if (referenceCache && this.datas != null) { return this.datas; } List<ValidationData> list = null; File repositroyFile = new File(this.validationConfig.getRepositoryPath()); try { String jsonS...
[ "public", "List", "<", "ValidationData", ">", "findAll", "(", "boolean", "referenceCache", ")", "{", "if", "(", "referenceCache", "&&", "this", ".", "datas", "!=", "null", ")", "{", "return", "this", ".", "datas", ";", "}", "List", "<", "ValidationData", ...
Find all list. @param referenceCache the reference cache @return the list
[ "Find", "all", "list", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L119-L142
43,496
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findByParamTypeAndMethodAndUrl
public List<ValidationData> findByParamTypeAndMethodAndUrl(ParamType paramType, String method, String url) { return this.findByMethodAndUrl(method, url).stream().filter(d -> d.getParamType().equals(paramType)).collect(Collectors.toList()); }
java
public List<ValidationData> findByParamTypeAndMethodAndUrl(ParamType paramType, String method, String url) { return this.findByMethodAndUrl(method, url).stream().filter(d -> d.getParamType().equals(paramType)).collect(Collectors.toList()); }
[ "public", "List", "<", "ValidationData", ">", "findByParamTypeAndMethodAndUrl", "(", "ParamType", "paramType", ",", "String", "method", ",", "String", "url", ")", "{", "return", "this", ".", "findByMethodAndUrl", "(", "method", ",", "url", ")", ".", "stream", ...
Find by param type and method and url list. @param paramType the param type @param method the method @param url the url @return the list
[ "Find", "by", "param", "type", "and", "method", "and", "url", "list", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L170-L172
43,497
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findByParamTypeAndMethodAndUrlAndName
public List<ValidationData> findByParamTypeAndMethodAndUrlAndName(ParamType paramType, String method, String url, String name) { return this.findByMethodAndUrlAndName(method, url, name).stream().filter(vd -> vd.getParamType().equals(paramType)).collect(Collectors.toList()); }
java
public List<ValidationData> findByParamTypeAndMethodAndUrlAndName(ParamType paramType, String method, String url, String name) { return this.findByMethodAndUrlAndName(method, url, name).stream().filter(vd -> vd.getParamType().equals(paramType)).collect(Collectors.toList()); }
[ "public", "List", "<", "ValidationData", ">", "findByParamTypeAndMethodAndUrlAndName", "(", "ParamType", "paramType", ",", "String", "method", ",", "String", "url", ",", "String", "name", ")", "{", "return", "this", ".", "findByMethodAndUrlAndName", "(", "method", ...
Find by param type and method and url and name list. @param paramType the param type @param method the method @param url the url @param name the name @return the list
[ "Find", "by", "param", "type", "and", "method", "and", "url", "and", "name", "list", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L183-L185
43,498
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findByParamTypeAndMethodAndUrlAndNameAndParentId
public ValidationData findByParamTypeAndMethodAndUrlAndNameAndParentId(ParamType paramType, String method, String url, String name, Long parentId) { if (parentId == null) { return this.findByParamTypeAndMethodAndUrlAndName(paramType, method, url, name).stream().filter(d -> d.getParentId() == null).f...
java
public ValidationData findByParamTypeAndMethodAndUrlAndNameAndParentId(ParamType paramType, String method, String url, String name, Long parentId) { if (parentId == null) { return this.findByParamTypeAndMethodAndUrlAndName(paramType, method, url, name).stream().filter(d -> d.getParentId() == null).f...
[ "public", "ValidationData", "findByParamTypeAndMethodAndUrlAndNameAndParentId", "(", "ParamType", "paramType", ",", "String", "method", ",", "String", "url", ",", "String", "name", ",", "Long", "parentId", ")", "{", "if", "(", "parentId", "==", "null", ")", "{", ...
Find by param type and method and url and name and parent id validation data. @param paramType the param type @param method the method @param url the url @param name the name @param parentId the parent id @return the validation data
[ "Find", "by", "param", "type", "and", "method", "and", "url", "and", "name", "and", "parent", "id", "validation", "data", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L197-L204
43,499
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findByMethodAndUrlAndName
public List<ValidationData> findByMethodAndUrlAndName(String method, String url, String name) { return this.findByMethodAndUrl(method, url).stream().filter(d -> d.getName().equalsIgnoreCase(name)).collect(Collectors.toList()); }
java
public List<ValidationData> findByMethodAndUrlAndName(String method, String url, String name) { return this.findByMethodAndUrl(method, url).stream().filter(d -> d.getName().equalsIgnoreCase(name)).collect(Collectors.toList()); }
[ "public", "List", "<", "ValidationData", ">", "findByMethodAndUrlAndName", "(", "String", "method", ",", "String", "url", ",", "String", "name", ")", "{", "return", "this", ".", "findByMethodAndUrl", "(", "method", ",", "url", ")", ".", "stream", "(", ")", ...
Find by method and url and name list. @param method the method @param url the url @param name the name @return the list
[ "Find", "by", "method", "and", "url", "and", "name", "list", "." ]
2c2b1a87a88485d49ea6afa34acdf16ef4134f19
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L214-L216