id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
206320_0 | public static Map<String, String> parse( CharSequence seq )
{
Map<String, String> hashMap = new HashMap<String, String>();
parse( seq, hashMap );
return hashMap;
} |
206320_1 | public RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
throws ScmException
{
return (RemoveScmResult) execute( repository, fileSet, parameters );
} |
206320_2 | public RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
throws ScmException
{
return (RemoveScmResult) execute( repository, fileSet, parameters );
} |
206320_3 | public CheckInScmResult checkIn( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckInScmResult) execute( repository, fileSet, parameters );
} |
206320_4 | public CheckInScmResult checkIn( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckInScmResult) execute( repository, fileSet, parameters );
} |
206320_5 | public CheckInScmResult checkIn( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckInScmResult) execute( repository, fileSet, parameters );
} |
206320_6 | public CheckInScmResult checkIn( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckInScmResult) execute( repository, fileSet, parameters );
} |
206320_7 | public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckOutScmResult) execute( repository, fileSet, parameters );
} |
206320_8 | public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckOutScmResult) execute( repository, fileSet, parameters );
} |
206320_9 | public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
{
return (CheckOutScmResult) execute( repository, fileSet, parameters );
} |
206322_0 | public static boolean isClassifierValid( String classifier )
{
// @FIXME: Check classifier for trailing dash? "a-0" valid?
// What are the rules for a valid classifier? Somewhere documented? which can be used as a reference?
boolean result = false;
// The following check is only based on an educated gue... |
206322_1 | public static boolean isClassifierValid( String classifier )
{
// @FIXME: Check classifier for trailing dash? "a-0" valid?
// What are the rules for a valid classifier? Somewhere documented? which can be used as a reference?
boolean result = false;
// The following check is only based on an educated gue... |
206322_2 | public static boolean isClassifierValid( String classifier )
{
// @FIXME: Check classifier for trailing dash? "a-0" valid?
// What are the rules for a valid classifier? Somewhere documented? which can be used as a reference?
boolean result = false;
// The following check is only based on an educated gue... |
206322_3 | public static boolean isClassifierValid( String classifier )
{
// @FIXME: Check classifier for trailing dash? "a-0" valid?
// What are the rules for a valid classifier? Somewhere documented? which can be used as a reference?
boolean result = false;
// The following check is only based on an educated gue... |
206322_4 | public static boolean isClassifierValid( String classifier )
{
// @FIXME: Check classifier for trailing dash? "a-0" valid?
// What are the rules for a valid classifier? Somewhere documented? which can be used as a reference?
boolean result = false;
// The following check is only based on an educated gue... |
206322_5 | public static boolean hasClassifier( String classifier )
{
boolean result = false;
if ( classifier != null && classifier.trim().length() > 0 )
{
result = true;
}
return result;
} |
206322_6 | public static boolean hasClassifier( String classifier )
{
boolean result = false;
if ( classifier != null && classifier.trim().length() > 0 )
{
result = true;
}
return result;
} |
206322_7 | public static boolean hasClassifier( String classifier )
{
boolean result = false;
if ( classifier != null && classifier.trim().length() > 0 )
{
result = true;
}
return result;
} |
206322_8 | public static File getJarFile( File basedir, String finalName, String classifier )
{
if ( basedir == null )
{
throw new IllegalArgumentException( "basedir is not allowed to be null" );
}
if ( finalName == null )
{
throw new IllegalArgumentException( "finalName is not allowed to be nu... |
206322_9 | public static File getJarFile( File basedir, String finalName, String classifier )
{
if ( basedir == null )
{
throw new IllegalArgumentException( "basedir is not allowed to be null" );
}
if ( finalName == null )
{
throw new IllegalArgumentException( "finalName is not allowed to be nu... |
206350_0 | public Collection<Module> createModules(Module... standardModules)
throws ServletException {
Set<String> existingModules = new HashSet<>();
Collection<Module> modules = new ArrayList<>();
if (standardModules != null) {
for (Module module : standardModules) {
modules.add(module);
... |
206350_1 | public Collection<Module> createModules(Module... standardModules)
throws ServletException {
Set<String> existingModules = new HashSet<>();
Collection<Module> modules = new ArrayList<>();
if (standardModules != null) {
for (Module module : standardModules) {
modules.add(module);
... |
206350_2 | public Collection<Module> createModules(Module... standardModules)
throws ServletException {
Set<String> existingModules = new HashSet<>();
Collection<Module> modules = new ArrayList<>();
if (standardModules != null) {
for (Module module : standardModules) {
modules.add(module);
... |
206350_3 | public String getConfigurationLocation() {
String configurationLocation = configuration
.getInitParameter(CONFIGURATION_LOCATION_PARAMETER);
if (configurationLocation != null) {
return configurationLocation;
}
String name = configuration.getFilterName();
if (name == null) {
... |
206350_4 | public String getConfigurationLocation() {
String configurationLocation = configuration
.getInitParameter(CONFIGURATION_LOCATION_PARAMETER);
if (configurationLocation != null) {
return configurationLocation;
}
String name = configuration.getFilterName();
if (name == null) {
... |
206350_5 | public String getConfigurationLocation() {
String configurationLocation = configuration
.getInitParameter(CONFIGURATION_LOCATION_PARAMETER);
if (configurationLocation != null) {
return configurationLocation;
}
String name = configuration.getFilterName();
if (name == null) {
... |
206350_6 | public String getConfigurationLocation() {
String configurationLocation = configuration
.getInitParameter(CONFIGURATION_LOCATION_PARAMETER);
if (configurationLocation != null) {
return configurationLocation;
}
String name = configuration.getFilterName();
if (name == null) {
... |
206350_7 | public Map<String, String> getParameters() {
Enumeration<?> en = configuration.getInitParameterNames();
if (!en.hasMoreElements()) {
return Collections.emptyMap();
}
Map<String, String> parameters = new HashMap<>();
while (en.hasMoreElements()) {
String key = (String) en.nextElement(... |
206350_8 | public Map<String, String> getOtherParameters() {
Map<String, String> parameters = getParameters();
if (!parameters.isEmpty()) {
parameters.remove(CONFIGURATION_LOCATION_PARAMETER);
parameters.remove(EXTRA_MODULES_PARAMETER);
}
return parameters;
} |
206350_9 | @Override
public void init(FilterConfig config) throws ServletException {
checkAlreadyConfigured(config.getServletContext());
this.servletContext = config.getServletContext();
WebConfiguration configAdapter = new WebConfiguration(config);
String configurationLocation = configAdapter.getConfigurationLoca... |
206364_0 | public static String nextString(int type) {
byte[] bytes = next(type);
try {
return new String(bytes, "ISO-8859-1");
} catch (Exception e) {
return new String(bytes);
}
} |
206364_1 | public static String nextHex(int type) {
return Base16Encoder.encode(next(type));
} |
206364_2 | public static String nextString(int type) {
byte[] bytes = next(type);
try {
return new String(bytes, "ISO-8859-1");
} catch (Exception e) {
return new String(bytes);
}
} |
206364_3 | public static String nextHex(int type) {
return Base16Encoder.encode(next(type));
} |
206364_4 | public static String nextHex(int type) {
return Base16Encoder.encode(next(type));
} |
206364_5 | static long getTime() {
if (RANDOM == null)
initializeForType1();
long newTime = getUUIDTime();
if (newTime <= _lastMillis) {
incrementSequence();
newTime = getUUIDTime();
}
_lastMillis = newTime;
return newTime;
} |
206364_6 | public static byte[] createType1() {
if (type1Initialized == false) {
initializeForType1();
}
// set ip addr
byte[] uuid = new byte[16];
System.arraycopy(IP, 0, uuid, 10, IP.length);
// Set time info. Have to do this processing within a synchronized
// block because of the statics..... |
206364_7 | public static String[] split(String str, String token, int max) {
if (str == null || str.length() == 0) {
return EMPTY_STRING_ARRAY;
}
if (token == null || token.length() == 0) {
throw new IllegalArgumentException("token: [" + token + "]");
}
// split on token
List<String> ret = ... |
206364_8 | public static String[] split(String str, String token, int max) {
if (str == null || str.length() == 0) {
return EMPTY_STRING_ARRAY;
}
if (token == null || token.length() == 0) {
throw new IllegalArgumentException("token: [" + token + "]");
}
// split on token
List<String> ret = ... |
206364_9 | public static String[] split(String str, String token, int max) {
if (str == null || str.length() == 0) {
return EMPTY_STRING_ARRAY;
}
if (token == null || token.length() == 0) {
throw new IllegalArgumentException("token: [" + token + "]");
}
// split on token
List<String> ret = ... |
206402_0 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
fi... |
206402_1 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
fi... |
206402_2 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
fi... |
206402_3 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
fi... |
206402_4 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
fi... |
206402_5 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
fi... |
206402_6 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
if... |
206402_7 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
if... |
206402_8 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
final String method = request.getMethod();
if (method.equalsIgnoreCase("CONNECT")) {
return;
}
if... |
206402_9 | @Override
public void process(final HttpRequest request, final EntityDetails entity, final HttpContext context)
throws HttpException, IOException {
Args.notNull(request, "HTTP request");
Args.notNull(context, "HTTP context");
final String method = request.getMethod();
if (method.equalsIgnoreCase... |
206403_0 | void write(Node node, int maxLevels) throws RepositoryException, IOException {
write(node, 0, maxLevels);
} |
206403_1 | public static Builder builder() {
return new Builder();
} |
206403_2 | public static List<String> tokenizeList(String list) {
String[] split = list.split(",");
if (split.length == 1) {
return Collections.singletonList(split[0].trim());
} else {
List<String> result = new ArrayList<String>();
String inCodedUrl = null;
for (String t : split) {
... |
206418_0 | public MavenProject getMavenProject( ContinuumProjectBuildingResult result, File file )
{
MavenProject project;
try
{
// TODO: This seems like code that is shared with DefaultMaven, so it should be moved to the project
// builder perhaps
Settings settings = getSettings();
... |
206418_1 | public void executeTask( Task task )
throws TaskExecutionException
{
BuildProjectTask buildProjectTask = (BuildProjectTask) task;
int projectId = buildProjectTask.getProjectId();
try
{
log.info( "Initializing build (projectId={})", projectId );
BuildContext context = buildContextMana... |
206418_2 | public void executeTask( Task task )
throws TaskExecutionException
{
BuildProjectTask buildProjectTask = (BuildProjectTask) task;
int projectId = buildProjectTask.getProjectId();
try
{
log.info( "Initializing build (projectId={})", projectId );
BuildContext context = buildContextMana... |
206418_3 | public void executeTask( Task task )
throws TaskExecutionException
{
BuildProjectTask buildProjectTask = (BuildProjectTask) task;
int projectId = buildProjectTask.getProjectId();
try
{
log.info( "Initializing build (projectId={})", projectId );
BuildContext context = buildContextMana... |
206418_4 | public static int getProjectId( final String href )
{
String requestPathInfo = StringUtils.defaultString( href );
// Remove prefix ie /workingcopy/blah becomes /blah
requestPathInfo = removePrefix( requestPathInfo );
// Remove prefixing slash as the project id doesn't contain it;
if ( requestPathInf... |
206418_5 | public static String getLogicalResource( final String href )
{
String logicalResource = null;
String requestPathInfo = StringUtils.defaultString( href );
//remove prefix ie /workingcopy/blah becomes /blah
requestPathInfo = removePrefix( requestPathInfo );
// Remove prefixing slash as the project id ... |
206418_6 | public DavResource createResource( final DavResourceLocator locator, final DavSession davSession )
throws DavException
{
ContinuumBuildAgentDavResourceLocator continuumLocator = checkLocatorIsInstanceOfContinuumBuildAgentLocator(
locator );
String logicalResource = WorkingCopyPathUtil.getLogicalReso... |
206418_7 | public DavResource createResource( final DavResourceLocator locator, final DavSession davSession )
throws DavException
{
ContinuumBuildAgentDavResourceLocator continuumLocator = checkLocatorIsInstanceOfContinuumBuildAgentLocator(
locator );
String logicalResource = WorkingCopyPathUtil.getLogicalReso... |
206418_8 | public boolean attachSession( WebdavRequest request )
throws DavException
{
if ( !isAuthorized( request ) )
{
throw new DavException( HttpServletResponse.SC_UNAUTHORIZED );
}
request.setDavSession( new ContinuumBuildAgentDavSession() );
return true;
} |
206418_9 | public void releaseSession( WebdavRequest request )
{
request.setDavSession( null );
} |
206437_0 | public void setWkDirPath( URI wkDirPath )
{
protect( "wkDirPath" );
this.wkDirPath = new File( wkDirPath );
} |
206437_1 | public long count( PartitionTxn partitionTxn ) throws LdapException
{
return forward.count( partitionTxn );
} |
206437_2 | @Override
public long greaterThanCount( PartitionTxn partitionTxn, K attrVal ) throws LdapException
{
return forward.greaterThanCount( partitionTxn, attrVal );
} |
206437_3 | @Override
public long lessThanCount( PartitionTxn partitionTxn, K attrVal ) throws LdapException
{
return forward.lessThanCount( partitionTxn, attrVal );
} |
206437_4 | public void setWkDirPath( URI wkDirPath )
{
//.out.println( "IDX Defining a WorkingDir : " + wkDirPath );
protect( "wkDirPath" );
this.wkDirPath = new File( wkDirPath );
} |
206437_5 | public long count( PartitionTxn partitionTxn ) throws LdapException
{
return forward.count( partitionTxn );
} |
206437_6 | @Override
public long greaterThanCount( PartitionTxn partitionTxn, K attrVal ) throws LdapException
{
return forward.greaterThanCount( partitionTxn, attrVal );
} |
206437_7 | @Override
public long lessThanCount( PartitionTxn partitionTxn, K attrVal ) throws LdapException
{
return forward.lessThanCount( partitionTxn, attrVal );
} |
206437_8 | public ConfigWriter( SchemaManager schemaManager, ConfigBean configBean )
{
this.schemaManager = schemaManager;
this.configBean = configBean;
} |
206437_9 | public AdsBaseBean readConfig( Entry entry ) throws Exception
{
// Let's instantiate the bean we need. The upper ObjectClass's name
// will be used to do that
ObjectClass objectClass = findObjectClass( entry.get( SchemaConstants.OBJECT_CLASS_AT ) );
// Instantiating the bean
AdsBaseBean bean = creat... |
206444_0 | @Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)
throws Exception {
if (in.readableBytes() < 4) {
return;
}
in.markReaderIndex();
int msgSize = in.readInt();
checkSize(msgSize);
if (in.readableBytes() < msgSize) {
// Incomplete message in buffer.
in.re... |
206444_1 | public Future<Void> call(Object msg) {
return call(msg, Void.class);
} |
206444_2 | public static Promise<Rpc> createClient(
Map<String, String> config,
final NioEventLoopGroup eloop,
String host,
int port,
final String clientId,
final String secret,
final RpcDispatcher dispatcher) throws Exception {
final RpcConfiguration rpcConf = new RpcConfiguration(config);
int con... |
206444_3 | public Future<Void> call(Object msg) {
return call(msg, Void.class);
} |
206444_4 | public Future<Void> call(Object msg) {
return call(msg, Void.class);
} |
206444_5 | public static Promise<Rpc> createClient(
Map<String, String> config,
final NioEventLoopGroup eloop,
String host,
int port,
final String clientId,
final String secret,
final RpcDispatcher dispatcher) throws Exception {
final RpcConfiguration rpcConf = new RpcConfiguration(config);
int con... |
206444_6 | public static Promise<Rpc> createClient(
Map<String, String> config,
final NioEventLoopGroup eloop,
String host,
int port,
final String clientId,
final String secret,
final RpcDispatcher dispatcher) throws Exception {
final RpcConfiguration rpcConf = new RpcConfiguration(config);
int con... |
206444_7 | public Future<Void> call(Object msg) {
return call(msg, Void.class);
} |
206444_8 | @VisibleForTesting
static RuntimeException convertToSerializableSparkException(Throwable error) {
RuntimeException serializableThrowable = new RuntimeException(
error.getClass().getName() + ": " + Objects.toString(error.getMessage(), ""),
error.getCause() == null ? null : convertToSerializableSpar... |
206444_9 | @VisibleForTesting
static RuntimeException convertToSerializableSparkException(Throwable error) {
RuntimeException serializableThrowable = new RuntimeException(
error.getClass().getName() + ": " + Objects.toString(error.getMessage(), ""),
error.getCause() == null ? null : convertToSerializableSpar... |
206451_0 | public Node evaluateNode(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List retVal = evaluate(cexp, ctx);
if (retVal.size() == 0 || retVal.size() > 1) {
StringBuffer msg = new StringBuffer((retVal.size() == 0) ? "No results for expression: '" : "Multiple results f... |
206451_1 | public Node evaluateNode(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List retVal = evaluate(cexp, ctx);
if (retVal.size() == 0 || retVal.size() > 1) {
StringBuffer msg = new StringBuffer((retVal.size() == 0) ? "No results for expression: '" : "Multiple results f... |
206451_2 | public Node evaluateNode(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List retVal = evaluate(cexp, ctx);
if (retVal.size() == 0 || retVal.size() > 1) {
StringBuffer msg = new StringBuffer((retVal.size() == 0) ? "No results for expression: '" : "Multiple results f... |
206451_3 | public Node evaluateNode(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List retVal = evaluate(cexp, ctx);
if (retVal.size() == 0 || retVal.size() > 1) {
StringBuffer msg = new StringBuffer((retVal.size() == 0) ? "No results for expression: '" : "Multiple results f... |
206451_4 | public Node evaluateNode(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List retVal = evaluate(cexp, ctx);
if (retVal.size() == 0 || retVal.size() > 1) {
StringBuffer msg = new StringBuffer((retVal.size() == 0) ? "No results for expression: '" : "Multiple results f... |
206451_5 | @SuppressWarnings("unchecked")
public List evaluate(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List result;
Object someRes = null;
try {
someRes = evaluate(cexp, ctx, XPathConstants.NODESET);
} catch (Exception e) {
someRes = evaluate(cexp, ctx,... |
206451_6 | @SuppressWarnings("unchecked")
public List evaluate(OExpression cexp, EvaluationContext ctx) throws FaultException, EvaluationException {
List result;
Object someRes = null;
try {
someRes = evaluate(cexp, ctx, XPathConstants.NODESET);
} catch (Exception e) {
someRes = evaluate(cexp, ctx,... |
206451_7 | public boolean containsAll(CorrelationKeySet c) {
Iterator<CorrelationKey> e = c.iterator();
while (e.hasNext())
if (!contains(e.next()))
return false;
return true;
} |
206451_8 | public List<CorrelationKeySet> findSubSets() {
List<CorrelationKeySet> subSets = new ArrayList<CorrelationKeySet>();
// if the key set contains a opaque key and at least one non-opaque key, take out the opaque key
CorrelationKey opaqueKey = null;
boolean containsNonOpaque = false;
CorrelationKeySet ... |
206451_9 | public List<String> getNodeIds() throws DatabaseException {
Connection con = null;
PreparedStatement ps = null;
try {
con = getConnection();
ps = con.prepareStatement(GET_NODEIDS, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery();
Arra... |
206452_0 | public static String expandProperties(String input, Map props) {
if (input == null) {
return null;
}
Matcher matcher = EXPANSION_PATTERN.matcher(input);
StringBuffer expanded = new StringBuffer(input.length());
while (matcher.find()) {
String propName = matcher.group(2);
... |
206452_1 | public static String expandSystemProperties(String input) {
return expandProperties(input, System.getProperties());
} |
206452_2 | public static String encodeEmail(String str) {
// obfuscate mailto's: turns them into hex encoded,
// so that browsers can still understand the mailto link
Matcher mailtoMatch = MAILTO_PATTERN.matcher(str);
while (mailtoMatch.find()) {
String email = mailtoMatch.group(1);
//System.out.pr... |
206452_3 | public static String obfuscateEmail(String str) {
Matcher emailMatch = EMAIL_PATTERN.matcher(str);
while (emailMatch.find()) {
String at = emailMatch.group(1);
//System.out.println("at=" + at);
str = str.replaceFirst(at, "-AT-");
String dot = emailMatch.group(2) + emailM... |
206452_4 | public static String encodeEmail(String str) {
// obfuscate mailto's: turns them into hex encoded,
// so that browsers can still understand the mailto link
Matcher mailtoMatch = MAILTO_PATTERN.matcher(str);
while (mailtoMatch.find()) {
String email = mailtoMatch.group(1);
//System.out.pr... |
206452_5 | public synchronized void purge()
{
cache.clear();
} |
206452_6 | public boolean isBannedwordslisted(String str) {
return isBannedwordslisted(str, null, null);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.