id
stringlengths
7
14
text
stringlengths
1
106k
502000_0
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_1
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_2
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_3
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_4
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_5
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_6
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_7
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_8
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
502000_9
public Object setProperty(String name, String value) { String prev = super.getProperty(name); super.setProperty(name, value); replace(name, new HashSet<String>()); return prev; }
505113_0
public void setUseLevelAsKey(final boolean useLevelAsKey) { this.useLevelAsKey = useLevelAsKey; }
505113_1
public void setUseLevelAsPriority(final boolean useLevelAsPriority) { this.useLevelAsPriority = useLevelAsPriority; }
505113_2
@Override public void stop() { try { this.xmpp.disconnect(); } catch(final Exception ignored) { System.err.println("Ignored exception:"); ignored.printStackTrace(System.err); } finally { super.stop(); } }
508590_0
public Vertex addVertex(final Value value) { return store.addVertex(value); }
508590_1
public Vertex getVertex(final Value value) { return store.getVertex(value); }
508590_2
public synchronized void load(final File fileOrDirectory) throws Exception { LOGGER.info("loading from " + fileOrDirectory); SailConnection c = sail.getConnection(); try { c.begin(); long startTime = System.currentTimeMillis(); long count = loadFile(fileOrDirectory, c); // co...
508590_3
void setFirstClassEdges(final boolean firstClassEdges) { this.firstClassEdges = firstClassEdges; }
511297_0
@Override public Object convertCassTypeToObjType(PropertyMappingDefinition md, byte[] value) { BigInteger bigInt = new BigInteger(value); // determine our target integer type and then go from there on the // conversion method Class<?> targetClass = md.getPropDesc().getPropertyType(); if (targetClass.equals(In...
511297_1
<T> T createObject(CFMappingDef<T> cfMapDef, Object pkObj, ColumnSlice<String, byte[]> slice) { if (slice.getColumns().isEmpty()) { return null; } CFMappingDef<? extends T> cfMapDefInstance = determineClassType(cfMapDef, slice); T obj; try { try { obj = cfMapDefInstance.getEffectiveClass().newIn...
511297_2
private Collection<HColumn<String, byte[]>> createColumnSet(Object obj) { Map<String, HColumn<String, byte[]>> map = createColumnMap(obj); if (null != map) { return map.values(); } else { return null; } }
511297_3
<T> T createObject(CFMappingDef<T> cfMapDef, Object pkObj, ColumnSlice<String, byte[]> slice) { if (slice.getColumns().isEmpty()) { return null; } CFMappingDef<? extends T> cfMapDefInstance = determineClassType(cfMapDef, slice); T obj; try { try { obj = cfMapDefInstance.getEffectiveClass().newIn...
511297_4
public static boolean isSerializable(Class<?> clazz) { return isImplementedBy(clazz, Serializable.class); }
511297_5
public static boolean isSerializable(Class<?> clazz) { return isImplementedBy(clazz, Serializable.class); }
511297_6
<T> Map<String, HColumn<String, byte[]>> createColumnMap(T obj) { if (null == obj) { throw new IllegalArgumentException("Class type cannot be null"); } @SuppressWarnings("unchecked") CFMappingDef<T> cfMapDef = (CFMappingDef<T>) cacheMgr.getCfMapDef((Class<T>) obj.getClass(), true); try { Map<Str...
511297_7
<T> Map<String, HColumn<String, byte[]>> createColumnMap(T obj) { if (null == obj) { throw new IllegalArgumentException("Class type cannot be null"); } @SuppressWarnings("unchecked") CFMappingDef<T> cfMapDef = (CFMappingDef<T>) cacheMgr.getCfMapDef((Class<T>) obj.getClass(), true); try { Map<Str...
511297_8
@Override public <T> void parse(ClassCacheMgr cacheMgr, Annotation anno, CFMappingDef<T> cfMapDef) { if (anno instanceof IdClass) { parseIdClassAnnotation(cacheMgr, (IdClass) anno, cfMapDef); } else { throw new HectorObjectMapperException("This class cannot parse annotation, " + anno.getClass().getS...
511297_9
@Override public <T> void validateAndSetDefaults(ClassCacheMgr cacheMgr, CFMappingDef<T> cfMapDef) { if (cfMapDef.isBaseEntity()) { validateBaseClassInheritance(cfMapDef); } else if (cfMapDef.isPersistableDerivedEntity()) { validateDerivedClassInheritance(cfMapDef); } else if (!cfMapDef.isNonPersistableDe...
514315_0
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_1
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_2
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_3
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_4
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_5
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_6
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "vertices") @ExtensionDescriptor(description = "get a set of vertices from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_7
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "edges") @ExtensionDescriptor(description = "get a set of edges from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_8
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "edges") @ExtensionDescriptor(description = "get a set of edges from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
514315_9
@ExtensionDefinition(extensionPoint = ExtensionPoint.GRAPH, method = HttpMethod.GET, path = "edges") @ExtensionDescriptor(description = "get a set of edges from the graph.", api = { @ExtensionApi(parameterName = Tokens.REXSTER + "." + Tokens.SHOW_TYPES, description = API_SHOW_TYPES), ...
520116_0
@Override public void validateValue(Property property, Object value) throws ValidationException { if (value != null || propertyDescriptor.isNotNull()) { if (!propertyDescriptor.getValueSet().contains(value)) { throw new ValidationException(MessageFormat.format("Value for ''{0}'' is invalid: ''{1...
520116_1
@Override public void validateValue(Property property, Object value) throws ValidationException { if (value != null || propertyDescriptor.isNotNull()) { if (!propertyDescriptor.getValueSet().contains(value)) { throw new ValidationException(MessageFormat.format("Value for ''{0}'' is invalid: ''{1...
520116_2
@Override public void validateValue(Property property, Object value) throws ValidationException { if (value != null || propertyDescriptor.isNotNull()) { if (!propertyDescriptor.getValueSet().contains(value)) { throw new ValidationException(MessageFormat.format("Value for ''{0}'' is invalid: ''{1...
520116_3
@Override public void validateValue(Property property, Object value) throws ValidationException { if (value != null || propertyDescriptor.isNotNull()) { if (!propertyDescriptor.getValueSet().contains(value)) { throw new ValidationException(MessageFormat.format("Value for ''{0}'' is invalid: ''{1...
520116_4
@Override public Object convertDomToValue(DomElement parentElement, Object value) throws ConversionException, ValidationException { PropertySet propertySet; if (value == null) { value = createValueInstance(parentElement, getValueType()); propertySet = getPropertySet(value); propertySet.s...
520116_5
@Override public Object convertDomToValue(DomElement parentElement, Object value) throws ConversionException, ValidationException { PropertySet propertySet; if (value == null) { value = createValueInstance(parentElement, getValueType()); propertySet = getPropertySet(value); propertySet.s...
520116_6
@Override public void convertValueToDom(Object value, DomElement parentElement) throws ConversionException { PropertySet propertySet = getPropertySet(value); for (Property property : propertySet.getProperties()) { convertPropertyToDom(property, parentElement); } }
520116_7
@Override public void convertValueToDom(Object value, DomElement parentElement) throws ConversionException { PropertySet propertySet = getPropertySet(value); for (Property property : propertySet.getProperties()) { convertPropertyToDom(property, parentElement); } }
520116_8
@Override public void convertValueToDom(Object value, DomElement parentElement) throws ConversionException { PropertySet propertySet = getPropertySet(value); for (Property property : propertySet.getProperties()) { convertPropertyToDom(property, parentElement); } }
520116_9
@Override public Object convertDomToValue(DomElement parentElement, Object value) throws ConversionException, ValidationException { PropertySet propertySet; if (value == null) { value = createValueInstance(parentElement, getValueType()); propertySet = getPropertySet(value); propertySet.s...
520146_0
static String getBandName(String name) { int p1 = name.indexOf("_"); int p2 = name.lastIndexOf('.'); return name.substring(p1 == -1 ? 0 : p1 + 1, p2); }
520146_1
static PropertySet readPhysVolDescriptor(File inputFile) throws IOException { return readKeyValuePairs(inputFile); }
520146_2
@Override public DecodeQualification getDecodeQualification(Object input) { File file = getFileInput(input); if (file == null) { return DecodeQualification.UNABLE; } VirtualDir virtualDir = VirtualDir.create(file); if (virtualDir == null) { return DecodeQualification.UNABLE; } ...
520146_3
public URL getCoefficientFile(String sensor, String bandName, AEROSOL_TYPE aerosolType) { URL url = null; SensorDb sensorDb; sensorDb = getSensorDb(sensor); if (sensorDb != null) { BandDb bandDb; bandDb = sensorDb.getBand(bandName, aerosolTypeMap.get(aerosolType)); if (bandDb == ...
520146_4
public URL getCoefficientFile(String sensor, String bandName, AEROSOL_TYPE aerosolType) { URL url = null; SensorDb sensorDb; sensorDb = getSensorDb(sensor); if (sensorDb != null) { BandDb bandDb; bandDb = sensorDb.getBand(bandName, aerosolTypeMap.get(aerosolType)); if (bandDb == ...
520146_5
public URL getCoefficientFile(String sensor, String bandName, AEROSOL_TYPE aerosolType) { URL url = null; SensorDb sensorDb; sensorDb = getSensorDb(sensor); if (sensorDb != null) { BandDb bandDb; bandDb = sensorDb.getBand(bandName, aerosolTypeMap.get(aerosolType)); if (bandDb == ...
520146_6
public void setURL(URL location) throws IOException { Guardian.assertNotNull("location", location); URL mapFileURL; String file = null; try { file = SystemUtils.convertToLocalPath(location.getPath() + "/" + mapFileName); mapFileURL = new URL(location.getProtocol(), location.getHost(), fi...
520146_7
@Override public String toString() { return String.format("%s{index=%d, numObs=%d, featureValues=%s}", getClass().getSimpleName(), index, numObs, Arrays.toString(featureValues)); }
520146_8
public static SpatialBin read(DataInput dataInput) throws IOException { return read(-1L, dataInput); }
520146_9
public final String[] getResultFeatureNames() { if (hasPostProcessor()) { return getPostProcessFeatureNames(); } else { return getOutputFeatureNames(); } }
525255_0
public void visit(IndexVisitor<Key, Value> visitor) { root().visit(this, visitor); }
526139_0
@Override public final List<BandDescriptor> asList() { return Collections.unmodifiableList(descriptorList); }
526139_1
@Override public final BandDescriptor getMember(String bandName) { return descriptorMap.get(bandName); }
526139_2
@Override public final List<FlagDescriptor> asList() { return Collections.unmodifiableList(descriptorList); }
526139_3
@Override public final FlagDescriptor getMember(String flagName) { return descriptorMap.get(flagName); }
526139_4
static String buildPath(String identifier, String root, String appendix) { final String fc = identifier.substring(12, 16); final String sd = identifier.substring(16, 22); return root + "/" + fc + "/" + sd + "/" + identifier + appendix; }
526139_5
InputStream getResourceStream(String path) throws FileNotFoundException { final String dddbDirFromProperty = System.getProperty(SMOS_DDDB_DIR_PROPERTY_NAME); if (StringUtils.isNotNullAndNotEmpty(dddbDirFromProperty)) { final File resourceFile = new File(dddbDirFromProperty, path); if (resourceFi...
526139_6
InputStream getResourceStream(String path) throws FileNotFoundException { final String dddbDirFromProperty = System.getProperty(SMOS_DDDB_DIR_PROPERTY_NAME); if (StringUtils.isNotNullAndNotEmpty(dddbDirFromProperty)) { final File resourceFile = new File(dddbDirFromProperty, path); if (resourceFi...
526139_7
URL getResourceUrl(String path) throws MalformedURLException { final String dddbDirFromProperty = System.getProperty(SMOS_DDDB_DIR_PROPERTY_NAME); if (StringUtils.isNotNullAndNotEmpty(dddbDirFromProperty)) { final File resourceFile = new File(dddbDirFromProperty, path); if (resourceFile.isFile()...
526139_8
URL getResourceUrl(String path) throws MalformedURLException { final String dddbDirFromProperty = System.getProperty(SMOS_DDDB_DIR_PROPERTY_NAME); if (StringUtils.isNotNullAndNotEmpty(dddbDirFromProperty)) { final File resourceFile = new File(dddbDirFromProperty, path); if (resourceFile.isFile()...
526139_9
URL getResourceUrl(String path) throws MalformedURLException { final String dddbDirFromProperty = System.getProperty(SMOS_DDDB_DIR_PROPERTY_NAME); if (StringUtils.isNotNullAndNotEmpty(dddbDirFromProperty)) { final File resourceFile = new File(dddbDirFromProperty, path); if (resourceFile.isFile()...
533032_0
public void andWith(DocIdSetCardinality other) { min = Math.max(0.0, min + other.min - 1.0); // min - (1.0 - other.min) max = Math.min(max, other.max); }
533032_1
public void orWith(DocIdSetCardinality other) { min = Math.max(min, other.min); max = Math.min(1.0, max + other.max); }
533032_2
public void invert() { final double oldMin = min; min = 1.0 - max; max = 1.0 - oldMin; }
533032_3
static String[] getValsByFrequency(String[] vals, int[] freqs, int maxDoc, DocIdSetCardinality total, TermValueList valArray, List<String> optimizedOut, boolean isAnd) { List<Pair<String, DocIdSetCardinality>> valsAndFreqs = new ArrayList<Pair<String, DocIdSetCardinality>>(vals.length); for (String val : vals) { ...
533032_4
public SenseiTermFilter(String name,String vals[],String[] not,boolean isAnd,boolean noAutoOptimize){ _name = name; _vals = vals != null ? vals : new String[0]; _not = not != null ? not : new String[0]; // Bobo silliness: Empty vals means match all, which technically means an AND of an empty set. // EXCEPT ...
536958_0
String getSrcFileName() { String name = src.getName(); if(src.isFile()){ name = name.replaceAll("\\.war$", ""); name = name.replaceAll("\\.zip$", ""); } return name; }
536958_1
Node createListenerNode(Document doc) { Node listenerNode = doc.createElement("listener"); Node listenerClassNode = doc.createElement("listener-class"); listenerClassNode.appendChild(doc.createTextNode(LISTENER_CLASS)); listenerNode.appendChild(listenerClassNode); return listenerNode; }
536958_2
Node createFilterNode(Document doc) { Node filterNode = doc.createElement("filter"); Node filterNameNode = doc.createElement("filter-name"); filterNameNode.appendChild(doc.createTextNode("infrared")); Node filterClassNode = doc.createElement("filter-class"); filterClassNode.appendChild(doc.createTextNode(FILTER_CL...
536958_3
Node createFilterMappingNode(Document doc) { Node filterMappingNode = doc.createElement("filter-mapping"); Node filterNameNode = doc.createElement("filter-name"); filterNameNode.appendChild(doc.createTextNode("infrared")); Node urlPatternNode = doc.createElement("url-pattern"); urlPatternNode.appendChild(doc.creat...
540945_0
public String getValue(String path) { return getValue(path,null); }
540945_1
public static void start(IDetachedRunnable runnable, Object... args) { // Prepare child thread Thread shim = new ShimThread(runnable, args); shim.start(); }
540945_2
public static Socket fork(ZContext ctx, IAttachedRunnable runnable, Object... args) { Socket pipe = ctx.createSocket(ZMQ.PAIR); if (pipe != null) { pipe.bind(String.format("inproc://zctx-pipe-%d", pipe.hashCode())); } else { return null; } // Connect child pipe to our pipe ZConte...
540945_3
public static ZContext shadow(ZContext ctx) { ZContext shadow = new ZContext(); shadow.setContext(ctx.getContext()); shadow.setMain(false); return shadow; }
540945_4
public ZFrame duplicate() { int length = size(); byte[] copy = new byte[length]; System.arraycopy(this.data, 0, copy, 0, length); ZFrame frame = new ZFrame(); frame.data = copy; if (this.buffer != null) { frame.buffer = this.buffer.duplicate(); } frame.more = this.more; retur...
540945_5
public ZLoop() { pollers = new ArrayList<SPoller>(); timers = new ArrayList<STimer>(); zombies = new ArrayList<Object>(); newTimers = new ArrayList<STimer>(); }
540945_6
public static int makeVersion(final int major, final int minor, final int patch) { return make_version(major, minor, patch); }
540945_7
public static Context context(int ioThreads) { return new Context(ioThreads); }
540945_8
public static Context context(int ioThreads) { return new Context(ioThreads); }
540945_9
public static void proxy(Socket frontend, Socket backend, Socket capture) { if (ZMQ.version_full() < ZMQ.make_version(3, 2, 2)) throw new UnsupportedOperationException(); run_proxy(frontend, backend, capture); }
542927_0
@Override public String toString() { final StringBuilder sb = new StringBuilder(); if (!providerList.isEmpty()) { sb.append(PROVIDER_TAG); for (int i = 0; i < providerList.size(); i++) { sb.append(providerList.get(i)); if (i < providerList.size() - 1) { sb...
542927_1
public static BundleFilter fromString(String text) { final String[] parameters = text.split(String.valueOf(PARAMETER_SEPARATOR)); final BundleFilter filter = new BundleFilter(); for (String parameter : parameters) { if (parameter.startsWith(PROVIDER_TAG)) { final String[] providers = par...
542927_2
@Override public final ProcessStatus getStatus() { return status; }
542927_3
@Override public final void setStatus(ProcessStatus newStatus) { if (!newStatus.equals(status) && !newStatus.equals(ProcessStatus.UNKNOWN)) { ProcessStatus oldStatus = status; status = newStatus; fireStatusChanged(new WorkflowStatusEvent(this, oldStatus, newStatus, new Date())); } }
542927_4
@Override public String toString() { String startString = startDate != null ? DATE_FORMAT.format(startDate) : "null"; String stopString = stopDate != null ? DATE_FORMAT.format(stopDate) : "null"; return OPENING_BRACKET + startString + SEPARATOR + stopString + CLOSING_BRACKET; }
542927_5
@Override public String toString() { String startString = startDate != null ? DATE_FORMAT.format(startDate) : "null"; String stopString = stopDate != null ? DATE_FORMAT.format(stopDate) : "null"; return OPENING_BRACKET + startString + SEPARATOR + stopString + CLOSING_BRACKET; }
542927_6
public static DateRange parseDateRange(String dateRange) throws ParseException { String[] splits = dateRange.split(SEPARATOR); String startString = splits[0].replace(OPENING_BRACKET, ""); String stopString = splits[1].replace(CLOSING_BRACKET, ""); return new DateRange(parseDate(startString), parseDate(s...
542927_7
public static ProcessStatus aggregate(ProcessStatus... statuses) { assertStatusesNotNull(statuses); if (statuses.length == 0) { return UNKNOWN; } else if (statuses.length == 1) { return statuses[0]; } float averageProgress = getAverageProgress(statuses); for (ProcessStatus status...
542927_8
public static ProcessStatus aggregateUnsustainable(ProcessStatus... statuses) { assertStatusesNotNull(statuses); List<ProcessStatus> usable = new ArrayList<ProcessStatus>(statuses.length); for (ProcessStatus status : statuses) { if (status.getState() != ProcessState.ERROR && status.getState() != P...
542927_9
public boolean isDone() { return state.isDone(); }
551254_0
@Override public void loadFromStream(InputStream is) throws DataSourceException { Parser parser = new HTMLParse().getParserPublic(); data = new ArrayList<List<String>>(); ParserCallback callback = new DataSourceHtmlParser(); try { parser.parse(new InputStreamReader(is), callback, true); is.close(); } catch (IO...
551254_1
@Override public void loadFromStream(InputStream is) throws DataSourceException { Parser parser = new HTMLParse().getParserPublic(); data = new ArrayList<List<String>>(); ParserCallback callback = new DataSourceHtmlParser(); try { parser.parse(new InputStreamReader(is), callback, true); is.close(); } catch (IO...
551254_2
@Override public void loadFromStream(InputStream is) throws DataSourceException { Parser parser = new HTMLParse().getParserPublic(); data = new ArrayList<List<String>>(); ParserCallback callback = new DataSourceHtmlParser(); try { parser.parse(new InputStreamReader(is), callback, true); is.close(); } catch (IO...