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
160,300
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/feature/EventFeatureImpl.java
EventFeatureImpl.detectWSAddressingFeature
private boolean detectWSAddressingFeature(InterceptorProvider provider, Bus bus) { //detect on the bus level if (bus.getFeatures() != null) { Iterator<Feature> busFeatures = bus.getFeatures().iterator(); while (busFeatures.hasNext()) { Feature busFeature = busFeat...
java
private boolean detectWSAddressingFeature(InterceptorProvider provider, Bus bus) { //detect on the bus level if (bus.getFeatures() != null) { Iterator<Feature> busFeatures = bus.getFeatures().iterator(); while (busFeatures.hasNext()) { Feature busFeature = busFeat...
[ "private", "boolean", "detectWSAddressingFeature", "(", "InterceptorProvider", "provider", ",", "Bus", "bus", ")", "{", "//detect on the bus level", "if", "(", "bus", ".", "getFeatures", "(", ")", "!=", "null", ")", "{", "Iterator", "<", "Feature", ">", "busFeat...
detect if WS Addressing feature already enabled. @param provider the interceptor provider @param bus the bus @return true, if successful
[ "detect", "if", "WS", "Addressing", "feature", "already", "enabled", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/feature/EventFeatureImpl.java#L181-L203
160,301
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/feature/EventFeatureImpl.java
EventFeatureImpl.addWSAddressingInterceptors
private void addWSAddressingInterceptors(InterceptorProvider provider) { MAPAggregator mapAggregator = new MAPAggregator(); MAPCodec mapCodec = new MAPCodec(); provider.getInInterceptors().add(mapAggregator); provider.getInInterceptors().add(mapCodec); provider.getOutIntercepto...
java
private void addWSAddressingInterceptors(InterceptorProvider provider) { MAPAggregator mapAggregator = new MAPAggregator(); MAPCodec mapCodec = new MAPCodec(); provider.getInInterceptors().add(mapAggregator); provider.getInInterceptors().add(mapCodec); provider.getOutIntercepto...
[ "private", "void", "addWSAddressingInterceptors", "(", "InterceptorProvider", "provider", ")", "{", "MAPAggregator", "mapAggregator", "=", "new", "MAPAggregator", "(", ")", ";", "MAPCodec", "mapCodec", "=", "new", "MAPCodec", "(", ")", ";", "provider", ".", "getIn...
Add WSAddressing Interceptors to InterceptorProvider, in order to using AddressingProperties to get MessageID. @param provider the interceptor provider
[ "Add", "WSAddressing", "Interceptors", "to", "InterceptorProvider", "in", "order", "to", "using", "AddressingProperties", "to", "get", "MessageID", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/feature/EventFeatureImpl.java#L211-L226
160,302
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdSoapCodec.java
FlowIdSoapCodec.readFlowId
public static String readFlowId(Message message) { if (!(message instanceof SoapMessage)) { return null; } String flowId = null; Header hdFlowId = ((SoapMessage)message).getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { if (hdFlowId.getObject() instanceof ...
java
public static String readFlowId(Message message) { if (!(message instanceof SoapMessage)) { return null; } String flowId = null; Header hdFlowId = ((SoapMessage)message).getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { if (hdFlowId.getObject() instanceof ...
[ "public", "static", "String", "readFlowId", "(", "Message", "message", ")", "{", "if", "(", "!", "(", "message", "instanceof", "SoapMessage", ")", ")", "{", "return", "null", ";", "}", "String", "flowId", "=", "null", ";", "Header", "hdFlowId", "=", "(",...
Read flow id. @param message the message @return flow id from the message
[ "Read", "flow", "id", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdSoapCodec.java#L55-L73
160,303
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdSoapCodec.java
FlowIdSoapCodec.writeFlowId
public static void writeFlowId(Message message, String flowId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage)message; Header hdFlowId = soapMessage.getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { LOG.warning(...
java
public static void writeFlowId(Message message, String flowId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage)message; Header hdFlowId = soapMessage.getHeader(FLOW_ID_QNAME); if (hdFlowId != null) { LOG.warning(...
[ "public", "static", "void", "writeFlowId", "(", "Message", "message", ",", "String", "flowId", ")", "{", "if", "(", "!", "(", "message", "instanceof", "SoapMessage", ")", ")", "{", "return", ";", "}", "SoapMessage", "soapMessage", "=", "(", "SoapMessage", ...
Write flow id to message. @param message the message @param flowId the flow id
[ "Write", "flow", "id", "to", "message", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdSoapCodec.java#L81-L102
160,304
Talend/tesb-rt-se
security-common/src/main/java/org/talend/esb/security/saml/STSClientUtils.java
STSClientUtils.createSTSX509Client
public static STSClient createSTSX509Client(Bus bus, Map<String, String> stsProps) { final STSClient stsClient = createClient(bus, stsProps); stsClient.setWsdlLocation(stsProps.get(STS_X509_WSDL_LOCATION)); stsClient.setEndpointQName(new QName(stsProps.get(STS_NAMESPACE), stsProps.get(STS_X...
java
public static STSClient createSTSX509Client(Bus bus, Map<String, String> stsProps) { final STSClient stsClient = createClient(bus, stsProps); stsClient.setWsdlLocation(stsProps.get(STS_X509_WSDL_LOCATION)); stsClient.setEndpointQName(new QName(stsProps.get(STS_NAMESPACE), stsProps.get(STS_X...
[ "public", "static", "STSClient", "createSTSX509Client", "(", "Bus", "bus", ",", "Map", "<", "String", ",", "String", ">", "stsProps", ")", "{", "final", "STSClient", "stsClient", "=", "createClient", "(", "bus", ",", "stsProps", ")", ";", "stsClient", ".", ...
for bpm connector
[ "for", "bpm", "connector" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/security-common/src/main/java/org/talend/esb/security/saml/STSClientUtils.java#L70-L77
160,305
Talend/tesb-rt-se
locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/SingleBusLocatorRegistrar.java
SingleBusLocatorRegistrar.isSecuredByPolicy
private boolean isSecuredByPolicy(Server server) { boolean isSecured = false; EndpointInfo ei = server.getEndpoint().getEndpointInfo(); PolicyEngine pe = bus.getExtension(PolicyEngine.class); if (null == pe) { LOG.finest("No Policy engine found"); return isSecur...
java
private boolean isSecuredByPolicy(Server server) { boolean isSecured = false; EndpointInfo ei = server.getEndpoint().getEndpointInfo(); PolicyEngine pe = bus.getExtension(PolicyEngine.class); if (null == pe) { LOG.finest("No Policy engine found"); return isSecur...
[ "private", "boolean", "isSecuredByPolicy", "(", "Server", "server", ")", "{", "boolean", "isSecured", "=", "false", ";", "EndpointInfo", "ei", "=", "server", ".", "getEndpoint", "(", ")", ".", "getEndpointInfo", "(", ")", ";", "PolicyEngine", "pe", "=", "bus...
Is the transport secured by a policy
[ "Is", "the", "transport", "secured", "by", "a", "policy" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/SingleBusLocatorRegistrar.java#L247-L288
160,306
Talend/tesb-rt-se
locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/SingleBusLocatorRegistrar.java
SingleBusLocatorRegistrar.isSecuredByProperty
private boolean isSecuredByProperty(Server server) { boolean isSecured = false; Object value = server.getEndpoint().get("org.talend.tesb.endpoint.secured"); //Property name TBD if (value instanceof String) { try { isSecured = Boolean.valueOf((String) value); ...
java
private boolean isSecuredByProperty(Server server) { boolean isSecured = false; Object value = server.getEndpoint().get("org.talend.tesb.endpoint.secured"); //Property name TBD if (value instanceof String) { try { isSecured = Boolean.valueOf((String) value); ...
[ "private", "boolean", "isSecuredByProperty", "(", "Server", "server", ")", "{", "boolean", "isSecured", "=", "false", ";", "Object", "value", "=", "server", ".", "getEndpoint", "(", ")", ".", "get", "(", "\"org.talend.tesb.endpoint.secured\"", ")", ";", "//Prope...
Is the transport secured by a JAX-WS property
[ "Is", "the", "transport", "secured", "by", "a", "JAX", "-", "WS", "property" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/SingleBusLocatorRegistrar.java#L293-L305
160,307
Talend/tesb-rt-se
sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/EventRepositoryImpl.java
EventRepositoryImpl.writeCustomInfo
private void writeCustomInfo(Event event) { // insert customInfo (key/value) into DB for (Map.Entry<String, String> customInfo : event.getCustomInfo().entrySet()) { long cust_id = dbDialect.getIncrementer().nextLongValue(); getJdbcTemplate() .update("insert into E...
java
private void writeCustomInfo(Event event) { // insert customInfo (key/value) into DB for (Map.Entry<String, String> customInfo : event.getCustomInfo().entrySet()) { long cust_id = dbDialect.getIncrementer().nextLongValue(); getJdbcTemplate() .update("insert into E...
[ "private", "void", "writeCustomInfo", "(", "Event", "event", ")", "{", "// insert customInfo (key/value) into DB", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "customInfo", ":", "event", ".", "getCustomInfo", "(", ")", ".", "entrySet", ...
write CustomInfo list into table. @param event the event
[ "write", "CustomInfo", "list", "into", "table", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/EventRepositoryImpl.java#L115-L124
160,308
Talend/tesb-rt-se
sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/EventRepositoryImpl.java
EventRepositoryImpl.readCustomInfo
private Map<String, String> readCustomInfo(long eventId) { List<Map<String, Object>> rows = getJdbcTemplate() .queryForList("select * from EVENTS_CUSTOMINFO where EVENT_ID=" + eventId); Map<String, String> customInfo = new HashMap<String, String>(rows.size()); for (Map<String, Object...
java
private Map<String, String> readCustomInfo(long eventId) { List<Map<String, Object>> rows = getJdbcTemplate() .queryForList("select * from EVENTS_CUSTOMINFO where EVENT_ID=" + eventId); Map<String, String> customInfo = new HashMap<String, String>(rows.size()); for (Map<String, Object...
[ "private", "Map", "<", "String", ",", "String", ">", "readCustomInfo", "(", "long", "eventId", ")", "{", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "rows", "=", "getJdbcTemplate", "(", ")", ".", "queryForList", "(", "\"select * from EVENTS...
read CustomInfo list from table. @param eventId the event id @return the map
[ "read", "CustomInfo", "list", "from", "table", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/EventRepositoryImpl.java#L132-L140
160,309
Talend/tesb-rt-se
sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/criterias/PatternCriteria.java
PatternCriteria.toSQLPattern
private String toSQLPattern(String attribute) { String pattern = attribute.replace("*", "%"); if (!pattern.startsWith("%")) { pattern = "%" + pattern; } if (!pattern.endsWith("%")) { pattern = pattern.concat("%"); } return pattern; }
java
private String toSQLPattern(String attribute) { String pattern = attribute.replace("*", "%"); if (!pattern.startsWith("%")) { pattern = "%" + pattern; } if (!pattern.endsWith("%")) { pattern = pattern.concat("%"); } return pattern; }
[ "private", "String", "toSQLPattern", "(", "String", "attribute", ")", "{", "String", "pattern", "=", "attribute", ".", "replace", "(", "\"*\"", ",", "\"%\"", ")", ";", "if", "(", "!", "pattern", ".", "startsWith", "(", "\"%\"", ")", ")", "{", "pattern", ...
To sql pattern. @param attribute the attribute @return the string
[ "To", "sql", "pattern", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-server/src/main/java/org/talend/esb/sam/server/persistence/criterias/PatternCriteria.java#L95-L104
160,310
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/EventProducerInterceptor.java
EventProducerInterceptor.checkMessageID
private void checkMessageID(Message message) { if (!MessageUtils.isOutbound(message)) return; AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message)); if (maps == null) { maps = new AddressingProperties(); } ...
java
private void checkMessageID(Message message) { if (!MessageUtils.isOutbound(message)) return; AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, MessageUtils.isOutbound(message)); if (maps == null) { maps = new AddressingProperties(); } ...
[ "private", "void", "checkMessageID", "(", "Message", "message", ")", "{", "if", "(", "!", "MessageUtils", ".", "isOutbound", "(", "message", ")", ")", "return", ";", "AddressingProperties", "maps", "=", "ContextUtils", ".", "retrieveMAPs", "(", "message", ",",...
check if MessageID exists in the message, if not, only generate new MessageID for outbound message. @param message
[ "check", "if", "MessageID", "exists", "in", "the", "message", "if", "not", "only", "generate", "new", "MessageID", "for", "outbound", "message", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/eventproducer/EventProducerInterceptor.java#L119-L133
160,311
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CorrelationIdHelper.java
CorrelationIdHelper.getCorrelationId
public static String getCorrelationId(Message message) { String correlationId = (String) message.get(CORRELATION_ID_KEY); if(null == correlationId) { correlationId = readCorrelationId(message); } if(null == correlationId) { correlationId = readCorrelationIdSoap(me...
java
public static String getCorrelationId(Message message) { String correlationId = (String) message.get(CORRELATION_ID_KEY); if(null == correlationId) { correlationId = readCorrelationId(message); } if(null == correlationId) { correlationId = readCorrelationIdSoap(me...
[ "public", "static", "String", "getCorrelationId", "(", "Message", "message", ")", "{", "String", "correlationId", "=", "(", "String", ")", "message", ".", "get", "(", "CORRELATION_ID_KEY", ")", ";", "if", "(", "null", "==", "correlationId", ")", "{", "correl...
Get CorrelationId from message. @param message the message @return correlationId or null if not set
[ "Get", "CorrelationId", "from", "message", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CorrelationIdHelper.java#L60-L69
160,312
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CorrelationIdHelper.java
CorrelationIdHelper.readCorrelationId
public static String readCorrelationId(Message message) { String correlationId = null; Map<String, List<String>> headers = getOrCreateProtocolHeader(message); List<String> correlationIds = headers.get(CORRELATION_ID_KEY); if (correlationIds != null && correlationIds.size() > 0) { ...
java
public static String readCorrelationId(Message message) { String correlationId = null; Map<String, List<String>> headers = getOrCreateProtocolHeader(message); List<String> correlationIds = headers.get(CORRELATION_ID_KEY); if (correlationIds != null && correlationIds.size() > 0) { ...
[ "public", "static", "String", "readCorrelationId", "(", "Message", "message", ")", "{", "String", "correlationId", "=", "null", ";", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", "=", "getOrCreateProtocolHeader", "(", "message", ")", ...
Read correlation id from message. @param message the message @return the CorrelationId as string
[ "Read", "correlation", "id", "from", "message", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CorrelationIdHelper.java#L107-L123
160,313
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CorrelationIdHelper.java
CorrelationIdHelper.getOrCreateProtocolHeader
private static Map<String, List<String>> getOrCreateProtocolHeader( Message message) { Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>) message .get(Message.PROTOCOL_HEADERS)); if (headers == null) { headers = new HashMap<String, List<String>>(); ...
java
private static Map<String, List<String>> getOrCreateProtocolHeader( Message message) { Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>) message .get(Message.PROTOCOL_HEADERS)); if (headers == null) { headers = new HashMap<String, List<String>>(); ...
[ "private", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "getOrCreateProtocolHeader", "(", "Message", "message", ")", "{", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", "=", "CastUtils", ".", "cast", "(", ...
Gets the or create protocol header. @param message the message @return the message headers map
[ "Gets", "the", "or", "create", "protocol", "header", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CorrelationIdHelper.java#L131-L140
160,314
Talend/tesb-rt-se
sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringServiceImpl.java
MonitoringServiceImpl.putEvents
public void putEvents(List<Event> events) { List<Event> filteredEvents = filterEvents(events); executeHandlers(filteredEvents); for (Event event : filteredEvents) { persistenceHandler.writeEvent(event); } }
java
public void putEvents(List<Event> events) { List<Event> filteredEvents = filterEvents(events); executeHandlers(filteredEvents); for (Event event : filteredEvents) { persistenceHandler.writeEvent(event); } }
[ "public", "void", "putEvents", "(", "List", "<", "Event", ">", "events", ")", "{", "List", "<", "Event", ">", "filteredEvents", "=", "filterEvents", "(", "events", ")", ";", "executeHandlers", "(", "filteredEvents", ")", ";", "for", "(", "Event", "event", ...
Executes all event manipulating handler and writes the event with persist handler. @param events the events
[ "Executes", "all", "event", "manipulating", "handler", "and", "writes", "the", "event", "with", "persist", "handler", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringServiceImpl.java#L79-L85
160,315
Talend/tesb-rt-se
sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringServiceImpl.java
MonitoringServiceImpl.filterEvents
private List<Event> filterEvents(List<Event> events) { List<Event> filteredEvents = new ArrayList<Event>(); for (Event event : events) { if (!filter(event)) { filteredEvents.add(event); } } return filteredEvents; }
java
private List<Event> filterEvents(List<Event> events) { List<Event> filteredEvents = new ArrayList<Event>(); for (Event event : events) { if (!filter(event)) { filteredEvents.add(event); } } return filteredEvents; }
[ "private", "List", "<", "Event", ">", "filterEvents", "(", "List", "<", "Event", ">", "events", ")", "{", "List", "<", "Event", ">", "filteredEvents", "=", "new", "ArrayList", "<", "Event", ">", "(", ")", ";", "for", "(", "Event", "event", ":", "even...
Filter events. @param events the events @return the list of filtered events
[ "Filter", "events", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-service-soap/src/main/java/org/talend/esb/sam/service/soap/MonitoringServiceImpl.java#L108-L116
160,316
Talend/tesb-rt-se
sam/sam-common/src/main/java/org/talend/esb/sam/common/filter/impl/StringContentFilter.java
StringContentFilter.filter
public boolean filter(Event event) { LOG.info("StringContentFilter called"); if (wordsToFilter != null) { for (String filterWord : wordsToFilter) { if (event.getContent() != null && -1 != event.getContent().indexOf(filterWord)) { ...
java
public boolean filter(Event event) { LOG.info("StringContentFilter called"); if (wordsToFilter != null) { for (String filterWord : wordsToFilter) { if (event.getContent() != null && -1 != event.getContent().indexOf(filterWord)) { ...
[ "public", "boolean", "filter", "(", "Event", "event", ")", "{", "LOG", ".", "info", "(", "\"StringContentFilter called\"", ")", ";", "if", "(", "wordsToFilter", "!=", "null", ")", "{", "for", "(", "String", "filterWord", ":", "wordsToFilter", ")", "{", "if...
Filter event if word occurs in wordsToFilter. @param event the event @return true, if successful
[ "Filter", "event", "if", "word", "occurs", "in", "wordsToFilter", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-common/src/main/java/org/talend/esb/sam/common/filter/impl/StringContentFilter.java#L61-L73
160,317
Talend/tesb-rt-se
examples/camel/claimcheck/server/src/main/java/org/apache/camel/example/claimcheck/DataStore.java
DataStore.checkIn
public String checkIn(byte[] data) { String id = UUID.randomUUID().toString(); dataMap.put(id, data); return id; }
java
public String checkIn(byte[] data) { String id = UUID.randomUUID().toString(); dataMap.put(id, data); return id; }
[ "public", "String", "checkIn", "(", "byte", "[", "]", "data", ")", "{", "String", "id", "=", "UUID", ".", "randomUUID", "(", ")", ".", "toString", "(", ")", ";", "dataMap", ".", "put", "(", "id", ",", "data", ")", ";", "return", "id", ";", "}" ]
Store the given data and return a uuid for later retrieval of the data @param data @return unique id for the stored data
[ "Store", "the", "given", "data", "and", "return", "a", "uuid", "for", "later", "retrieval", "of", "the", "data" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/camel/claimcheck/server/src/main/java/org/apache/camel/example/claimcheck/DataStore.java#L21-L25
160,318
Talend/tesb-rt-se
request-callback/src/main/java/org/talend/esb/mep/requestcallback/impl/RequestCallbackInInterceptor.java
RequestCallbackInInterceptor.setupFlowId
private static void setupFlowId(SoapMessage message) { String flowId = FlowIdHelper.getFlowId(message); if (flowId == null) { flowId = FlowIdProtocolHeaderCodec.readFlowId(message); } if (flowId == null) { flowId = FlowIdSoapCodec.readFlowId(message); } ...
java
private static void setupFlowId(SoapMessage message) { String flowId = FlowIdHelper.getFlowId(message); if (flowId == null) { flowId = FlowIdProtocolHeaderCodec.readFlowId(message); } if (flowId == null) { flowId = FlowIdSoapCodec.readFlowId(message); } ...
[ "private", "static", "void", "setupFlowId", "(", "SoapMessage", "message", ")", "{", "String", "flowId", "=", "FlowIdHelper", ".", "getFlowId", "(", "message", ")", ";", "if", "(", "flowId", "==", "null", ")", "{", "flowId", "=", "FlowIdProtocolHeaderCodec", ...
This functions reads SAM flowId and sets it as message property for subsequent store in CallContext @param message
[ "This", "functions", "reads", "SAM", "flowId", "and", "sets", "it", "as", "message", "property", "for", "subsequent", "store", "in", "CallContext" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/request-callback/src/main/java/org/talend/esb/mep/requestcallback/impl/RequestCallbackInInterceptor.java#L255-L279
160,319
Talend/tesb-rt-se
request-callback/src/main/java/org/talend/esb/mep/requestcallback/impl/RequestCallbackInInterceptor.java
RequestCallbackInInterceptor.getReqSigCert
private static X509Certificate getReqSigCert(Message message) { List<WSHandlerResult> results = CastUtils.cast((List<?>) message.getExchange().getInMessage().get(WSHandlerConstants.RECV_RESULTS)); if (results == null) { return null; } /* ...
java
private static X509Certificate getReqSigCert(Message message) { List<WSHandlerResult> results = CastUtils.cast((List<?>) message.getExchange().getInMessage().get(WSHandlerConstants.RECV_RESULTS)); if (results == null) { return null; } /* ...
[ "private", "static", "X509Certificate", "getReqSigCert", "(", "Message", "message", ")", "{", "List", "<", "WSHandlerResult", ">", "results", "=", "CastUtils", ".", "cast", "(", "(", "List", "<", "?", ">", ")", "message", ".", "getExchange", "(", ")", ".",...
Refactor the method into public CXF utility and reuse it from CXF instead copy&paste
[ "Refactor", "the", "method", "into", "public", "CXF", "utility", "and", "reuse", "it", "from", "CXF", "instead", "copy&paste" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/request-callback/src/main/java/org/talend/esb/mep/requestcallback/impl/RequestCallbackInInterceptor.java#L291-L322
160,320
Talend/tesb-rt-se
examples/cxf/jaxrs-advanced/client/src/main/java/client/RESTClient.java
RESTClient.useSearchService
private void useSearchService() throws Exception { System.out.println("Searching..."); WebClient wc = WebClient.create("http://localhost:" + port + "/services/personservice/search"); WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L); wc.accept(MediaType....
java
private void useSearchService() throws Exception { System.out.println("Searching..."); WebClient wc = WebClient.create("http://localhost:" + port + "/services/personservice/search"); WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L); wc.accept(MediaType....
[ "private", "void", "useSearchService", "(", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"Searching...\"", ")", ";", "WebClient", "wc", "=", "WebClient", ".", "create", "(", "\"http://localhost:\"", "+", "port", "+", "\"/servic...
SearchService is a service which shares the information about Persons with the PersonService. It lets users search for individual people using simple or complex search expressions. The interaction with this service also verifies that the JAX-RS server is capable of supporting multiple root resource classes
[ "SearchService", "is", "a", "service", "which", "shares", "the", "information", "about", "Persons", "with", "the", "PersonService", ".", "It", "lets", "users", "search", "for", "individual", "people", "using", "simple", "or", "complex", "search", "expressions", ...
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-advanced/client/src/main/java/client/RESTClient.java#L201-L257
160,321
Talend/tesb-rt-se
examples/cxf/jaxrs-advanced/client/src/main/java/client/RESTClient.java
RESTClient.useSimpleProxy
public void useSimpleProxy() { String webAppAddress = "http://localhost:" + port + "/services/personservice"; PersonService proxy = JAXRSClientFactory.create(webAppAddress, PersonService.class); new PersonServiceProxyClient(proxy).useService(); }
java
public void useSimpleProxy() { String webAppAddress = "http://localhost:" + port + "/services/personservice"; PersonService proxy = JAXRSClientFactory.create(webAppAddress, PersonService.class); new PersonServiceProxyClient(proxy).useService(); }
[ "public", "void", "useSimpleProxy", "(", ")", "{", "String", "webAppAddress", "=", "\"http://localhost:\"", "+", "port", "+", "\"/services/personservice\"", ";", "PersonService", "proxy", "=", "JAXRSClientFactory", ".", "create", "(", "webAppAddress", ",", "PersonServ...
This function uses a proxy which is capable of transforming typed invocations into proper HTTP calls which will be understood by RESTful services. This works for subresources as well. Interfaces and concrete classes can be proxified, in the latter case a CGLIB runtime dependency is needed. CXF JAX-RS proxies can be con...
[ "This", "function", "uses", "a", "proxy", "which", "is", "capable", "of", "transforming", "typed", "invocations", "into", "proper", "HTTP", "calls", "which", "will", "be", "understood", "by", "RESTful", "services", ".", "This", "works", "for", "subresources", ...
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-advanced/client/src/main/java/client/RESTClient.java#L280-L285
160,322
Talend/tesb-rt-se
policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdSoapCodec.java
CorrelationIdSoapCodec.readCorrelationId
public static String readCorrelationId(Message message) { if (!(message instanceof SoapMessage)) { return null; } String correlationId = null; Header hdCorrelationId = ((SoapMessage) message).getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId != null) { ...
java
public static String readCorrelationId(Message message) { if (!(message instanceof SoapMessage)) { return null; } String correlationId = null; Header hdCorrelationId = ((SoapMessage) message).getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId != null) { ...
[ "public", "static", "String", "readCorrelationId", "(", "Message", "message", ")", "{", "if", "(", "!", "(", "message", "instanceof", "SoapMessage", ")", ")", "{", "return", "null", ";", "}", "String", "correlationId", "=", "null", ";", "Header", "hdCorrelat...
Read correlation id. @param message the message @return correlation id from the message
[ "Read", "correlation", "id", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdSoapCodec.java#L57-L75
160,323
Talend/tesb-rt-se
policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdSoapCodec.java
CorrelationIdSoapCodec.writeCorrelationId
public static void writeCorrelationId(Message message, String correlationId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage) message; Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId...
java
public static void writeCorrelationId(Message message, String correlationId) { if (!(message instanceof SoapMessage)) { return; } SoapMessage soapMessage = (SoapMessage) message; Header hdCorrelationId = soapMessage.getHeader(CORRELATION_ID_QNAME); if (hdCorrelationId...
[ "public", "static", "void", "writeCorrelationId", "(", "Message", "message", ",", "String", "correlationId", ")", "{", "if", "(", "!", "(", "message", "instanceof", "SoapMessage", ")", ")", "{", "return", ";", "}", "SoapMessage", "soapMessage", "=", "(", "So...
Write correlation id to message. @param message the message @param correlationId the correlation id
[ "Write", "correlation", "id", "to", "message", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdSoapCodec.java#L83-L114
160,324
Talend/tesb-rt-se
sam/sam-common/src/main/java/org/talend/esb/sam/common/handler/impl/ContentLengthHandler.java
ContentLengthHandler.handleEvent
public void handleEvent(Event event) { LOG.fine("ContentLengthHandler called"); //if maximum length is shorter then <cut><![CDATA[ ]]></cut> it's not possible to cut the content if(CUT_START_TAG.length() + CUT_END_TAG.length() > length) { LOG.warning("Trying to cut content. But leng...
java
public void handleEvent(Event event) { LOG.fine("ContentLengthHandler called"); //if maximum length is shorter then <cut><![CDATA[ ]]></cut> it's not possible to cut the content if(CUT_START_TAG.length() + CUT_END_TAG.length() > length) { LOG.warning("Trying to cut content. But leng...
[ "public", "void", "handleEvent", "(", "Event", "event", ")", "{", "LOG", ".", "fine", "(", "\"ContentLengthHandler called\"", ")", ";", "//if maximum length is shorter then <cut><![CDATA[ ]]></cut> it's not possible to cut the content", "if", "(", "CUT_START_TAG", ".", "lengt...
Cut the message content to the configured length. @param event the event
[ "Cut", "the", "message", "content", "to", "the", "configured", "length", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-common/src/main/java/org/talend/esb/sam/common/handler/impl/ContentLengthHandler.java#L74-L96
160,325
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/util/Converter.java
Converter.convertDate
public static XMLGregorianCalendar convertDate(Date date) { if (date == null) { return null; } GregorianCalendar gc = new GregorianCalendar(); gc.setTimeInMillis(date.getTime()); try { return getDatatypeFactory().newXMLGregorianCalendar(gc); } c...
java
public static XMLGregorianCalendar convertDate(Date date) { if (date == null) { return null; } GregorianCalendar gc = new GregorianCalendar(); gc.setTimeInMillis(date.getTime()); try { return getDatatypeFactory().newXMLGregorianCalendar(gc); } c...
[ "public", "static", "XMLGregorianCalendar", "convertDate", "(", "Date", "date", ")", "{", "if", "(", "date", "==", "null", ")", "{", "return", "null", ";", "}", "GregorianCalendar", "gc", "=", "new", "GregorianCalendar", "(", ")", ";", "gc", ".", "setTimeI...
convert Date to XMLGregorianCalendar. @param date the date @return the xML gregorian calendar
[ "convert", "Date", "to", "XMLGregorianCalendar", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/util/Converter.java#L56-L69
160,326
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CustomInfo.java
CustomInfo.getOrCreateCustomInfo
public static CustomInfo getOrCreateCustomInfo(Message message) { CustomInfo customInfo = message.get(CustomInfo.class); if (customInfo == null) { customInfo = new CustomInfo(); message.put(CustomInfo.class, customInfo); } return customInfo; }
java
public static CustomInfo getOrCreateCustomInfo(Message message) { CustomInfo customInfo = message.get(CustomInfo.class); if (customInfo == null) { customInfo = new CustomInfo(); message.put(CustomInfo.class, customInfo); } return customInfo; }
[ "public", "static", "CustomInfo", "getOrCreateCustomInfo", "(", "Message", "message", ")", "{", "CustomInfo", "customInfo", "=", "message", ".", "get", "(", "CustomInfo", ".", "class", ")", ";", "if", "(", "customInfo", "==", "null", ")", "{", "customInfo", ...
Access the customInfo of a message using this accessor. The CustomInfo map will be automatically created and stored in the event if it is not yet present @param message @return
[ "Access", "the", "customInfo", "of", "a", "message", "using", "this", "accessor", ".", "The", "CustomInfo", "map", "will", "be", "automatically", "created", "and", "stored", "in", "the", "event", "if", "it", "is", "not", "yet", "present" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/message/CustomInfo.java#L44-L51
160,327
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/wiretap/WireTapHelper.java
WireTapHelper.isMessageContentToBeLogged
public static boolean isMessageContentToBeLogged(final Message message, final boolean logMessageContent, boolean logMessageContentOverride) { /* * If controlling of logging behavior is not allowed externally * then log according to global property value */ if (!lo...
java
public static boolean isMessageContentToBeLogged(final Message message, final boolean logMessageContent, boolean logMessageContentOverride) { /* * If controlling of logging behavior is not allowed externally * then log according to global property value */ if (!lo...
[ "public", "static", "boolean", "isMessageContentToBeLogged", "(", "final", "Message", "message", ",", "final", "boolean", "logMessageContent", ",", "boolean", "logMessageContentOverride", ")", "{", "/*\n * If controlling of logging behavior is not allowed externally\n ...
If the "org.talend.esb.sam.agent.log.messageContent" property value is "true" then log the message content If it is "false" then skip the message content logging Else fall back to global property "log.messageContent" @param message @param logMessageContent @param logMessageContentOverride @return
[ "If", "the", "org", ".", "talend", ".", "esb", ".", "sam", ".", "agent", ".", "log", ".", "messageContent", "property", "value", "is", "true", "then", "log", "the", "message", "content", "If", "it", "is", "false", "then", "skip", "the", "message", "con...
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/wiretap/WireTapHelper.java#L43-L84
160,328
Talend/tesb-rt-se
locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java
LocatorSoapServiceImpl.initLocator
public void initLocator() throws InterruptedException, ServiceLocatorException { if (locatorClient == null) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Instantiate locatorClient client for Locator Server " + locatorEndpoints + "..."); ...
java
public void initLocator() throws InterruptedException, ServiceLocatorException { if (locatorClient == null) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Instantiate locatorClient client for Locator Server " + locatorEndpoints + "..."); ...
[ "public", "void", "initLocator", "(", ")", "throws", "InterruptedException", ",", "ServiceLocatorException", "{", "if", "(", "locatorClient", "==", "null", ")", "{", "if", "(", "LOG", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "LOG", ".",...
Instantiate Service Locator client. After successful instantiation establish a connection to the Service Locator server. This method will be called if property locatorClient is null. For this purpose was defined additional properties to instantiate ServiceLocatorImpl. @throws InterruptedException @throws ServiceLocato...
[ "Instantiate", "Service", "Locator", "client", ".", "After", "successful", "instantiation", "establish", "a", "connection", "to", "the", "Service", "Locator", "server", ".", "This", "method", "will", "be", "called", "if", "property", "locatorClient", "is", "null",...
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java#L131-L149
160,329
Talend/tesb-rt-se
locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java
LocatorSoapServiceImpl.disconnectLocator
@PreDestroy public void disconnectLocator() throws InterruptedException, ServiceLocatorException { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Destroy Locator client"); } if (endpointCollector != null) { endpointCollector.stopScheduledCollection(); ...
java
@PreDestroy public void disconnectLocator() throws InterruptedException, ServiceLocatorException { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Destroy Locator client"); } if (endpointCollector != null) { endpointCollector.stopScheduledCollection(); ...
[ "@", "PreDestroy", "public", "void", "disconnectLocator", "(", ")", "throws", "InterruptedException", ",", "ServiceLocatorException", "{", "if", "(", "LOG", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "LOG", ".", "fine", "(", "\"Destroy Locato...
Should use as destroy method. Disconnects from a Service Locator server. All endpoints that were registered before are removed from the server. Set property locatorClient to null. @throws InterruptedException @throws ServiceLocatorException
[ "Should", "use", "as", "destroy", "method", ".", "Disconnects", "from", "a", "Service", "Locator", "server", ".", "All", "endpoints", "that", "were", "registered", "before", "are", "removed", "from", "the", "server", ".", "Set", "property", "locatorClient", "t...
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java#L159-L174
160,330
Talend/tesb-rt-se
locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java
LocatorSoapServiceImpl.lookupEndpoints
List<W3CEndpointReference> lookupEndpoints(QName serviceName, MatcherDataType matcherData) throws ServiceLocatorFault, InterruptedExceptionFault { SLPropertiesMatcher matcher = createMatcher(matcherData); List<String> names = null; List<W3CEndpointReference> result = new ...
java
List<W3CEndpointReference> lookupEndpoints(QName serviceName, MatcherDataType matcherData) throws ServiceLocatorFault, InterruptedExceptionFault { SLPropertiesMatcher matcher = createMatcher(matcherData); List<String> names = null; List<W3CEndpointReference> result = new ...
[ "List", "<", "W3CEndpointReference", ">", "lookupEndpoints", "(", "QName", "serviceName", ",", "MatcherDataType", "matcherData", ")", "throws", "ServiceLocatorFault", ",", "InterruptedExceptionFault", "{", "SLPropertiesMatcher", "matcher", "=", "createMatcher", "(", "matc...
For the given service name return list of endpoint references currently registered at the service locator server endpoints. @param serviceName the name of the service for which to get the endpoints, must not be <code>null</code> @return EndpointReferenceListType encapsulate list of endpoint references or <code>null</c...
[ "For", "the", "given", "service", "name", "return", "list", "of", "endpoint", "references", "currently", "registered", "at", "the", "service", "locator", "server", "endpoints", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java#L365-L408
160,331
Talend/tesb-rt-se
locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java
LocatorSoapServiceImpl.getRotatedList
private List<String> getRotatedList(List<String> strings) { int index = RANDOM.nextInt(strings.size()); List<String> rotated = new ArrayList<String>(); for (int i = 0; i < strings.size(); i++) { rotated.add(strings.get(index)); index = (index + 1) % strings.size(); ...
java
private List<String> getRotatedList(List<String> strings) { int index = RANDOM.nextInt(strings.size()); List<String> rotated = new ArrayList<String>(); for (int i = 0; i < strings.size(); i++) { rotated.add(strings.get(index)); index = (index + 1) % strings.size(); ...
[ "private", "List", "<", "String", ">", "getRotatedList", "(", "List", "<", "String", ">", "strings", ")", "{", "int", "index", "=", "RANDOM", ".", "nextInt", "(", "strings", ".", "size", "(", ")", ")", ";", "List", "<", "String", ">", "rotated", "=",...
Rotate list of String. Used for randomize selection of received endpoints @param strings list of Strings @return the same list in random order
[ "Rotate", "list", "of", "String", ".", "Used", "for", "randomize", "selection", "of", "received", "endpoints" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator-service/locator-soap-service/src/main/java/org/talend/esb/locator/service/LocatorSoapServiceImpl.java#L429-L437
160,332
Talend/tesb-rt-se
job/controller/src/main/java/org/talend/esb/job/controller/internal/MultiThreadedOperation.java
MultiThreadedOperation.start
@Override public void start(String[] arguments) { boolean notStarted = !started.getAndSet(true); if (notStarted) { start(new MultiInstanceWorkloadStrategy(factory, name, arguments, endpointRegistry, execService)); } }
java
@Override public void start(String[] arguments) { boolean notStarted = !started.getAndSet(true); if (notStarted) { start(new MultiInstanceWorkloadStrategy(factory, name, arguments, endpointRegistry, execService)); } }
[ "@", "Override", "public", "void", "start", "(", "String", "[", "]", "arguments", ")", "{", "boolean", "notStarted", "=", "!", "started", ".", "getAndSet", "(", "true", ")", ";", "if", "(", "notStarted", ")", "{", "start", "(", "new", "MultiInstanceWorkl...
Start the operation by instantiating the first job instance in a separate Thread. @param arguments {@inheritDoc}
[ "Start", "the", "operation", "by", "instantiating", "the", "first", "job", "instance", "in", "a", "separate", "Thread", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/job/controller/src/main/java/org/talend/esb/job/controller/internal/MultiThreadedOperation.java#L70-L76
160,333
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/lifecycle/AbstractListenerImpl.java
AbstractListenerImpl.processStart
protected void processStart(Endpoint endpoint, EventTypeEnum eventType) { if (!sendLifecycleEvent) { return; } Event event = createEvent(endpoint, eventType); queue.add(event); }
java
protected void processStart(Endpoint endpoint, EventTypeEnum eventType) { if (!sendLifecycleEvent) { return; } Event event = createEvent(endpoint, eventType); queue.add(event); }
[ "protected", "void", "processStart", "(", "Endpoint", "endpoint", ",", "EventTypeEnum", "eventType", ")", "{", "if", "(", "!", "sendLifecycleEvent", ")", "{", "return", ";", "}", "Event", "event", "=", "createEvent", "(", "endpoint", ",", "eventType", ")", "...
Process start. @param endpoint the endpoint @param eventType the event type
[ "Process", "start", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/lifecycle/AbstractListenerImpl.java#L92-L99
160,334
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/lifecycle/AbstractListenerImpl.java
AbstractListenerImpl.processStop
protected void processStop(Endpoint endpoint, EventTypeEnum eventType) { if (!sendLifecycleEvent) { return; } Event event = createEvent(endpoint, eventType); monitoringServiceClient.putEvents(Collections.singletonList(event)); if (LOG.isLoggable(Level.INFO)) { ...
java
protected void processStop(Endpoint endpoint, EventTypeEnum eventType) { if (!sendLifecycleEvent) { return; } Event event = createEvent(endpoint, eventType); monitoringServiceClient.putEvents(Collections.singletonList(event)); if (LOG.isLoggable(Level.INFO)) { ...
[ "protected", "void", "processStop", "(", "Endpoint", "endpoint", ",", "EventTypeEnum", "eventType", ")", "{", "if", "(", "!", "sendLifecycleEvent", ")", "{", "return", ";", "}", "Event", "event", "=", "createEvent", "(", "endpoint", ",", "eventType", ")", ";...
Process stop. @param endpoint the endpoint @param eventType the event type
[ "Process", "stop", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/lifecycle/AbstractListenerImpl.java#L107-L117
160,335
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/lifecycle/AbstractListenerImpl.java
AbstractListenerImpl.createEvent
private Event createEvent(Endpoint endpoint, EventTypeEnum type) { Event event = new Event(); MessageInfo messageInfo = new MessageInfo(); Originator originator = new Originator(); event.setMessageInfo(messageInfo); event.setOriginator(originator); Date date = new Date(...
java
private Event createEvent(Endpoint endpoint, EventTypeEnum type) { Event event = new Event(); MessageInfo messageInfo = new MessageInfo(); Originator originator = new Originator(); event.setMessageInfo(messageInfo); event.setOriginator(originator); Date date = new Date(...
[ "private", "Event", "createEvent", "(", "Endpoint", "endpoint", ",", "EventTypeEnum", "type", ")", "{", "Event", "event", "=", "new", "Event", "(", ")", ";", "MessageInfo", "messageInfo", "=", "new", "MessageInfo", "(", ")", ";", "Originator", "originator", ...
Creates the event for endpoint with specific type. @param endpoint the endpoint @param type the type @return the event
[ "Creates", "the", "event", "for", "endpoint", "with", "specific", "type", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/lifecycle/AbstractListenerImpl.java#L126-L165
160,336
Talend/tesb-rt-se
examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/RESTClient.java
RESTClient.useOldRESTService
public void useOldRESTService() throws Exception { List<Object> providers = createJAXRSProviders(); com.example.customerservice.CustomerService customerService = JAXRSClientFactory .createFromModel("http://localhost:" + port + "/examples/direct/rest", com.examp...
java
public void useOldRESTService() throws Exception { List<Object> providers = createJAXRSProviders(); com.example.customerservice.CustomerService customerService = JAXRSClientFactory .createFromModel("http://localhost:" + port + "/examples/direct/rest", com.examp...
[ "public", "void", "useOldRESTService", "(", ")", "throws", "Exception", "{", "List", "<", "Object", ">", "providers", "=", "createJAXRSProviders", "(", ")", ";", "com", ".", "example", ".", "customerservice", ".", "CustomerService", "customerService", "=", "JAXR...
Old REST client uses old REST service
[ "Old", "REST", "client", "uses", "old", "REST", "service" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/RESTClient.java#L56-L73
160,337
Talend/tesb-rt-se
examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/RESTClient.java
RESTClient.useNewRESTService
public void useNewRESTService(String address) throws Exception { List<Object> providers = createJAXRSProviders(); org.customer.service.CustomerService customerService = JAXRSClientFactory .createFromModel(address, org.customer.service.CustomerService.class, ...
java
public void useNewRESTService(String address) throws Exception { List<Object> providers = createJAXRSProviders(); org.customer.service.CustomerService customerService = JAXRSClientFactory .createFromModel(address, org.customer.service.CustomerService.class, ...
[ "public", "void", "useNewRESTService", "(", "String", "address", ")", "throws", "Exception", "{", "List", "<", "Object", ">", "providers", "=", "createJAXRSProviders", "(", ")", ";", "org", ".", "customer", ".", "service", ".", "CustomerService", "customerServic...
New REST client uses new REST service
[ "New", "REST", "client", "uses", "new", "REST", "service" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/RESTClient.java#L78-L95
160,338
Talend/tesb-rt-se
examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/RESTClient.java
RESTClient.useNewRESTServiceWithOldClient
public void useNewRESTServiceWithOldClient() throws Exception { List<Object> providers = createJAXRSProviders(); com.example.customerservice.CustomerService customerService = JAXRSClientFactory .createFromModel("http://localhost:" + port + "/examples/direct/new-rest", ...
java
public void useNewRESTServiceWithOldClient() throws Exception { List<Object> providers = createJAXRSProviders(); com.example.customerservice.CustomerService customerService = JAXRSClientFactory .createFromModel("http://localhost:" + port + "/examples/direct/new-rest", ...
[ "public", "void", "useNewRESTServiceWithOldClient", "(", ")", "throws", "Exception", "{", "List", "<", "Object", ">", "providers", "=", "createJAXRSProviders", "(", ")", ";", "com", ".", "example", ".", "customerservice", ".", "CustomerService", "customerService", ...
Old REST client uses new REST service
[ "Old", "REST", "client", "uses", "new", "REST", "service" ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/jaxrs-jaxws-transformations/client/src/main/java/client/RESTClient.java#L164-L190
160,339
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java
EventCollector.init
@PostConstruct public void init() { //init Bus and LifeCycle listeners if (bus != null && sendLifecycleEvent ) { ServerLifeCycleManager slcm = bus.getExtension(ServerLifeCycleManager.class); if (null != slcm) { ServiceListenerImpl svrListener = new...
java
@PostConstruct public void init() { //init Bus and LifeCycle listeners if (bus != null && sendLifecycleEvent ) { ServerLifeCycleManager slcm = bus.getExtension(ServerLifeCycleManager.class); if (null != slcm) { ServiceListenerImpl svrListener = new...
[ "@", "PostConstruct", "public", "void", "init", "(", ")", "{", "//init Bus and LifeCycle listeners", "if", "(", "bus", "!=", "null", "&&", "sendLifecycleEvent", ")", "{", "ServerLifeCycleManager", "slcm", "=", "bus", ".", "getExtension", "(", "ServerLifeCycleManager...
Instantiates a new event collector.
[ "Instantiates", "a", "new", "event", "collector", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java#L107-L144
160,340
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java
EventCollector.setDefaultInterval
public void setDefaultInterval(long defaultInterval) { if(defaultInterval <= 0) { LOG.severe("collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is " + defaultInterval); throw new IllegalArgumentException("collector.scheduler.interval must be greater than ...
java
public void setDefaultInterval(long defaultInterval) { if(defaultInterval <= 0) { LOG.severe("collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is " + defaultInterval); throw new IllegalArgumentException("collector.scheduler.interval must be greater than ...
[ "public", "void", "setDefaultInterval", "(", "long", "defaultInterval", ")", "{", "if", "(", "defaultInterval", "<=", "0", ")", "{", "LOG", ".", "severe", "(", "\"collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is \"", "+", ...
Set default interval for sending events to monitoring service. DefaultInterval will be used by scheduler. @param defaultInterval the new default interval
[ "Set", "default", "interval", "for", "sending", "events", "to", "monitoring", "service", ".", "DefaultInterval", "will", "be", "used", "by", "scheduler", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java#L192-L198
160,341
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java
EventCollector.sendEventsFromQueue
public void sendEventsFromQueue() { if (null == queue || stopSending) { return; } LOG.fine("Scheduler called for sending events"); int packageSize = getEventsPerMessageCall(); while (!queue.isEmpty()) { final List<Event> list = new ArrayList<Event>(); ...
java
public void sendEventsFromQueue() { if (null == queue || stopSending) { return; } LOG.fine("Scheduler called for sending events"); int packageSize = getEventsPerMessageCall(); while (!queue.isEmpty()) { final List<Event> list = new ArrayList<Event>(); ...
[ "public", "void", "sendEventsFromQueue", "(", ")", "{", "if", "(", "null", "==", "queue", "||", "stopSending", ")", "{", "return", ";", "}", "LOG", ".", "fine", "(", "\"Scheduler called for sending events\"", ")", ";", "int", "packageSize", "=", "getEventsPerM...
Method will be executed asynchronously.
[ "Method", "will", "be", "executed", "asynchronously", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java#L293-L325
160,342
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java
EventCollector.sendEvents
private void sendEvents(final List<Event> events) { if (null != handlers) { for (EventHandler current : handlers) { for (Event event : events) { current.handleEvent(event); } } } LOG.info("Put events(" + events.size() +...
java
private void sendEvents(final List<Event> events) { if (null != handlers) { for (EventHandler current : handlers) { for (Event event : events) { current.handleEvent(event); } } } LOG.info("Put events(" + events.size() +...
[ "private", "void", "sendEvents", "(", "final", "List", "<", "Event", ">", "events", ")", "{", "if", "(", "null", "!=", "handlers", ")", "{", "for", "(", "EventHandler", "current", ":", "handlers", ")", "{", "for", "(", "Event", "event", ":", "events", ...
Sends the events to monitoring service client. @param events the events
[ "Sends", "the", "events", "to", "monitoring", "service", "client", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/collector/EventCollector.java#L349-L373
160,343
Talend/tesb-rt-se
job/controller/src/main/java/org/talend/esb/job/controller/internal/SingleThreadedOperation.java
SingleThreadedOperation.start
@Override public void start(String[] arguments) { boolean notStarted = !started.getAndSet(true); if (notStarted) { start(new SingleInstanceWorkloadStrategy(job, name, arguments, endpointRegistry, execService)); } }
java
@Override public void start(String[] arguments) { boolean notStarted = !started.getAndSet(true); if (notStarted) { start(new SingleInstanceWorkloadStrategy(job, name, arguments, endpointRegistry, execService)); } }
[ "@", "Override", "public", "void", "start", "(", "String", "[", "]", "arguments", ")", "{", "boolean", "notStarted", "=", "!", "started", ".", "getAndSet", "(", "true", ")", ";", "if", "(", "notStarted", ")", "{", "start", "(", "new", "SingleInstanceWork...
Starts the one and only job instance in a separate Thread. Should be called exactly one time before the operation is stopped. @param arguments {@inheritDoc}
[ "Starts", "the", "one", "and", "only", "job", "instance", "in", "a", "separate", "Thread", ".", "Should", "be", "called", "exactly", "one", "time", "before", "the", "operation", "is", "stopped", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/job/controller/src/main/java/org/talend/esb/job/controller/internal/SingleThreadedOperation.java#L69-L75
160,344
Talend/tesb-rt-se
policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdProtocolHeaderCodec.java
CorrelationIdProtocolHeaderCodec.writeCorrelationId
public static void writeCorrelationId(Message message, String correlationId) { Map<String, List<String>> headers = getOrCreateProtocolHeader(message); headers.put(CORRELATIONID_HTTP_HEADER_NAME, Collections.singletonList(correlationId)); if (LOG.isLoggable(Level.FINE)) { LOG.fine("HT...
java
public static void writeCorrelationId(Message message, String correlationId) { Map<String, List<String>> headers = getOrCreateProtocolHeader(message); headers.put(CORRELATIONID_HTTP_HEADER_NAME, Collections.singletonList(correlationId)); if (LOG.isLoggable(Level.FINE)) { LOG.fine("HT...
[ "public", "static", "void", "writeCorrelationId", "(", "Message", "message", ",", "String", "correlationId", ")", "{", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", "=", "getOrCreateProtocolHeader", "(", "message", ")", ";", "headers",...
Write correlation id. @param message the message @param correlationId the correlation id
[ "Write", "correlation", "id", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/policies/correlationid-policy/src/main/java/org/talend/esb/policy/correlation/impl/CorrelationIdProtocolHeaderCodec.java#L77-L83
160,345
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProtocolHeaderCodec.java
FlowIdProtocolHeaderCodec.readFlowId
public static String readFlowId(Message message) { String flowId = null; Map<String, List<String>> headers = getOrCreateProtocolHeader(message); List<String> flowIds = headers.get(FLOWID_HTTP_HEADER_NAME); if (flowIds != null && flowIds.size() > 0) { flowId = flowIds.get(0); ...
java
public static String readFlowId(Message message) { String flowId = null; Map<String, List<String>> headers = getOrCreateProtocolHeader(message); List<String> flowIds = headers.get(FLOWID_HTTP_HEADER_NAME); if (flowIds != null && flowIds.size() > 0) { flowId = flowIds.get(0); ...
[ "public", "static", "String", "readFlowId", "(", "Message", "message", ")", "{", "String", "flowId", "=", "null", ";", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", "=", "getOrCreateProtocolHeader", "(", "message", ")", ";", "List"...
Read flow id from message. @param message the message @return the FlowId as string
[ "Read", "flow", "id", "from", "message", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProtocolHeaderCodec.java#L53-L69
160,346
Talend/tesb-rt-se
sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProtocolHeaderCodec.java
FlowIdProtocolHeaderCodec.writeFlowId
public static void writeFlowId(Message message, String flowId) { Map<String, List<String>> headers = getOrCreateProtocolHeader(message); headers.put(FLOWID_HTTP_HEADER_NAME, Collections.singletonList(flowId)); if (LOG.isLoggable(Level.FINE)) { LOG.fine("HTTP header '" + FLOWID_HTTP_H...
java
public static void writeFlowId(Message message, String flowId) { Map<String, List<String>> headers = getOrCreateProtocolHeader(message); headers.put(FLOWID_HTTP_HEADER_NAME, Collections.singletonList(flowId)); if (LOG.isLoggable(Level.FINE)) { LOG.fine("HTTP header '" + FLOWID_HTTP_H...
[ "public", "static", "void", "writeFlowId", "(", "Message", "message", ",", "String", "flowId", ")", "{", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", "=", "getOrCreateProtocolHeader", "(", "message", ")", ";", "headers", ".", "put...
Write flow id. @param message the message @param flowId the flow id
[ "Write", "flow", "id", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/sam/sam-agent/src/main/java/org/talend/esb/sam/agent/flowidprocessor/FlowIdProtocolHeaderCodec.java#L77-L83
160,347
Talend/tesb-rt-se
examples/cxf/interceptors/common/src/main/java/demo/interceptors/interceptor/DemoInterceptor.java
DemoInterceptor.addInterceptors
public static void addInterceptors(InterceptorProvider provider) { PhaseManager phases = BusFactory.getDefaultBus().getExtension(PhaseManager.class); for (Phase p : phases.getInPhases()) { provider.getInInterceptors().add(new DemoInterceptor(p.getName())); provider.getInFaultInte...
java
public static void addInterceptors(InterceptorProvider provider) { PhaseManager phases = BusFactory.getDefaultBus().getExtension(PhaseManager.class); for (Phase p : phases.getInPhases()) { provider.getInInterceptors().add(new DemoInterceptor(p.getName())); provider.getInFaultInte...
[ "public", "static", "void", "addInterceptors", "(", "InterceptorProvider", "provider", ")", "{", "PhaseManager", "phases", "=", "BusFactory", ".", "getDefaultBus", "(", ")", ".", "getExtension", "(", "PhaseManager", ".", "class", ")", ";", "for", "(", "Phase", ...
This method will add a DemoInterceptor into every in and every out phase of the interceptor chains. @param provider
[ "This", "method", "will", "add", "a", "DemoInterceptor", "into", "every", "in", "and", "every", "out", "phase", "of", "the", "interceptor", "chains", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/interceptors/common/src/main/java/demo/interceptors/interceptor/DemoInterceptor.java#L46-L56
160,348
Talend/tesb-rt-se
examples/cxf/interceptors/common/src/main/java/demo/interceptors/interceptor/DemoInterceptor.java
DemoInterceptor.somethingMayHaveChanged
private boolean somethingMayHaveChanged(PhaseInterceptorChain pic) { Iterator<Interceptor<? extends Message>> it = pic.iterator(); Interceptor<? extends Message> last = null; while (it.hasNext()) { Interceptor<? extends Message> cur = it.next(); if (cur == this) { ...
java
private boolean somethingMayHaveChanged(PhaseInterceptorChain pic) { Iterator<Interceptor<? extends Message>> it = pic.iterator(); Interceptor<? extends Message> last = null; while (it.hasNext()) { Interceptor<? extends Message> cur = it.next(); if (cur == this) { ...
[ "private", "boolean", "somethingMayHaveChanged", "(", "PhaseInterceptorChain", "pic", ")", "{", "Iterator", "<", "Interceptor", "<", "?", "extends", "Message", ">", ">", "it", "=", "pic", ".", "iterator", "(", ")", ";", "Interceptor", "<", "?", "extends", "M...
as we know nothing has changed.
[ "as", "we", "know", "nothing", "has", "changed", "." ]
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/interceptors/common/src/main/java/demo/interceptors/interceptor/DemoInterceptor.java#L94-L108
160,349
Talend/tesb-rt-se
examples/cxf/interceptors/common/src/main/java/demo/interceptors/interceptor/DemoInterceptor.java
DemoInterceptor.printInterceptorChain
public void printInterceptorChain(InterceptorChain chain) { Iterator<Interceptor<? extends Message>> it = chain.iterator(); String phase = ""; StringBuilder builder = null; while (it.hasNext()) { Interceptor<? extends Message> interceptor = it.next(); if (intercep...
java
public void printInterceptorChain(InterceptorChain chain) { Iterator<Interceptor<? extends Message>> it = chain.iterator(); String phase = ""; StringBuilder builder = null; while (it.hasNext()) { Interceptor<? extends Message> interceptor = it.next(); if (intercep...
[ "public", "void", "printInterceptorChain", "(", "InterceptorChain", "chain", ")", "{", "Iterator", "<", "Interceptor", "<", "?", "extends", "Message", ">", ">", "it", "=", "chain", ".", "iterator", "(", ")", ";", "String", "phase", "=", "\"\"", ";", "Strin...
Prints out the interceptor chain in a format that is easy to read. It also filters out instances of the DemoInterceptor so you can see what the chain would look like in a normal invokation. @param chain
[ "Prints", "out", "the", "interceptor", "chain", "in", "a", "format", "that", "is", "easy", "to", "read", ".", "It", "also", "filters", "out", "instances", "of", "the", "DemoInterceptor", "so", "you", "can", "see", "what", "the", "chain", "would", "look", ...
0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/examples/cxf/interceptors/common/src/main/java/demo/interceptors/interceptor/DemoInterceptor.java#L117-L150
160,350
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/LocationApi.java
LocationApi.getCharactersCharacterIdShipCall
public com.squareup.okhttp.Call getCharactersCharacterIdShipCall(Integer characterId, String datasource, String ifNoneMatch, String token, final ApiCallback callback) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath =...
java
public com.squareup.okhttp.Call getCharactersCharacterIdShipCall(Integer characterId, String datasource, String ifNoneMatch, String token, final ApiCallback callback) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath =...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "getCharactersCharacterIdShipCall", "(", "Integer", "characterId", ",", "String", "datasource", ",", "String", "ifNoneMatch", ",", "String", "token", ",", "final", "ApiCallback", "callback", ")", "throw...
Build call for getCharactersCharacterIdShip @param characterId An EVE character ID (required) @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches the current ETag (optional) @param token Ac...
[ "Build", "call", "for", "getCharactersCharacterIdShip" ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/LocationApi.java#L409-L448
160,351
burberius/eve-esi
src/main/java/net/troja/eve/esi/auth/OAuth.java
OAuth.getAuthorizationUri
public String getAuthorizationUri(final String redirectUri, final Set<String> scopes, final String state) { if (account == null) throw new IllegalArgumentException("Auth is not set"); if (account.getClientId() == null) throw new IllegalArgumentException("client_id is not set"); ...
java
public String getAuthorizationUri(final String redirectUri, final Set<String> scopes, final String state) { if (account == null) throw new IllegalArgumentException("Auth is not set"); if (account.getClientId() == null) throw new IllegalArgumentException("client_id is not set"); ...
[ "public", "String", "getAuthorizationUri", "(", "final", "String", "redirectUri", ",", "final", "Set", "<", "String", ">", "scopes", ",", "final", "String", "state", ")", "{", "if", "(", "account", "==", "null", ")", "throw", "new", "IllegalArgumentException",...
Get the authorization uri, where the user logs in. @param redirectUri Uri the user is redirected to, after successful authorization. This must be the same as specified at the Eve Online developer page. @param scopes Scopes of the Eve Online SSO. @param state This should be some secret to prevent XRSF, please read: htt...
[ "Get", "the", "authorization", "uri", "where", "the", "user", "logs", "in", "." ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/auth/OAuth.java#L163-L186
160,352
burberius/eve-esi
src/main/java/net/troja/eve/esi/auth/OAuth.java
OAuth.finishFlow
public void finishFlow(final String code, final String state) throws ApiException { if (account == null) throw new IllegalArgumentException("Auth is not set"); if (codeVerifier == null) throw new IllegalArgumentException("code_verifier is not set"); if (account.getClientI...
java
public void finishFlow(final String code, final String state) throws ApiException { if (account == null) throw new IllegalArgumentException("Auth is not set"); if (codeVerifier == null) throw new IllegalArgumentException("code_verifier is not set"); if (account.getClientI...
[ "public", "void", "finishFlow", "(", "final", "String", "code", ",", "final", "String", "state", ")", "throws", "ApiException", "{", "if", "(", "account", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Auth is not set\"", ")", ";", "if"...
Finish the oauth flow after the user was redirected back. @param code Code returned by the Eve Online SSO @param state This should be some secret to prevent XRSF see getAuthorizationUri @throws net.troja.eve.esi.ApiException
[ "Finish", "the", "oauth", "flow", "after", "the", "user", "was", "redirected", "back", "." ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/auth/OAuth.java#L198-L215
160,353
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/MetaApi.java
MetaApi.getPingWithHttpInfo
public ApiResponse<String> getPingWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = getPingValidateBeforeCall(null); Type localVarReturnType = new TypeToken<String>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
java
public ApiResponse<String> getPingWithHttpInfo() throws ApiException { com.squareup.okhttp.Call call = getPingValidateBeforeCall(null); Type localVarReturnType = new TypeToken<String>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
[ "public", "ApiResponse", "<", "String", ">", "getPingWithHttpInfo", "(", ")", "throws", "ApiException", "{", "com", ".", "squareup", ".", "okhttp", ".", "Call", "call", "=", "getPingValidateBeforeCall", "(", "null", ")", ";", "Type", "localVarReturnType", "=", ...
Ping route Ping the ESI routers @return ApiResponse&lt;String&gt; @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Ping", "route", "Ping", "the", "ESI", "routers" ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/MetaApi.java#L218-L223
160,354
burberius/eve-esi
src/main/java/net/troja/eve/esi/ApiClient.java
ApiClient.setHttpClient
public ApiClient setHttpClient(OkHttpClient newHttpClient) { if (!httpClient.equals(newHttpClient)) { newHttpClient.networkInterceptors().addAll(httpClient.networkInterceptors()); httpClient.networkInterceptors().clear(); newHttpClient.interceptors().addAll(httpClient.interce...
java
public ApiClient setHttpClient(OkHttpClient newHttpClient) { if (!httpClient.equals(newHttpClient)) { newHttpClient.networkInterceptors().addAll(httpClient.networkInterceptors()); httpClient.networkInterceptors().clear(); newHttpClient.interceptors().addAll(httpClient.interce...
[ "public", "ApiClient", "setHttpClient", "(", "OkHttpClient", "newHttpClient", ")", "{", "if", "(", "!", "httpClient", ".", "equals", "(", "newHttpClient", ")", ")", "{", "newHttpClient", ".", "networkInterceptors", "(", ")", ".", "addAll", "(", "httpClient", "...
Set HTTP client @param httpClient An instance of OkHttpClient @return Api Client
[ "Set", "HTTP", "client" ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/ApiClient.java#L174-L183
160,355
burberius/eve-esi
src/main/java/net/troja/eve/esi/ApiClient.java
ApiClient.addProgressInterceptor
private void addProgressInterceptor() { httpClient.networkInterceptors().add(new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { final Request request = chain.request(); final Response originalResponse = ch...
java
private void addProgressInterceptor() { httpClient.networkInterceptors().add(new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { final Request request = chain.request(); final Response originalResponse = ch...
[ "private", "void", "addProgressInterceptor", "(", ")", "{", "httpClient", ".", "networkInterceptors", "(", ")", ".", "add", "(", "new", "Interceptor", "(", ")", "{", "@", "Override", "public", "Response", "intercept", "(", "Interceptor", ".", "Chain", "chain",...
Add network interceptor to httpClient to track download progress for async requests.
[ "Add", "network", "interceptor", "to", "httpClient", "to", "track", "download", "progress", "for", "async", "requests", "." ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/ApiClient.java#L1318-L1332
160,356
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/UserInterfaceApi.java
UserInterfaceApi.postUiAutopilotWaypointCall
public com.squareup.okhttp.Call postUiAutopilotWaypointCall(Boolean addToBeginning, Boolean clearOtherWaypoints, Long destinationId, String datasource, String token, final ApiCallback callback) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables ...
java
public com.squareup.okhttp.Call postUiAutopilotWaypointCall(Boolean addToBeginning, Boolean clearOtherWaypoints, Long destinationId, String datasource, String token, final ApiCallback callback) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables ...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postUiAutopilotWaypointCall", "(", "Boolean", "addToBeginning", ",", "Boolean", "clearOtherWaypoints", ",", "Long", "destinationId", ",", "String", "datasource", ",", "String", "token", ",", "final", "...
Build call for postUiAutopilotWaypoint @param addToBeginning Whether this solar system should be added to the beginning of all waypoints (required) @param clearOtherWaypoints Whether clean other waypoints beforing adding this one (required) @param destinationId The destination to travel to, can be solar system, statio...
[ "Build", "call", "for", "postUiAutopilotWaypoint" ]
24a941c592cfc15f23471ef849b282fbc582ca13
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/UserInterfaceApi.java#L77-L125
160,357
lsjwzh/MaterialLoadingProgressBar
materialloadingprogressbar/src/main/java/com/lsjwzh/widget/materialloadingprogressbar/CircleProgressBar.java
CircleProgressBar.setColorSchemeResources
public void setColorSchemeResources(int... colorResIds) { final Resources res = getResources(); int[] colorRes = new int[colorResIds.length]; for (int i = 0; i < colorResIds.length; i++) { colorRes[i] = res.getColor(colorResIds[i]); } setColorSchemeColors(colorRes); ...
java
public void setColorSchemeResources(int... colorResIds) { final Resources res = getResources(); int[] colorRes = new int[colorResIds.length]; for (int i = 0; i < colorResIds.length; i++) { colorRes[i] = res.getColor(colorResIds[i]); } setColorSchemeColors(colorRes); ...
[ "public", "void", "setColorSchemeResources", "(", "int", "...", "colorResIds", ")", "{", "final", "Resources", "res", "=", "getResources", "(", ")", ";", "int", "[", "]", "colorRes", "=", "new", "int", "[", "colorResIds", ".", "length", "]", ";", "for", ...
Set the color resources used in the progress animation from color resources. The first color will also be the color of the bar that grows in response to a user swipe gesture. @param colorResIds
[ "Set", "the", "color", "resources", "used", "in", "the", "progress", "animation", "from", "color", "resources", ".", "The", "first", "color", "will", "also", "be", "the", "color", "of", "the", "bar", "that", "grows", "in", "response", "to", "a", "user", ...
170ae71d5d4f31fdd0a46a1dba9a60cb1361c656
https://github.com/lsjwzh/MaterialLoadingProgressBar/blob/170ae71d5d4f31fdd0a46a1dba9a60cb1361c656/materialloadingprogressbar/src/main/java/com/lsjwzh/widget/materialloadingprogressbar/CircleProgressBar.java#L288-L295
160,358
lsjwzh/MaterialLoadingProgressBar
materialloadingprogressbar/src/main/java/com/lsjwzh/widget/materialloadingprogressbar/CircleProgressBar.java
CircleProgressBar.setBackgroundColor
public void setBackgroundColor(int colorRes) { if (getBackground() instanceof ShapeDrawable) { final Resources res = getResources(); ((ShapeDrawable) getBackground()).getPaint().setColor(res.getColor(colorRes)); } }
java
public void setBackgroundColor(int colorRes) { if (getBackground() instanceof ShapeDrawable) { final Resources res = getResources(); ((ShapeDrawable) getBackground()).getPaint().setColor(res.getColor(colorRes)); } }
[ "public", "void", "setBackgroundColor", "(", "int", "colorRes", ")", "{", "if", "(", "getBackground", "(", ")", "instanceof", "ShapeDrawable", ")", "{", "final", "Resources", "res", "=", "getResources", "(", ")", ";", "(", "(", "ShapeDrawable", ")", "getBack...
Update the background color of the mBgCircle image view.
[ "Update", "the", "background", "color", "of", "the", "mBgCircle", "image", "view", "." ]
170ae71d5d4f31fdd0a46a1dba9a60cb1361c656
https://github.com/lsjwzh/MaterialLoadingProgressBar/blob/170ae71d5d4f31fdd0a46a1dba9a60cb1361c656/materialloadingprogressbar/src/main/java/com/lsjwzh/widget/materialloadingprogressbar/CircleProgressBar.java#L314-L319
160,359
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/DataBarExpanded.java
DataBarExpanded.logBinaryStringInfo
private void logBinaryStringInfo(StringBuilder binaryString) { encodeInfo += "Binary Length: " + binaryString.length() + "\n"; encodeInfo += "Binary String: "; int nibble = 0; for (int i = 0; i < binaryString.length(); i++) { switch (i % 4) { case 0: ...
java
private void logBinaryStringInfo(StringBuilder binaryString) { encodeInfo += "Binary Length: " + binaryString.length() + "\n"; encodeInfo += "Binary String: "; int nibble = 0; for (int i = 0; i < binaryString.length(); i++) { switch (i % 4) { case 0: ...
[ "private", "void", "logBinaryStringInfo", "(", "StringBuilder", "binaryString", ")", "{", "encodeInfo", "+=", "\"Binary Length: \"", "+", "binaryString", ".", "length", "(", ")", "+", "\"\\n\"", ";", "encodeInfo", "+=", "\"Binary String: \"", ";", "int", "nibble", ...
Logs binary string as hexadecimal
[ "Logs", "binary", "string", "as", "hexadecimal" ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/DataBarExpanded.java#L1330-L1368
160,360
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Code128.java
Code128.combineSubsetBlocks
private int combineSubsetBlocks(Mode[] mode_type, int[] mode_length, int index_point) { /* bring together same type blocks */ if (index_point > 1) { for (int i = 1; i < index_point; i++) { if (mode_type[i - 1] == mode_type[i]) { /* bring together */ ...
java
private int combineSubsetBlocks(Mode[] mode_type, int[] mode_length, int index_point) { /* bring together same type blocks */ if (index_point > 1) { for (int i = 1; i < index_point; i++) { if (mode_type[i - 1] == mode_type[i]) { /* bring together */ ...
[ "private", "int", "combineSubsetBlocks", "(", "Mode", "[", "]", "mode_type", ",", "int", "[", "]", "mode_length", ",", "int", "index_point", ")", "{", "/* bring together same type blocks */", "if", "(", "index_point", ">", "1", ")", "{", "for", "(", "int", "...
Modifies the specified mode and length arrays to combine adjacent modes of the same type, returning the updated index point.
[ "Modifies", "the", "specified", "mode", "and", "length", "arrays", "to", "combine", "adjacent", "modes", "of", "the", "same", "type", "returning", "the", "updated", "index", "point", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Code128.java#L818-L836
160,361
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/OkapiBarcode.java
OkapiBarcode.main
public static void main(String[] args) { Settings settings = new Settings(); new JCommander(settings, args); if (!settings.isGuiSupressed()) { OkapiUI okapiUi = new OkapiUI(); okapiUi.setVisible(true); } else { int returnValue; ...
java
public static void main(String[] args) { Settings settings = new Settings(); new JCommander(settings, args); if (!settings.isGuiSupressed()) { OkapiUI okapiUi = new OkapiUI(); okapiUi.setVisible(true); } else { int returnValue; ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "{", "Settings", "settings", "=", "new", "Settings", "(", ")", ";", "new", "JCommander", "(", "settings", ",", "args", ")", ";", "if", "(", "!", "settings", ".", "isGuiSupressed"...
Starts the Okapi Barcode UI. @param args the command line arguments
[ "Starts", "the", "Okapi", "Barcode", "UI", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/OkapiBarcode.java#L41-L57
160,362
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
MaxiCode.getPrimaryCodewords
private int[] getPrimaryCodewords() { assert mode == 2 || mode == 3; if (primaryData.length() != 15) { throw new OkapiException("Invalid Primary String"); } for (int i = 9; i < 15; i++) { /* check that country code and service are numeric */ if (primar...
java
private int[] getPrimaryCodewords() { assert mode == 2 || mode == 3; if (primaryData.length() != 15) { throw new OkapiException("Invalid Primary String"); } for (int i = 9; i < 15; i++) { /* check that country code and service are numeric */ if (primar...
[ "private", "int", "[", "]", "getPrimaryCodewords", "(", ")", "{", "assert", "mode", "==", "2", "||", "mode", "==", "3", ";", "if", "(", "primaryData", ".", "length", "(", ")", "!=", "15", ")", "{", "throw", "new", "OkapiException", "(", "\"Invalid Prim...
Extracts the postal code, country code and service code from the primary data and returns the corresponding primary message codewords. @return the primary message codewords
[ "Extracts", "the", "postal", "code", "country", "code", "and", "service", "code", "from", "the", "primary", "data", "and", "returns", "the", "corresponding", "primary", "message", "codewords", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/MaxiCode.java#L389-L430
160,363
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
MaxiCode.getMode2PrimaryCodewords
private static int[] getMode2PrimaryCodewords(String postcode, int country, int service) { for (int i = 0; i < postcode.length(); i++) { if (postcode.charAt(i) < '0' || postcode.charAt(i) > '9') { postcode = postcode.substring(0, i); break; } ...
java
private static int[] getMode2PrimaryCodewords(String postcode, int country, int service) { for (int i = 0; i < postcode.length(); i++) { if (postcode.charAt(i) < '0' || postcode.charAt(i) > '9') { postcode = postcode.substring(0, i); break; } ...
[ "private", "static", "int", "[", "]", "getMode2PrimaryCodewords", "(", "String", "postcode", ",", "int", "country", ",", "int", "service", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "postcode", ".", "length", "(", ")", ";", "i", "++",...
Returns the primary message codewords for mode 2. @param postcode the postal code @param country the country code @param service the service code @return the primary message, as codewords
[ "Returns", "the", "primary", "message", "codewords", "for", "mode", "2", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/MaxiCode.java#L440-L464
160,364
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
MaxiCode.getMode3PrimaryCodewords
private static int[] getMode3PrimaryCodewords(String postcode, int country, int service) { int[] postcodeNums = new int[postcode.length()]; postcode = postcode.toUpperCase(); for (int i = 0; i < postcodeNums.length; i++) { postcodeNums[i] = postcode.charAt(i); if...
java
private static int[] getMode3PrimaryCodewords(String postcode, int country, int service) { int[] postcodeNums = new int[postcode.length()]; postcode = postcode.toUpperCase(); for (int i = 0; i < postcodeNums.length; i++) { postcodeNums[i] = postcode.charAt(i); if...
[ "private", "static", "int", "[", "]", "getMode3PrimaryCodewords", "(", "String", "postcode", ",", "int", "country", ",", "int", "service", ")", "{", "int", "[", "]", "postcodeNums", "=", "new", "int", "[", "postcode", ".", "length", "(", ")", "]", ";", ...
Returns the primary message codewords for mode 3. @param postcode the postal code @param country the country code @param service the service code @return the primary message, as codewords
[ "Returns", "the", "primary", "message", "codewords", "for", "mode", "3", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/MaxiCode.java#L474-L506
160,365
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
MaxiCode.bestSurroundingSet
private int bestSurroundingSet(int index, int length, int... valid) { int option1 = set[index - 1]; if (index + 1 < length) { // we have two options to check int option2 = set[index + 1]; if (contains(valid, option1) && contains(valid, option2)) { ...
java
private int bestSurroundingSet(int index, int length, int... valid) { int option1 = set[index - 1]; if (index + 1 < length) { // we have two options to check int option2 = set[index + 1]; if (contains(valid, option1) && contains(valid, option2)) { ...
[ "private", "int", "bestSurroundingSet", "(", "int", "index", ",", "int", "length", ",", "int", "...", "valid", ")", "{", "int", "option1", "=", "set", "[", "index", "-", "1", "]", ";", "if", "(", "index", "+", "1", "<", "length", ")", "{", "// we h...
Guesses the best set to use at the specified index by looking at the surrounding sets. In general, characters in lower-numbered sets are more common, so we choose them if we can. If no good surrounding sets can be found, the default value returned is the first value from the valid set. @param index the current index @...
[ "Guesses", "the", "best", "set", "to", "use", "at", "the", "specified", "index", "by", "looking", "at", "the", "surrounding", "sets", ".", "In", "general", "characters", "in", "lower", "-", "numbered", "sets", "are", "more", "common", "so", "we", "choose",...
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/MaxiCode.java#L828-L850
160,366
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
MaxiCode.insert
private void insert(int position, int c) { for (int i = 143; i > position; i--) { set[i] = set[i - 1]; character[i] = character[i - 1]; } character[position] = c; }
java
private void insert(int position, int c) { for (int i = 143; i > position; i--) { set[i] = set[i - 1]; character[i] = character[i - 1]; } character[position] = c; }
[ "private", "void", "insert", "(", "int", "position", ",", "int", "c", ")", "{", "for", "(", "int", "i", "=", "143", ";", "i", ">", "position", ";", "i", "--", ")", "{", "set", "[", "i", "]", "=", "set", "[", "i", "-", "1", "]", ";", "charac...
Moves everything up so that the specified shift or latch character can be inserted. @param position the position beyond which everything needs to be shifted @param c the latch or shift character to insert at the specified position, after everything has been shifted
[ "Moves", "everything", "up", "so", "that", "the", "specified", "shift", "or", "latch", "character", "can", "be", "inserted", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/MaxiCode.java#L858-L864
160,367
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/MaxiCode.java
MaxiCode.getErrorCorrection
private static int[] getErrorCorrection(int[] codewords, int ecclen) { ReedSolomon rs = new ReedSolomon(); rs.init_gf(0x43); rs.init_code(ecclen, 1); rs.encode(codewords.length, codewords); int[] results = new int[ecclen]; for (int i = 0; i < ecclen; i++) { ...
java
private static int[] getErrorCorrection(int[] codewords, int ecclen) { ReedSolomon rs = new ReedSolomon(); rs.init_gf(0x43); rs.init_code(ecclen, 1); rs.encode(codewords.length, codewords); int[] results = new int[ecclen]; for (int i = 0; i < ecclen; i++) { ...
[ "private", "static", "int", "[", "]", "getErrorCorrection", "(", "int", "[", "]", "codewords", ",", "int", "ecclen", ")", "{", "ReedSolomon", "rs", "=", "new", "ReedSolomon", "(", ")", ";", "rs", ".", "init_gf", "(", "0x43", ")", ";", "rs", ".", "ini...
Returns the error correction codewords for the specified data codewords. @param codewords the codewords that we need error correction codewords for @param ecclen the number of error correction codewords needed @return the error correction codewords for the specified data codewords
[ "Returns", "the", "error", "correction", "codewords", "for", "the", "specified", "data", "codewords", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/MaxiCode.java#L873-L886
160,368
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/AztecCode.java
AztecCode.setStructuredAppendMessageId
public void setStructuredAppendMessageId(String messageId) { if (messageId != null && !messageId.matches("^[\\x21-\\x7F]+$")) { throw new IllegalArgumentException("Invalid Aztec Code structured append message ID: " + messageId); } this.structuredAppendMessageId = messageId; ...
java
public void setStructuredAppendMessageId(String messageId) { if (messageId != null && !messageId.matches("^[\\x21-\\x7F]+$")) { throw new IllegalArgumentException("Invalid Aztec Code structured append message ID: " + messageId); } this.structuredAppendMessageId = messageId; ...
[ "public", "void", "setStructuredAppendMessageId", "(", "String", "messageId", ")", "{", "if", "(", "messageId", "!=", "null", "&&", "!", "messageId", ".", "matches", "(", "\"^[\\\\x21-\\\\x7F]+$\"", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
If this Aztec Code symbol is part of a series of Aztec Code symbols appended in a structured format, this method sets the unique message ID for the series. Values may not contain spaces and must contain only printable ASCII characters. Message IDs are optional. @param messageId the unique message ID for the series tha...
[ "If", "this", "Aztec", "Code", "symbol", "is", "part", "of", "a", "series", "of", "Aztec", "Code", "symbols", "appended", "in", "a", "structured", "format", "this", "method", "sets", "the", "unique", "message", "ID", "for", "the", "series", ".", "Values", ...
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/AztecCode.java#L472-L477
160,369
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/AztecCode.java
AztecCode.addErrorCorrection
private void addErrorCorrection(StringBuilder adjustedString, int codewordSize, int dataBlocks, int eccBlocks) { int x, poly, startWeight; /* Split into codewords and calculate Reed-Solomon error correction codes */ switch (codewordSize) { case 6: x = 32; ...
java
private void addErrorCorrection(StringBuilder adjustedString, int codewordSize, int dataBlocks, int eccBlocks) { int x, poly, startWeight; /* Split into codewords and calculate Reed-Solomon error correction codes */ switch (codewordSize) { case 6: x = 32; ...
[ "private", "void", "addErrorCorrection", "(", "StringBuilder", "adjustedString", ",", "int", "codewordSize", ",", "int", "dataBlocks", ",", "int", "eccBlocks", ")", "{", "int", "x", ",", "poly", ",", "startWeight", ";", "/* Split into codewords and calculate Reed-Solo...
Adds error correction data to the specified binary string, which already contains the primary data
[ "Adds", "error", "correction", "data", "to", "the", "specified", "binary", "string", "which", "already", "contains", "the", "primary", "data" ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/AztecCode.java#L1698-L1757
160,370
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/output/ExtendedOutputStreamWriter.java
ExtendedOutputStreamWriter.append
public ExtendedOutputStreamWriter append(double d) throws IOException { super.append(String.format(Locale.ROOT, doubleFormat, d)); return this; }
java
public ExtendedOutputStreamWriter append(double d) throws IOException { super.append(String.format(Locale.ROOT, doubleFormat, d)); return this; }
[ "public", "ExtendedOutputStreamWriter", "append", "(", "double", "d", ")", "throws", "IOException", "{", "super", ".", "append", "(", "String", ".", "format", "(", "Locale", ".", "ROOT", ",", "doubleFormat", ",", "d", ")", ")", ";", "return", "this", ";", ...
Writes the specified double to the stream, formatted according to the format specified in the constructor. @param d the double to write to the stream @return this writer @throws IOException if an I/O error occurs
[ "Writes", "the", "specified", "double", "to", "the", "stream", "formatted", "according", "to", "the", "format", "specified", "in", "the", "constructor", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/output/ExtendedOutputStreamWriter.java#L65-L68
160,371
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/util/Arrays.java
Arrays.positionOf
public static int positionOf(char value, char[] array) { for (int i = 0; i < array.length; i++) { if (value == array[i]) { return i; } } throw new OkapiException("Unable to find character '" + value + "' in character array."); }
java
public static int positionOf(char value, char[] array) { for (int i = 0; i < array.length; i++) { if (value == array[i]) { return i; } } throw new OkapiException("Unable to find character '" + value + "' in character array."); }
[ "public", "static", "int", "positionOf", "(", "char", "value", ",", "char", "[", "]", "array", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "value", "==", "array", "[", ...
Returns the position of the specified value in the specified array. @param value the value to search for @param array the array to search in @return the position of the specified value in the specified array
[ "Returns", "the", "position", "of", "the", "specified", "value", "in", "the", "specified", "array", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/util/Arrays.java#L39-L46
160,372
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/util/Arrays.java
Arrays.insertArray
public static int[] insertArray(int[] original, int index, int[] inserted) { int[] modified = new int[original.length + inserted.length]; System.arraycopy(original, 0, modified, 0, index); System.arraycopy(inserted, 0, modified, index, inserted.length); System.arraycopy(original, index, ...
java
public static int[] insertArray(int[] original, int index, int[] inserted) { int[] modified = new int[original.length + inserted.length]; System.arraycopy(original, 0, modified, 0, index); System.arraycopy(inserted, 0, modified, index, inserted.length); System.arraycopy(original, index, ...
[ "public", "static", "int", "[", "]", "insertArray", "(", "int", "[", "]", "original", ",", "int", "index", ",", "int", "[", "]", "inserted", ")", "{", "int", "[", "]", "modified", "=", "new", "int", "[", "original", ".", "length", "+", "inserted", ...
Inserts the specified array into the specified original array at the specified index. @param original the original array into which we want to insert another array @param index the index at which we want to insert the array @param inserted the array that we want to insert @return the combined array
[ "Inserts", "the", "specified", "array", "into", "the", "specified", "original", "array", "at", "the", "specified", "index", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/util/Arrays.java#L105-L111
160,373
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/QrCode.java
QrCode.getBinaryLength
private static int getBinaryLength(int version, QrMode[] inputModeUnoptimized, int[] inputData, boolean gs1, int eciMode) { int i, j; QrMode currentMode; int inputLength = inputModeUnoptimized.length; int count = 0; int alphaLength; int percent = 0; // ZINT NOTE...
java
private static int getBinaryLength(int version, QrMode[] inputModeUnoptimized, int[] inputData, boolean gs1, int eciMode) { int i, j; QrMode currentMode; int inputLength = inputModeUnoptimized.length; int count = 0; int alphaLength; int percent = 0; // ZINT NOTE...
[ "private", "static", "int", "getBinaryLength", "(", "int", "version", ",", "QrMode", "[", "]", "inputModeUnoptimized", ",", "int", "[", "]", "inputData", ",", "boolean", "gs1", ",", "int", "eciMode", ")", "{", "int", "i", ",", "j", ";", "QrMode", "curren...
Calculate the actual bit length of the proposed binary string.
[ "Calculate", "the", "actual", "bit", "length", "of", "the", "proposed", "binary", "string", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/QrCode.java#L556-L642
160,374
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/QrCode.java
QrCode.blockLength
private static int blockLength(int start, QrMode[] inputMode) { QrMode mode = inputMode[start]; int count = 0; int i = start; do { count++; } while (((i + count) < inputMode.length) && (inputMode[i + count] == mode)); return count; }
java
private static int blockLength(int start, QrMode[] inputMode) { QrMode mode = inputMode[start]; int count = 0; int i = start; do { count++; } while (((i + count) < inputMode.length) && (inputMode[i + count] == mode)); return count; }
[ "private", "static", "int", "blockLength", "(", "int", "start", ",", "QrMode", "[", "]", "inputMode", ")", "{", "QrMode", "mode", "=", "inputMode", "[", "start", "]", ";", "int", "count", "=", "0", ";", "int", "i", "=", "start", ";", "do", "{", "co...
Find the length of the block starting from 'start'.
[ "Find", "the", "length", "of", "the", "block", "starting", "from", "start", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/QrCode.java#L760-L771
160,375
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/QrCode.java
QrCode.tribus
private static int tribus(int version, int a, int b, int c) { if (version < 10) { return a; } else if (version >= 10 && version <= 26) { return b; } else { return c; } }
java
private static int tribus(int version, int a, int b, int c) { if (version < 10) { return a; } else if (version >= 10 && version <= 26) { return b; } else { return c; } }
[ "private", "static", "int", "tribus", "(", "int", "version", ",", "int", "a", ",", "int", "b", ",", "int", "c", ")", "{", "if", "(", "version", "<", "10", ")", "{", "return", "a", ";", "}", "else", "if", "(", "version", ">=", "10", "&&", "versi...
Choose from three numbers based on version.
[ "Choose", "from", "three", "numbers", "based", "on", "version", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/QrCode.java#L774-L782
160,376
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/QrCode.java
QrCode.addEcc
private static void addEcc(int[] fullstream, int[] datastream, int version, int data_cw, int blocks) { int ecc_cw = QR_TOTAL_CODEWORDS[version - 1] - data_cw; int short_data_block_length = data_cw / blocks; int qty_long_blocks = data_cw % blocks; int qty_short_blocks = blocks - qty_long...
java
private static void addEcc(int[] fullstream, int[] datastream, int version, int data_cw, int blocks) { int ecc_cw = QR_TOTAL_CODEWORDS[version - 1] - data_cw; int short_data_block_length = data_cw / blocks; int qty_long_blocks = data_cw % blocks; int qty_short_blocks = blocks - qty_long...
[ "private", "static", "void", "addEcc", "(", "int", "[", "]", "fullstream", ",", "int", "[", "]", "datastream", ",", "int", "version", ",", "int", "data_cw", ",", "int", "blocks", ")", "{", "int", "ecc_cw", "=", "QR_TOTAL_CODEWORDS", "[", "version", "-", ...
Splits data into blocks, adds error correction and then interleaves the blocks and error correction data.
[ "Splits", "data", "into", "blocks", "adds", "error", "correction", "and", "then", "interleaves", "the", "blocks", "and", "error", "correction", "data", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/QrCode.java#L1047-L1108
160,377
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/QrCode.java
QrCode.addFormatInfoEval
private static void addFormatInfoEval(byte[] eval, int size, EccLevel ecc_level, int pattern) { int format = pattern; int seq; int i; switch(ecc_level) { case L: format += 0x08; break; case Q: format += 0x18; break; case H: format += 0x10; break; ...
java
private static void addFormatInfoEval(byte[] eval, int size, EccLevel ecc_level, int pattern) { int format = pattern; int seq; int i; switch(ecc_level) { case L: format += 0x08; break; case Q: format += 0x18; break; case H: format += 0x10; break; ...
[ "private", "static", "void", "addFormatInfoEval", "(", "byte", "[", "]", "eval", ",", "int", "size", ",", "EccLevel", "ecc_level", ",", "int", "pattern", ")", "{", "int", "format", "=", "pattern", ";", "int", "seq", ";", "int", "i", ";", "switch", "(",...
Adds format information to eval.
[ "Adds", "format", "information", "to", "eval", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/QrCode.java#L1379-L1412
160,378
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/QrCode.java
QrCode.addVersionInfo
private static void addVersionInfo(byte[] grid, int size, int version) { // TODO: Zint masks with 0x41 instead of 0x01; which is correct? https://sourceforge.net/p/zint/tickets/110/ long version_data = QR_ANNEX_D[version - 7]; for (int i = 0; i < 6; i++) { grid[((size - 11) * size) +...
java
private static void addVersionInfo(byte[] grid, int size, int version) { // TODO: Zint masks with 0x41 instead of 0x01; which is correct? https://sourceforge.net/p/zint/tickets/110/ long version_data = QR_ANNEX_D[version - 7]; for (int i = 0; i < 6; i++) { grid[((size - 11) * size) +...
[ "private", "static", "void", "addVersionInfo", "(", "byte", "[", "]", "grid", ",", "int", "size", ",", "int", "version", ")", "{", "// TODO: Zint masks with 0x41 instead of 0x01; which is correct? https://sourceforge.net/p/zint/tickets/110/", "long", "version_data", "=", "Q...
Adds version information.
[ "Adds", "version", "information", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/QrCode.java#L1645-L1656
160,379
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Pdf417.java
Pdf417.createBlocks
private static List< Block > createBlocks(int[] data, boolean debug) { List< Block > blocks = new ArrayList<>(); Block current = null; for (int i = 0; i < data.length; i++) { EncodingMode mode = chooseMode(data[i]); if ((current != null && current.mode == mode) &...
java
private static List< Block > createBlocks(int[] data, boolean debug) { List< Block > blocks = new ArrayList<>(); Block current = null; for (int i = 0; i < data.length; i++) { EncodingMode mode = chooseMode(data[i]); if ((current != null && current.mode == mode) &...
[ "private", "static", "List", "<", "Block", ">", "createBlocks", "(", "int", "[", "]", "data", ",", "boolean", "debug", ")", "{", "List", "<", "Block", ">", "blocks", "=", "new", "ArrayList", "<>", "(", ")", ";", "Block", "current", "=", "null", ";", ...
Determines the encoding block groups for the specified data.
[ "Determines", "the", "encoding", "block", "groups", "for", "the", "specified", "data", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Pdf417.java#L1294-L1321
160,380
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Pdf417.java
Pdf417.mergeBlocks
private static void mergeBlocks(List< Block > blocks) { for (int i = 1; i < blocks.size(); i++) { Block b1 = blocks.get(i - 1); Block b2 = blocks.get(i); if ((b1.mode == b2.mode) && (b1.mode != EncodingMode.NUM || b1.length + b2.length <= MAX_NUMERIC_COMP...
java
private static void mergeBlocks(List< Block > blocks) { for (int i = 1; i < blocks.size(); i++) { Block b1 = blocks.get(i - 1); Block b2 = blocks.get(i); if ((b1.mode == b2.mode) && (b1.mode != EncodingMode.NUM || b1.length + b2.length <= MAX_NUMERIC_COMP...
[ "private", "static", "void", "mergeBlocks", "(", "List", "<", "Block", ">", "blocks", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<", "blocks", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Block", "b1", "=", "blocks", ".", "get"...
Combines adjacent blocks of the same type.
[ "Combines", "adjacent", "blocks", "of", "the", "same", "type", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Pdf417.java#L1386-L1397
160,381
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Symbol.java
Symbol.eciProcess
protected void eciProcess() { EciMode eci = EciMode.of(content, "ISO8859_1", 3) .or(content, "ISO8859_2", 4) .or(content, "ISO8859_3", 5) .or(content, "ISO8859_4", 6) .or(content, "IS...
java
protected void eciProcess() { EciMode eci = EciMode.of(content, "ISO8859_1", 3) .or(content, "ISO8859_2", 4) .or(content, "ISO8859_3", 5) .or(content, "ISO8859_4", 6) .or(content, "IS...
[ "protected", "void", "eciProcess", "(", ")", "{", "EciMode", "eci", "=", "EciMode", ".", "of", "(", "content", ",", "\"ISO8859_1\"", ",", "3", ")", ".", "or", "(", "content", ",", "\"ISO8859_2\"", ",", "4", ")", ".", "or", "(", "content", ",", "\"ISO...
Chooses the ECI mode most suitable for the content of this symbol.
[ "Chooses", "the", "ECI", "mode", "most", "suitable", "for", "the", "content", "of", "this", "symbol", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Symbol.java#L559-L592
160,382
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Symbol.java
Symbol.mergeVerticalBlocks
protected void mergeVerticalBlocks() { for(int i = 0; i < rectangles.size() - 1; i++) { for(int j = i + 1; j < rectangles.size(); j++) { Rectangle2D.Double firstRect = rectangles.get(i); Rectangle2D.Double secondRect = rectangles.get(j); if (roughlyEqu...
java
protected void mergeVerticalBlocks() { for(int i = 0; i < rectangles.size() - 1; i++) { for(int j = i + 1; j < rectangles.size(); j++) { Rectangle2D.Double firstRect = rectangles.get(i); Rectangle2D.Double secondRect = rectangles.get(j); if (roughlyEqu...
[ "protected", "void", "mergeVerticalBlocks", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "rectangles", ".", "size", "(", ")", "-", "1", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "i", "+", "1", ";", "j", "<", ...
Search for rectangles which have the same width and x position, and which join together vertically and merge them together to reduce the number of rectangles needed to describe a symbol.
[ "Search", "for", "rectangles", "which", "have", "the", "same", "width", "and", "x", "position", "and", "which", "join", "together", "vertically", "and", "merge", "them", "together", "to", "reduce", "the", "number", "of", "rectangles", "needed", "to", "describe...
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Symbol.java#L715-L729
160,383
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Symbol.java
Symbol.hibcProcess
private String hibcProcess(String source) { // HIBC 2.6 allows up to 110 characters, not including the "+" prefix or the check digit if (source.length() > 110) { throw new OkapiException("Data too long for HIBC LIC"); } source = source.toUpperCase(); if (!source.mat...
java
private String hibcProcess(String source) { // HIBC 2.6 allows up to 110 characters, not including the "+" prefix or the check digit if (source.length() > 110) { throw new OkapiException("Data too long for HIBC LIC"); } source = source.toUpperCase(); if (!source.mat...
[ "private", "String", "hibcProcess", "(", "String", "source", ")", "{", "// HIBC 2.6 allows up to 110 characters, not including the \"+\" prefix or the check digit", "if", "(", "source", ".", "length", "(", ")", ">", "110", ")", "{", "throw", "new", "OkapiException", "("...
Adds the HIBC prefix and check digit to the specified data, returning the resultant data string. @see <a href="https://sourceforge.net/p/zint/code/ci/master/tree/backend/library.c">Corresponding Zint code</a>
[ "Adds", "the", "HIBC", "prefix", "and", "check", "digit", "to", "the", "specified", "data", "returning", "the", "resultant", "data", "string", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Symbol.java#L736-L760
160,384
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Symbol.java
Symbol.getPatternAsCodewords
protected int[] getPatternAsCodewords(int size) { if (size >= 10) { throw new IllegalArgumentException("Pattern groups of 10 or more digits are likely to be too large to parse as integers."); } if (pattern == null || pattern.length == 0) { return new int[0]; } els...
java
protected int[] getPatternAsCodewords(int size) { if (size >= 10) { throw new IllegalArgumentException("Pattern groups of 10 or more digits are likely to be too large to parse as integers."); } if (pattern == null || pattern.length == 0) { return new int[0]; } els...
[ "protected", "int", "[", "]", "getPatternAsCodewords", "(", "int", "size", ")", "{", "if", "(", "size", ">=", "10", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Pattern groups of 10 or more digits are likely to be too large to parse as integers.\"", ")", ...
Returns this bar code's pattern, converted into a set of corresponding codewords. Useful for bar codes that encode their content as a pattern. @param size the number of digits in each codeword @return this bar code's pattern, converted into a set of corresponding codewords
[ "Returns", "this", "bar", "code", "s", "pattern", "converted", "into", "a", "set", "of", "corresponding", "codewords", ".", "Useful", "for", "bar", "codes", "that", "encode", "their", "content", "as", "a", "pattern", "." ]
d1cb4f4ab64557cd3db64d9a473528a52ce58081
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/backend/Symbol.java#L779-L798
160,385
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.arcAngle
private static double arcAngle(Point center, Point a, Point b, Rect area, int radius) { double angle = threePointsAngle(center, a, b); Point innerPoint = findMidnormalPoint(center, a, b, area, radius); Point midInsectPoint = new Point((a.x + b.x) / 2, (a.y + b.y) / 2); double distance = ...
java
private static double arcAngle(Point center, Point a, Point b, Rect area, int radius) { double angle = threePointsAngle(center, a, b); Point innerPoint = findMidnormalPoint(center, a, b, area, radius); Point midInsectPoint = new Point((a.x + b.x) / 2, (a.y + b.y) / 2); double distance = ...
[ "private", "static", "double", "arcAngle", "(", "Point", "center", ",", "Point", "a", ",", "Point", "b", ",", "Rect", "area", ",", "int", "radius", ")", "{", "double", "angle", "=", "threePointsAngle", "(", "center", ",", "a", ",", "b", ")", ";", "Po...
calculate arc angle between point a and point b @param center @param a @param b @param area @param radius @return
[ "calculate", "arc", "angle", "between", "point", "a", "and", "point", "b" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L143-L152
160,386
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.findMidnormalPoint
private static Point findMidnormalPoint(Point center, Point a, Point b, Rect area, int radius) { if (a.y == b.y) { //top if (a.y < center.y) { return new Point((a.x + b.x) / 2, center.y + radius); } //bottom return new Point((a.x + b.x)...
java
private static Point findMidnormalPoint(Point center, Point a, Point b, Rect area, int radius) { if (a.y == b.y) { //top if (a.y < center.y) { return new Point((a.x + b.x) / 2, center.y + radius); } //bottom return new Point((a.x + b.x)...
[ "private", "static", "Point", "findMidnormalPoint", "(", "Point", "center", ",", "Point", "a", ",", "Point", "b", ",", "Rect", "area", ",", "int", "radius", ")", "{", "if", "(", "a", ".", "y", "==", "b", ".", "y", ")", "{", "//top", "if", "(", "a...
find the middle point of two intersect points in circle,only one point will be correct @param center @param a @param b @param area @param radius @return
[ "find", "the", "middle", "point", "of", "two", "intersect", "points", "in", "circle", "only", "one", "point", "will", "be", "correct" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L164-L194
160,387
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.inArea
public static boolean inArea(Point point, Rect area, float offsetRatio) { int offset = (int) (area.width() * offsetRatio); return point.x >= area.left - offset && point.x <= area.right + offset && point.y >= area.top - offset && point.y <= area.bottom + offset; }
java
public static boolean inArea(Point point, Rect area, float offsetRatio) { int offset = (int) (area.width() * offsetRatio); return point.x >= area.left - offset && point.x <= area.right + offset && point.y >= area.top - offset && point.y <= area.bottom + offset; }
[ "public", "static", "boolean", "inArea", "(", "Point", "point", ",", "Rect", "area", ",", "float", "offsetRatio", ")", "{", "int", "offset", "=", "(", "int", ")", "(", "area", ".", "width", "(", ")", "*", "offsetRatio", ")", ";", "return", "point", "...
judge if an point in the area or not @param point @param area @param offsetRatio @return
[ "judge", "if", "an", "point", "in", "the", "area", "or", "not" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L212-L216
160,388
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.threePointsAngle
private static double threePointsAngle(Point vertex, Point A, Point B) { double b = pointsDistance(vertex, A); double c = pointsDistance(A, B); double a = pointsDistance(B, vertex); return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b))); }
java
private static double threePointsAngle(Point vertex, Point A, Point B) { double b = pointsDistance(vertex, A); double c = pointsDistance(A, B); double a = pointsDistance(B, vertex); return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b))); }
[ "private", "static", "double", "threePointsAngle", "(", "Point", "vertex", ",", "Point", "A", ",", "Point", "B", ")", "{", "double", "b", "=", "pointsDistance", "(", "vertex", ",", "A", ")", ";", "double", "c", "=", "pointsDistance", "(", "A", ",", "B"...
calculate the point a's angle of rectangle consist of point a,point b, point c; @param vertex @param A @param B @return
[ "calculate", "the", "point", "a", "s", "angle", "of", "rectangle", "consist", "of", "point", "a", "point", "b", "point", "c", ";" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L226-L233
160,389
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.pointsDistance
private static double pointsDistance(Point a, Point b) { int dx = b.x - a.x; int dy = b.y - a.y; return Math.sqrt(dx * dx + dy * dy); }
java
private static double pointsDistance(Point a, Point b) { int dx = b.x - a.x; int dy = b.y - a.y; return Math.sqrt(dx * dx + dy * dy); }
[ "private", "static", "double", "pointsDistance", "(", "Point", "a", ",", "Point", "b", ")", "{", "int", "dx", "=", "b", ".", "x", "-", "a", ".", "x", ";", "int", "dy", "=", "b", ".", "y", "-", "a", ".", "y", ";", "return", "Math", ".", "sqrt"...
calculate distance of two points @param a @param b @return
[ "calculate", "distance", "of", "two", "points" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L242-L246
160,390
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.calculateMenuItemPosition
private void calculateMenuItemPosition() { float itemRadius = (expandedRadius + collapsedRadius) / 2, f; RectF area = new RectF( center.x - itemRadius, center.y - itemRadius, center.x + itemRadius, center.y + itemRadius); Path path...
java
private void calculateMenuItemPosition() { float itemRadius = (expandedRadius + collapsedRadius) / 2, f; RectF area = new RectF( center.x - itemRadius, center.y - itemRadius, center.x + itemRadius, center.y + itemRadius); Path path...
[ "private", "void", "calculateMenuItemPosition", "(", ")", "{", "float", "itemRadius", "=", "(", "expandedRadius", "+", "collapsedRadius", ")", "/", "2", ",", "f", ";", "RectF", "area", "=", "new", "RectF", "(", "center", ".", "x", "-", "itemRadius", ",", ...
calculate and set position to menu items
[ "calculate", "and", "set", "position", "to", "menu", "items" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L611-L633
160,391
linroid/FilterMenu
library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java
FilterMenuLayout.isClockwise
private boolean isClockwise(Point center, Point a, Point b) { double cross = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y); return cross > 0; }
java
private boolean isClockwise(Point center, Point a, Point b) { double cross = (a.x - center.x) * (b.y - center.y) - (b.x - center.x) * (a.y - center.y); return cross > 0; }
[ "private", "boolean", "isClockwise", "(", "Point", "center", ",", "Point", "a", ",", "Point", "b", ")", "{", "double", "cross", "=", "(", "a", ".", "x", "-", "center", ".", "x", ")", "*", "(", "b", ".", "y", "-", "center", ".", "y", ")", "-", ...
judge a->b is ordered clockwise @param center @param a @param b @return
[ "judge", "a", "-", ">", "b", "is", "ordered", "clockwise" ]
5a6e5472631c2304b71a51034683f38271962ef5
https://github.com/linroid/FilterMenu/blob/5a6e5472631c2304b71a51034683f38271962ef5/library/src/main/java/com/linroid/filtermenu/library/FilterMenuLayout.java#L748-L751
160,392
crawljax/crawljax
core/src/main/java/com/crawljax/forms/FormInput.java
FormInput.inputValues
public void inputValues(boolean... values) { for (boolean value : values) { InputValue inputValue = new InputValue(); inputValue.setChecked(value); this.inputValues.add(inputValue); } }
java
public void inputValues(boolean... values) { for (boolean value : values) { InputValue inputValue = new InputValue(); inputValue.setChecked(value); this.inputValues.add(inputValue); } }
[ "public", "void", "inputValues", "(", "boolean", "...", "values", ")", "{", "for", "(", "boolean", "value", ":", "values", ")", "{", "InputValue", "inputValue", "=", "new", "InputValue", "(", ")", ";", "inputValue", ".", "setChecked", "(", "value", ")", ...
Sets the values of this input field. Only Applicable check-boxes and a radio buttons. @param values Values to set.
[ "Sets", "the", "values", "of", "this", "input", "field", ".", "Only", "Applicable", "check", "-", "boxes", "and", "a", "radio", "buttons", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/forms/FormInput.java#L141-L148
160,393
crawljax/crawljax
core/src/main/java/com/crawljax/stateabstractions/dom/RTED/LblTree.java
LblTree.clearTmpData
public void clearTmpData() { for (Enumeration<?> e = breadthFirstEnumeration(); e.hasMoreElements(); ) { ((LblTree) e.nextElement()).setTmpData(null); } }
java
public void clearTmpData() { for (Enumeration<?> e = breadthFirstEnumeration(); e.hasMoreElements(); ) { ((LblTree) e.nextElement()).setTmpData(null); } }
[ "public", "void", "clearTmpData", "(", ")", "{", "for", "(", "Enumeration", "<", "?", ">", "e", "=", "breadthFirstEnumeration", "(", ")", ";", "e", ".", "hasMoreElements", "(", ")", ";", ")", "{", "(", "(", "LblTree", ")", "e", ".", "nextElement", "(...
Clear tmpData in subtree rooted in this node.
[ "Clear", "tmpData", "in", "subtree", "rooted", "in", "this", "node", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/stateabstractions/dom/RTED/LblTree.java#L171-L175
160,394
crawljax/crawljax
core/src/main/java/com/crawljax/util/XPathHelper.java
XPathHelper.getXPathExpression
public static String getXPathExpression(Node node) { Object xpathCache = node.getUserData(FULL_XPATH_CACHE); if (xpathCache != null) { return xpathCache.toString(); } Node parent = node.getParentNode(); if ((parent == null) || parent.getNodeName().contains("#document")) { String xPath = "/" + node.getN...
java
public static String getXPathExpression(Node node) { Object xpathCache = node.getUserData(FULL_XPATH_CACHE); if (xpathCache != null) { return xpathCache.toString(); } Node parent = node.getParentNode(); if ((parent == null) || parent.getNodeName().contains("#document")) { String xPath = "/" + node.getN...
[ "public", "static", "String", "getXPathExpression", "(", "Node", "node", ")", "{", "Object", "xpathCache", "=", "node", ".", "getUserData", "(", "FULL_XPATH_CACHE", ")", ";", "if", "(", "xpathCache", "!=", "null", ")", "{", "return", "xpathCache", ".", "toSt...
Reverse Engineers an XPath Expression of a given Node in the DOM. @param node the given node. @return string xpath expression (e.g., "/html[1]/body[1]/div[3]").
[ "Reverse", "Engineers", "an", "XPath", "Expression", "of", "a", "given", "Node", "in", "the", "DOM", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L38-L81
160,395
crawljax/crawljax
core/src/main/java/com/crawljax/util/XPathHelper.java
XPathHelper.getSiblings
public static List<Node> getSiblings(Node parent, Node element) { List<Node> result = new ArrayList<>(); NodeList list = parent.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node el = list.item(i); if (el.getNodeName().equals(element.getNodeName())) { result.add(el); } } return...
java
public static List<Node> getSiblings(Node parent, Node element) { List<Node> result = new ArrayList<>(); NodeList list = parent.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node el = list.item(i); if (el.getNodeName().equals(element.getNodeName())) { result.add(el); } } return...
[ "public", "static", "List", "<", "Node", ">", "getSiblings", "(", "Node", "parent", ",", "Node", "element", ")", "{", "List", "<", "Node", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "NodeList", "list", "=", "parent", ".", "getChildNod...
Get siblings of the same type as element from parent. @param parent parent node. @param element element. @return List of sibling (from element) under parent
[ "Get", "siblings", "of", "the", "same", "type", "as", "element", "from", "parent", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L90-L103
160,396
crawljax/crawljax
core/src/main/java/com/crawljax/util/XPathHelper.java
XPathHelper.evaluateXpathExpression
public static NodeList evaluateXpathExpression(String domStr, String xpathExpr) throws XPathExpressionException, IOException { Document dom = DomUtils.asDocument(domStr); return evaluateXpathExpression(dom, xpathExpr); }
java
public static NodeList evaluateXpathExpression(String domStr, String xpathExpr) throws XPathExpressionException, IOException { Document dom = DomUtils.asDocument(domStr); return evaluateXpathExpression(dom, xpathExpr); }
[ "public", "static", "NodeList", "evaluateXpathExpression", "(", "String", "domStr", ",", "String", "xpathExpr", ")", "throws", "XPathExpressionException", ",", "IOException", "{", "Document", "dom", "=", "DomUtils", ".", "asDocument", "(", "domStr", ")", ";", "ret...
Returns the list of nodes which match the expression xpathExpr in the String domStr. @return the list of nodes which match the query @throws XPathExpressionException @throws IOException
[ "Returns", "the", "list", "of", "nodes", "which", "match", "the", "expression", "xpathExpr", "in", "the", "String", "domStr", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L112-L116
160,397
crawljax/crawljax
core/src/main/java/com/crawljax/util/XPathHelper.java
XPathHelper.evaluateXpathExpression
public static NodeList evaluateXpathExpression(Document dom, String xpathExpr) throws XPathExpressionException { XPathFactory factory = XPathFactory.newInstance(); XPath xpath = factory.newXPath(); XPathExpression expr = xpath.compile(xpathExpr); Object result = expr.evaluate(dom, XPathConstants.NODESET); ...
java
public static NodeList evaluateXpathExpression(Document dom, String xpathExpr) throws XPathExpressionException { XPathFactory factory = XPathFactory.newInstance(); XPath xpath = factory.newXPath(); XPathExpression expr = xpath.compile(xpathExpr); Object result = expr.evaluate(dom, XPathConstants.NODESET); ...
[ "public", "static", "NodeList", "evaluateXpathExpression", "(", "Document", "dom", ",", "String", "xpathExpr", ")", "throws", "XPathExpressionException", "{", "XPathFactory", "factory", "=", "XPathFactory", ".", "newInstance", "(", ")", ";", "XPath", "xpath", "=", ...
Returns the list of nodes which match the expression xpathExpr in the Document dom. @param dom the Document to search in @param xpathExpr the xpath query @return the list of nodes which match the query @throws XPathExpressionException On error.
[ "Returns", "the", "list", "of", "nodes", "which", "match", "the", "expression", "xpathExpr", "in", "the", "Document", "dom", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L126-L133
160,398
crawljax/crawljax
core/src/main/java/com/crawljax/util/XPathHelper.java
XPathHelper.getXPathLocation
public static int getXPathLocation(String dom, String xpath) { String dom_lower = dom.toLowerCase(); String xpath_lower = xpath.toLowerCase(); String[] elements = xpath_lower.split("/"); int pos = 0; int temp; int number; for (String element : elements) { if (!element.isEmpty() && !element.startsWith("...
java
public static int getXPathLocation(String dom, String xpath) { String dom_lower = dom.toLowerCase(); String xpath_lower = xpath.toLowerCase(); String[] elements = xpath_lower.split("/"); int pos = 0; int temp; int number; for (String element : elements) { if (!element.isEmpty() && !element.startsWith("...
[ "public", "static", "int", "getXPathLocation", "(", "String", "dom", ",", "String", "xpath", ")", "{", "String", "dom_lower", "=", "dom", ".", "toLowerCase", "(", ")", ";", "String", "xpath_lower", "=", "xpath", ".", "toLowerCase", "(", ")", ";", "String",...
returns position of xpath element which match the expression xpath in the String dom. @param dom the Document to search in @param xpath the xpath query @return position of xpath element, if fails returns -1
[ "returns", "position", "of", "xpath", "element", "which", "match", "the", "expression", "xpath", "in", "the", "String", "dom", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L223-L262
160,399
crawljax/crawljax
core/src/main/java/com/crawljax/oraclecomparator/comparators/EditDistanceComparator.java
EditDistanceComparator.getThreshold
double getThreshold(String x, String y, double p) { return 2 * Math.max(x.length(), y.length()) * (1 - p); }
java
double getThreshold(String x, String y, double p) { return 2 * Math.max(x.length(), y.length()) * (1 - p); }
[ "double", "getThreshold", "(", "String", "x", ",", "String", "y", ",", "double", "p", ")", "{", "return", "2", "*", "Math", ".", "max", "(", "x", ".", "length", "(", ")", ",", "y", ".", "length", "(", ")", ")", "*", "(", "1", "-", "p", ")", ...
Calculate a threshold. @param x first string. @param y second string. @param p the threshold coefficient. @return 2 maxLength(x, y) (1-p)
[ "Calculate", "a", "threshold", "." ]
d339f4f622ca902ccd35322065821e52a62ec543
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/oraclecomparator/comparators/EditDistanceComparator.java#L73-L75