id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
4695543_2 | public static String camelCaseToLowerUnderscore(String s) {
if (s.toUpperCase().equals(s) && isLettersAndDigits(s)) {
return s.toLowerCase();
}
StringBuilder b = new StringBuilder();
b.append(s.charAt(0));
boolean underscoreAdded = false;
boolean lastCharacterUppercase = false;
for (... |
4695543_3 | public static String toColumnName(String attributeName) {
return camelCaseToLowerUnderscore(attributeName);
} |
4695543_4 | public static String toJavaConstantIdentifier(String name) {
StringBuilder s = new StringBuilder();
boolean funnyCharacter = false;
for (int i = 0; i < name.length(); i++) {
char ch = name.charAt(i);
if ((i == 0 && !Character.isJavaIdentifierStart(ch))
|| (i > 0 && !Character... |
4695543_5 | public static String toJavaConstantIdentifier(String name) {
StringBuilder s = new StringBuilder();
boolean funnyCharacter = false;
for (int i = 0; i < name.length(); i++) {
char ch = name.charAt(i);
if ((i == 0 && !Character.isJavaIdentifierStart(ch))
|| (i > 0 && !Character... |
4695543_6 | public static String camelCaseToLowerUnderscore(String s) {
if (s.toUpperCase().equals(s) && isLettersAndDigits(s)) {
return s.toLowerCase();
}
StringBuilder b = new StringBuilder();
b.append(s.charAt(0));
boolean underscoreAdded = false;
boolean lastCharacterUppercase = false;
for (... |
4695543_7 | public String generate(List<String> classes) {
StringBuilder s = new StringBuilder();
for (String cls : classes)
s.append("\t\t<class>" + cls + "</class>\n");
try {
String xml = IOUtils.toString(
PersistenceXmlWriter.class.getResourceAsStream("/persistence-template.txt"));
... |
4695543_8 | public synchronized Domains unmarshal(InputStream is) {
Preconditions.checkNotNull(is, "InputStream is null!");
try {
return unmarshaller.unmarshal(new StreamSource(is), Domains.class).getValue();
} catch (JAXBException e) {
throw new RuntimeException(e);
}
} |
4695543_9 | public synchronized Domains unmarshal(InputStream is) {
Preconditions.checkNotNull(is, "InputStream is null!");
try {
return unmarshaller.unmarshal(new StreamSource(is), Domains.class).getValue();
} catch (JAXBException e) {
throw new RuntimeException(e);
}
} |
4695732_1 | static int writeHeaderBuffer(final MapWriterConfiguration configuration,
final TileBasedDataProcessor dataProcessor, final ByteBuffer containerHeaderBuffer) {
LOGGER.fine("writing header");
LOGGER.fine("Bounding box for file: " + dataProcessor.getBoundingBox().maxLatitudeE6 + ", "
+ dataProcessor.getBoundingBox(... |
4709330_0 | public boolean validate() {
return !(userName == null || email == null);
} |
4709330_1 | @Override
public boolean equals(Object obj) {
return obj instanceof Tag && StringUtils.equalsIgnoreCase(this.getTagValue(), ((Tag) obj).getTagValue());
} |
4709330_2 | public PropertiesWrapper(Properties properties, PropertiesKeyMapper propertiesKeyMapper) {
this.properties = properties;
this.propertiesKeyMapper = propertiesKeyMapper;
} |
4709330_3 | public static void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
throw new UncheckedInterruptedException(e);
}
} |
4709330_4 | @SuppressWarnings("deprecation")
public static void stopQuietly(Thread thread, String stopMessage) {
if (thread == null) {
return;
}
// Wait 5000 second for natural death.
try {
thread.join(THREAD_WAITING_TIME);
} catch (Exception e) {
// Fall through
noOp();
}
try {
thread.interrupt();
} catch (Excep... |
4709330_5 | public static String dateToString(Date date) {
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()).format(date);
} |
4709330_6 | public static Date convertToServerDate(String userTimeZone, Date userDate) {
TimeZone userLocal = TimeZone.getTimeZone(userTimeZone);
int rawOffset = TimeZone.getDefault().getRawOffset() - userLocal.getRawOffset();
return new Date(userDate.getTime() + rawOffset);
} |
4709330_7 | public static Date convertToServerDate(String userTimeZone, Date userDate) {
TimeZone userLocal = TimeZone.getTimeZone(userTimeZone);
int rawOffset = TimeZone.getDefault().getRawOffset() - userLocal.getRawOffset();
return new Date(userDate.getTime() + rawOffset);
} |
4709330_8 | public static Date convertToUserDate(String userTimeZone, Date serverDate) {
TimeZone userLocal = TimeZone.getTimeZone(userTimeZone);
int rawOffset = userLocal.getRawOffset() - TimeZone.getDefault().getRawOffset();
return new Date(serverDate.getTime() + rawOffset);
} |
4709330_9 | public static Map<String, String> getFilteredTimeZoneMap() {
if (timezoneIDMap == null) {
timezoneIDMap = new LinkedHashMap<String, String>();
String[] ids = TimeZone.getAvailableIDs();
for (String id : ids) {
TimeZone zone = TimeZone.getTimeZone(id);
int offset = zone.getRawOffset();
int offsetSecond =... |
4713292_0 | public MorphologicalTag parseMorphologicalTag(String tagString) {
if (tagString == null) {
return null;
}
synchronized (cache) {
if (cache.containsKey(tagString)) {
return ((MorphologicalTag) cache.get(tagString)).clone();
}
}
MorphologicalTag m = new MorphologicalTag();
String[] tags = ta... |
4713292_1 | public String serialize(MorphologicalTag tag) {
StringBuilder res = new StringBuilder();
if (tag.getClazzE() != null) {
if (tag.getClazzE().equals(Class.VERB)) {
if (tag.getFinitenessE().equals(Finiteness.FINITE)) {
res.append("v-fin" + SEP);
} else if (tag.getFinitenessE().equals(Finiteness... |
4713292_2 | public MorphologicalTag parseMorphologicalTag(String tagString) {
if (tagString == null) {
return null;
}
synchronized (cache) {
if (cache.containsKey(tagString)) {
return ((MorphologicalTag) cache.get(tagString)).clone();
}
}
MorphologicalTag m = new MorphologicalTag();
String[] tags = ta... |
4713292_3 | private MorphologicalTag merge(MorphologicalTag a, MorphologicalTag b) {
MorphologicalTag ret = a.clone();
Class aClass = a.getClazzE();
Class bClass = b.getClazzE();
if (!isVariable(aClass)) {
ret = b.clone();
} else {
// prefer the noum
if (aClass.equals(Class.NOUN) && bClass.equals(Class.NOUN)
... |
4713292_4 | public void analyze(Document document) {
List<Sentence> sentences = document.getSentences();
for (Sentence sentence : sentences) {
Span[] namesSpan;
synchronized (this.nameFinder) {
namesSpan = nameFinder.find(TextUtils.tokensToString(sentence
.getTokens()));
}
List<Token> newTo... |
4713292_5 | public void analyze(Document document) {
List<Sentence> sentences = document.getSentences();
for (Sentence sentence : sentences) {
Span[] namesSpan;
synchronized (this.nameFinder) {
namesSpan = nameFinder.find(TextUtils.tokensToString(sentence
.getTokens()));
}
List<Token> newTo... |
4713292_6 | public void analyze(Document document) {
List<Sentence> sentences = document.getSentences();
for (Sentence sentence : sentences) {
Span[] namesSpan;
synchronized (this.nameFinder) {
namesSpan = nameFinder.find(TextUtils.tokensToString(sentence
.getTokens()));
}
List<Token> newTo... |
4713292_7 | public void analyze(Document document) {
List<Sentence> sentences = document.getSentences();
for (Sentence sentence : sentences) {
List<Token> tokens = sentence.getTokens();
String[] tags;
double[] probs;
String[][] ac = TextUtils.additionalContext(tokens,
Arrays.asList(Analyzers.CONTRA... |
4713292_8 | public void analyze(Document document) {
if (document.getText() == null)
throw new IllegalArgumentException("Document text is null.");
Span[] spans;
synchronized (sentenceDetector) {
spans = sentenceDetector.sentPosDetect(document.getText());
}
List<Sentence> sentences = new ArrayList<Sentence>(spans.... |
4713292_9 | public void analyze(Document document) {
if (document.getText() == null)
throw new IllegalArgumentException("Document text is null.");
Span[] spans;
synchronized (sentenceDetector) {
spans = sentenceDetector.sentPosDetect(document.getText());
}
List<Sentence> sentences = new ArrayList<Sentence>(spans.... |
4726303_0 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_1 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_2 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_3 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_4 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_5 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_6 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_7 | public TwoSourceJoin withCondition(BinaryBooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726303_8 | public ContextualProjection withContextPath(final EvaluationExpression contextPath) {
this.setContextPath(contextPath);
return this;
} |
4726303_9 | public Selection withCondition(BooleanExpression condition) {
this.setCondition(condition);
return this;
} |
4726428_0 | @Override
public void addTransferSample(TransferSample transferSample) throws IOException {
Transfer managedTransfer = get(transferSample.getTransfer().getId());
Sample managedSample = sampleService.get(transferSample.getItem().getId());
transferSample.setTransfer(managedTransfer);
transferSample.setItem(manage... |
4726428_1 | @Override
public void addTransferSample(TransferSample transferSample) throws IOException {
Transfer managedTransfer = get(transferSample.getTransfer().getId());
Sample managedSample = sampleService.get(transferSample.getItem().getId());
transferSample.setTransfer(managedTransfer);
transferSample.setItem(manage... |
4726428_2 | @Override
public void addTransferSample(TransferSample transferSample) throws IOException {
Transfer managedTransfer = get(transferSample.getTransfer().getId());
Sample managedSample = sampleService.get(transferSample.getItem().getId());
transferSample.setTransfer(managedTransfer);
transferSample.setItem(manage... |
4726428_3 | @Override
public void addTransferSample(TransferSample transferSample) throws IOException {
Transfer managedTransfer = get(transferSample.getTransfer().getId());
Sample managedSample = sampleService.get(transferSample.getItem().getId());
transferSample.setTransfer(managedTransfer);
transferSample.setItem(manage... |
4726428_4 | @Override
public void addTransferSample(TransferSample transferSample) throws IOException {
Transfer managedTransfer = get(transferSample.getTransfer().getId());
Sample managedSample = sampleService.get(transferSample.getItem().getId());
transferSample.setTransfer(managedTransfer);
transferSample.setItem(manage... |
4726428_5 | @Override
public void addTransferSample(TransferSample transferSample) throws IOException {
Transfer managedTransfer = get(transferSample.getTransfer().getId());
Sample managedSample = sampleService.get(transferSample.getItem().getId());
transferSample.setTransfer(managedTransfer);
transferSample.setItem(manage... |
4726428_6 | public static <T, R> boolean isSetAndChanged(Function<T, R> getter, T newItem, T beforeChange) {
R after = getter.apply(newItem);
if (after == null) {
return false;
} else if (beforeChange == null) {
return true;
}
R before = getter.apply(beforeChange);
return !after.equals(before);
} |
4726428_7 | public static <T, R> boolean isChanged(Function<T, R> getter, T newItem, T beforeChange) {
if (beforeChange == null) {
return true;
}
R after = getter.apply(newItem);
R before = getter.apply(beforeChange);
if (after == null) {
return before != null;
} else {
return !after.equals(before);
}
} |
4726428_8 | @Override
public long create(Sample sample) throws IOException {
loadChildEntities(sample);
boxService.throwIfBoxPositionIsFilled(sample);
User changeUser = authorizationManager.getCurrentUser();
sample.setChangeDetails(changeUser);
if (isDetailedSample(sample)) {
DetailedSample detailed = (DetailedSample... |
4726428_9 | @Override
public long create(Sample sample) throws IOException {
loadChildEntities(sample);
boxService.throwIfBoxPositionIsFilled(sample);
User changeUser = authorizationManager.getCurrentUser();
sample.setChangeDetails(changeUser);
if (isDetailedSample(sample)) {
DetailedSample detailed = (DetailedSample... |
4732484_0 | public <T, U extends T> T specialize(Class<T> parent, U t) throws SpecializationException {
try (Logger l = new Logger("ROOT specialize(" + parent.getSimpleName() + " " + t + ")")) {
ClassDescriptor specializedClass = specializeClass(t.getClass(), t);
return parent.cast(specializeInstance(specializedClass, t)... |
4737996_0 | public static String formatFileSize(long fileSize, int decimalPos) {
NumberFormat fmt = NumberFormat.getNumberInstance();
if (decimalPos >= 0) {
fmt.setMaximumFractionDigits(decimalPos);
}
String formattedSize;
final double size = fileSize;
double val = size / (BYTES_IN_KILOBYTE * B... |
4737996_1 | @Override
public SignatureFileInfo getLatestVersion(int currentVersion) {
Holder<Version> version = new Holder<Version>();
Holder<Boolean> deprecated = new Holder<Boolean>();
pronomService.getSignatureFileVersionV1(version, deprecated);
SignatureFileInfo info = new SignatureFileInfo(version.value
... |
4737996_2 | @Override
public SignatureFileInfo importSignatureFile(final Path targetDir) throws SignatureServiceException {
final Element sigFile = pronomService.getSignatureFileV1().getElement();
// get the version number, which needs to be part of the filename...
final int version = Integer.valueOf(sigFile.getAttribu... |
4737996_3 | @Override
public Map<SignatureType, SortedMap<String, SignatureFileInfo>> getAvailableSignatureFiles() {
final Path binSigFileDir = config.getSignatureFileDir();
final Path containerSigFileDir = config.getContainerSignatureDir();
//File textSigFileDir = config.getTextSignatureFileDir();
final ... |
4737996_4 | @Override
public Map<SignatureType, SignatureFileInfo> getLatestSignatureFiles() {
final Configuration properties = config.getProperties();
properties.setProperty(DroidGlobalProperty.LAST_UPDATE_CHECK.getName(), System.currentTimeMillis());
Map<SignatureType, SignatureFileInfo> latestSigFiles = new Has... |
4737996_5 | @Override
public Map<SignatureType, SignatureFileInfo> getLatestSignatureFiles() {
final Configuration properties = config.getProperties();
properties.setProperty(DroidGlobalProperty.LAST_UPDATE_CHECK.getName(), System.currentTimeMillis());
Map<SignatureType, SignatureFileInfo> latestSigFiles = new Has... |
4737996_6 | @Override
public SignatureFileInfo downloadLatest(final SignatureType type) throws SignatureManagerException {
final Path sigFileDir;
switch (type) {
case BINARY:
sigFileDir = config.getSignatureFileDir();
break;
case CONTAINER:
sigFileDir = config.getContaine... |
4737996_7 | @Override
public Map<SignatureType, SortedMap<String, SignatureFileInfo>> getAvailableSignatureFiles() {
final Path binSigFileDir = config.getSignatureFileDir();
final Path containerSigFileDir = config.getContainerSignatureDir();
//File textSigFileDir = config.getTextSignatureFileDir();
final ... |
4737996_8 | @Override
public Map<SignatureType, SignatureFileInfo> getDefaultSignatures() throws SignatureFileException {
Map<SignatureType, SignatureFileInfo> defaultSignatures = new HashMap<SignatureType, SignatureFileInfo>();
final Map<SignatureType, SortedMap<String, SignatureFileInfo>>
availableSign... |
4737996_9 | @Override
public Map<SignatureType, SignatureFileInfo> getLatestSignatureFiles() {
final Configuration properties = config.getProperties();
properties.setProperty(DroidGlobalProperty.LAST_UPDATE_CHECK.getName(), System.currentTimeMillis());
Map<SignatureType, SignatureFileInfo> latestSigFiles = new Has... |
4738719_0 | public static void waitFor(UtcT time)
{
if (time != null)
{
long now = System.nanoTime();
long delta = Time.millisTo(time);
long then = now + (delta * 1000000);
while (delta > 0)
{
try
{
Thread.sleep(delta);
}
... |
4738719_1 | @Override
public void setAttributes(Properties properties)
{
// Some lunatics illegally put non String objects into System props
// as keys / values - we ignore them.
for ( String key : properties.stringPropertyNames() )
{
setAttribute( key, properties.getProperty( key ) );
}
} |
4741942_0 | @Override
public synchronized void stop() {
open = false;
LOG.info("Stopping " + this);
try {
close();
} catch (IOException e) {
Throwables.propagate(e);
}
super.stop();
} |
4741942_1 | @Override
public void configure(Context context) {
memoryChannel.configure(context);
int capacity = context.getInteger(CAPACITY, DEFAULT_CAPACITY);
if(queueRemaining == null) {
queueRemaining = new Semaphore(capacity, true);
} else if(capacity > this.capacity) {
// capacity increase
queueRemaining.r... |
4741942_2 | @Override
public synchronized void start() {
LOG.info("Starting " + this);
try {
WALReplayResult<RecoverableMemoryChannelEvent> results = wal.replay();
Preconditions.checkArgument(results.getSequenceID() >= 0);
LOG.info("Replay SequenceID " + results.getSequenceID());
seqidGenerator.set(results.getS... |
4741942_3 | private int binarySearch(long value) {
int low = 0;
int high = size() - 1;
while (low <= high) {
int mid = (low + high) >>> 1;
long midVal = get(mid);
if (midVal < value) {
low = mid + 1;
} else if (midVal > value) {
high = mid - 1;
} else {
return mid; // key found
}
}... |
4741942_4 | @Override
public void swap(int leftIndex, int rightIndex) {
long left = get(leftIndex);
long right = get(rightIndex);
put(leftIndex, right);
put(rightIndex, left);
} |
4741942_5 | private void roll() throws IOException {
try {
rollInProgress = true;
LOG.info("Rolling WAL " + this.path);
if (dataFileWALWriter != null) {
fileLargestSequenceIDMap.put(dataFileWALWriter.getPath()
.getAbsolutePath(), dataFileWALWriter.getLargestSequenceID());
dataFileWALWriter.close... |
4741942_6 | @Override
public synchronized void stop() {
LOG.info("Stopping FileChannel with dataDir " + Arrays.toString(dataDirs));
try {
if(shutdownHookAdded && shutdownHook != null) {
Runtime.getRuntime().removeShutdownHook(shutdownHook);
shutdownHookAdded = false;
shutdownHook = null;
}
} finall... |
4741942_7 | @Override
public void configure(Context context) {
String homePath = System.getProperty("user.home").replace('\\', '/');
String strCheckpointDir =
context.getString(FileChannelConfiguration.CHECKPOINT_DIR,
homePath + "/.flume/file-channel/checkpoint");
String[] strDataDirs = context.getString(File... |
4741942_8 | void close() {
if(open) {
open = false;
log.close();
log = null;
queueRemaining = null;
}
} |
4741942_9 | @Override
public synchronized void start() {
LOG.info("Starting FileChannel with dataDir " + Arrays.toString(dataDirs));
try {
log = new Log(checkpointInterval, maxFileSize, capacity,
checkpointDir, dataDirs);
log.replay();
} catch (IOException e) {
Throwables.propagate(e);
}
open = true;... |
4741958_8 | public final void setState(double mean, double standardDeviation) {
if (mean != this.mean || standardDeviation != this.standardDeviation) {
this.mean = mean;
this.standardDeviation = standardDeviation;
this.variance = standardDeviation * standardDeviation;
this.cacheFilled = false;
this.normalizer... |
4744588_0 | @Override
public Map<String, String> getEnvironment() {
Map<String, String> env = Maps.newHashMap(extras.getEnv());
if (!lv.isNil(LuaFields.ENV)) {
env.putAll(lv.getTable(LuaFields.ENV).asMap());
}
return env;
} |
4744588_1 | public String toCommand(LuaWrapper table) {
StringBuilder sb = new StringBuilder(table.getString(LuaFields.COMMAND_BASE));
if (!table.isNil(LuaFields.ARGS)) {
LuaWrapper a = table.getTable(LuaFields.ARGS);
Iterator<LuaPair> namedArgsIter = a.hashIterator();
while (namedArgsIter.hasNext()) {
LuaPai... |
4744588_2 | @Override
public List<String> getCommands() {
List<String> cmds = Lists.newArrayList();
if (!lv.isNil(LuaFields.COMMANDS)) {
Iterator<LuaPair> pairsIter = lv.getTable(LuaFields.COMMANDS).arrayIterator();
while (pairsIter.hasNext()) {
LuaValue c = pairsIter.next().value;
if (c.isstring()) {
... |
4744588_3 | public Map<String,Long> getNumBytesOfGlobHeldByDatanodes(Path p) throws IOException {
return getNumBytesOfGlobHeldByDatanodes(p, getConf());
} |
4750298_0 | Pair<URL, Map<String, Serializable>> createParams(BufferedReader reader)
throws Exception {
String line = reader.readLine();
URL resourceId = null;
Map<String, Serializable> params = new HashMap<String, Serializable>();
while (line != null) {
line = line.trim();
if (line.length() > 0) {
if (resourceId == n... |
4757131_1 | public String edit() {
// check for an add
if (id != null) {
user = userManager.getUser(id);
} else {
user = new User();
}
return SUCCESS;
} |
4757131_2 | public String save() throws UserExistsException {
if (log.isDebugEnabled()) {
log.debug("entering 'save' method");
}
try {
userManager.saveUser(user);
} catch (UserExistsException uex) {
addActionError(getText("user.exists"));
return INPUT;
}
List<String> args = n... |
4757131_3 | @ModelAttribute
@RequestMapping(method = RequestMethod.GET)
protected User getUser(HttpServletRequest request) {
String userId = request.getParameter("id");
if ((userId != null) && !userId.equals("")) {
return userManager.getUser(userId);
} else {
return new User();
}
} |
4757131_4 | public List getUsers() {
List users = userManager.getUsers();
Comparator comparator;
if (sortColumn.equalsIgnoreCase("birthday")) {
comparator = new BeanDateComparator(sortColumn);
} else {
comparator = new BeanComparator(sortColumn);
}
if (!ascending) {
comparator = new ... |
4757131_5 | public String edit() {
// Workaround for not being able to set the id using #{param.id} when using Spring-configured managed-beans
if (id == null) {
id = getParameter("id");
}
if (id != null) {
// assuming edit
setUser(userManager.getUser(id));
}
return "success";
} |
4757131_6 | public String save() {
// For some reason, WebTest + Tomcat causes version to be 0. Works fine on Jetty.
if (user.getId() != null && user.getId() == 0) {
user.setId(null);
}
if (user.getId() == null) {
user.setVersion(null);
}
try {
userManager.saveUser(user);
} catch... |
4757131_7 | @DontValidate @DefaultHandler
public Resolution view() {
if (id != null) {
try {
user = userManager.getUser(id);
} catch (ObjectRetrievalFailureException e) {
e.printStackTrace();
getContext().getMessages().add(new LocalizableMessage("user.missing"));
... |
4757131_8 | @DefaultHandler
public final Resolution execute() {
users = userManager.getUsers();
return new ForwardResolution("/userList.jsp");
} |
4759439_0 | public static void processImage(String in, String out) throws IOException {
File imageFile = new File(in);
BufferedImage bufferedImage= ImageIO.read(imageFile);
int width = bufferedImage.getWidth(null);
int height = bufferedImage.getHeight(null);
BufferedImage alphaImage = new BufferedImage((width+(... |
4782751_0 | public static String createJWP(Bridge bridge, String name,
Reference callbackRef) {
// Format: {name: STRING, callback: BRIDGEREF }
Map<String, Object> data = new HashMap<String, Object>();
data.put("name", name);
if (callbackRef != null) {
data.put("callback", callbackRef);
}
return createCommand(bridge, "JO... |
4782751_1 | public static String createGETCHANNEL(Bridge bridge, String channelName) {
// Format: {name: STRING }
Map<String, Object> data = new HashMap<String, Object>();
data.put("name", channelName);
return createCommand(bridge, "GETCHANNEL", data);
} |
4782751_2 | public static String createJC(Bridge bridge, String name,
Reference handlerRef, boolean writeable,
Reference callbackRef) {
// Format: {name: STRING, handler: BRIDGEREF , callback: BRIDGEREF
Map<String, Object> data = new HashMap<String, Object>();
data.put("name", name);
data.put("writeable", Boolean.valueOf(w... |
4782751_3 | public static String createCONNECT(Bridge bridge, String sessionId,
String secret, String apiKey) {
// Format: {session: [SESSIONID, SECRET] || [null ,null], api_key:
// API_KEY || null}
Map<String, Object> data = new HashMap<String, Object>();
List<String> session = Arrays.asList(sessionId, secret);
data.put("s... |
4782751_4 | public String getObjectId() {
return objectId;
} |
4782751_5 | public String getMethodName() {
return methodName;
} |
4782751_6 | public void setDestinationType(String destinationType) {
this.destinationType = destinationType;
} |
4782751_7 | public void setDestinationId(String destinationId) {
this.destinationId = destinationId;
} |
4782751_8 | public void setObjectId(String objectId) {
this.objectId = objectId;
} |
4782751_9 | public void setMethodName(String methodName) {
this.methodName = methodName;
} |
478661_10 | public String[] readNext() throws IOException {
String[] result = null;
do {
String nextLine = getNextLine();
if (!hasNext) {
return result; // should throw if still pending?
}
String[] r = parser.parseLineMulti(nextLine);
if (r.length > 0) {
if (r... |
478661_11 | public String[] readNext() throws IOException {
String[] result = null;
do {
String nextLine = getNextLine();
if (!hasNext) {
return result; // should throw if still pending?
}
String[] r = parser.parseLineMulti(nextLine);
if (r.length > 0) {
if (r... |
478661_12 | public String[] readNext() throws IOException {
String[] result = null;
do {
String nextLine = getNextLine();
if (!hasNext) {
return result; // should throw if still pending?
}
String[] r = parser.parseLineMulti(nextLine);
if (r.length > 0) {
if (r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.