id stringlengths 7 14 | text stringlengths 1 106k |
|---|---|
1553760_4 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_5 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_6 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_7 | @Override
public String generateId(String headingText) {
String id = headingText.toLowerCase(Locale.getDefault());
id = id.replaceAll("[^a-z0-9_-]", "-"); //$NON-NLS-1$//$NON-NLS-2$
CharMatcher hyphenMatcher = CharMatcher.is('-');
id = hyphenMatcher.trimFrom(hyphenMatcher.collapseFrom(id, '-'));
return id;
} |
1553760_8 | @Override
public boolean canStart(String line, int lineOffset) {
blockLineCount = 0;
if (lineOffset == 0) {
matcher = startPattern.matcher(line);
return matcher.matches();
} else {
matcher = null;
return false;
}
} |
1553760_9 | public void setPreprocessFootnotes(boolean preprocessFootnotes) {
this.preprocessFootnotes = preprocessFootnotes;
} |
1554165_0 | public HashMap<Enum, String> getDb() {
return db;
} |
1554165_1 | public HashMap<String, Enum> getVal() {
return val;
} |
1554165_2 | public synchronized Object getData(int requestTypeId, Object requestData) {
Object returnData = null;
switch (requestTypeId) {
case RequestTypeId.FIND_PERSON_MPI:
case RequestTypeId.FIND_PERSON_LPI:
Mediator.getLogger(Mpi.class.getName()).log(Level.FINE, "FindPerson");
re... |
1555964_8 | public boolean isBitSet(int bit) {
long bitMask = Long.rotateLeft(1, bit);
long result = this.bitMaskValue & bitMask;
if (result != 0) {
return true;
}
return false;
} |
1555964_9 | public boolean isBitSet(int bit) {
long bitMask = Long.rotateLeft(1, bit);
long result = this.bitMaskValue & bitMask;
if (result != 0) {
return true;
}
return false;
} |
1557148_0 | public static boolean isEmpty(final String text) {
return text == null || text.length() == 0;
} |
1557148_1 | public static void close(InputStream is) {
if (is != null) {
try {
is.close();
} catch (Exception e2) {
}
}
} |
1557148_2 | public static void close(InputStream is) {
if (is != null) {
try {
is.close();
} catch (Exception e2) {
}
}
} |
1557148_3 | public static Integer getYear(Calendar calendar) {
Integer year = calendar.get(Calendar.YEAR);
return year;
} |
1557148_4 | public static Integer getYear(Calendar calendar) {
Integer year = calendar.get(Calendar.YEAR);
return year;
} |
1557148_5 | public static Integer getYear(Calendar calendar) {
Integer year = calendar.get(Calendar.YEAR);
return year;
} |
1557148_6 | public static Integer getYear(Calendar calendar) {
Integer year = calendar.get(Calendar.YEAR);
return year;
} |
1557148_7 | public static Integer getYear(Calendar calendar) {
Integer year = calendar.get(Calendar.YEAR);
return year;
} |
1557148_8 | public static Integer getMonth(Calendar calendar) {
Integer month = calendar.get(Calendar.MONTH) + 1;
return month;
} |
1557148_9 | public static Integer getMonth(Calendar calendar) {
Integer month = calendar.get(Calendar.MONTH) + 1;
return month;
} |
1558503_0 | public static Date create(int year, int month, int date) {
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(year, month - 1, date);
return cal.getTime();
} |
1558503_1 | public static Date create(int year, int month, int date) {
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(year, month - 1, date);
return cal.getTime();
} |
1558503_2 | @Override
public int columns() {
return props.length;
} |
1558503_3 | @Override
public int rows() {
return pojoList.size();
} |
1558503_4 | @Override
public Object get(int row, int column) {
Object pojo = pojoList.get(row);
beanWrapper.setWrappedInstance(pojo);
TypeDescriptor fieldDesc = beanWrapper
.getPropertyTypeDescriptor(props[column]);
TypeDescriptor strDesc = TypeDescriptor.valueOf(String.class);
Object value = beanWrapper.getPropertyValue(p... |
1558503_5 | @Override
public void set(int row, int column, Object value) {
Object pojo = pojoList.get(row);
beanWrapper.setWrappedInstance(pojo);
TypeDescriptor fieldDesc = beanWrapper
.getPropertyTypeDescriptor(props[column]);
TypeDescriptor strDesc = TypeDescriptor.valueOf(String.class);
if (canConvert(value, fieldDesc, st... |
1558503_6 | @Override
public Object[][] toArray2D() {
Object[][] result = new Object[rows()][columns()];
for (int row = 0; row < rows(); row++) {
for (int column = 0; column < columns(); column++) {
result[row][column] = get(row, column);
}
}
return result;
} |
1575956_0 | String name() {
return spec.name();
} |
1575956_1 | String name() {
return spec.name();
} |
1575956_2 | String name() {
return spec.name();
} |
1575956_3 | String name() {
return spec.name();
} |
1575956_4 | @Override
public StatsLogger getStatsLogger(String scope) {
return this.cachingStatsProvider.getStatsLogger(scope);
} |
1575956_5 | @Override
public void start(Configuration conf) {
boolean httpEnabled = conf.getBoolean(PROMETHEUS_STATS_HTTP_ENABLE, DEFAULT_PROMETHEUS_STATS_HTTP_ENABLE);
boolean bkHttpServerEnabled = conf.getBoolean("httpServerEnabled", false);
// only start its own http server when prometheus http is enabled and bk htt... |
1575956_6 | @Override
public StatsLogger getStatsLogger(String scope) {
return this.cachingStatsProvider.getStatsLogger(scope);
} |
1575956_7 | public synchronized void run() throws Exception {
long start = System.currentTimeMillis();
long testEnd = start + (duration * 1000);
long testDrainEnd = testEnd + (drainTimeout * 1000);
/* Keep IO running until testEnd */
while (System.currentTimeMillis() < testEnd) {
/* see startRead and st... |
1575956_8 | @SuppressWarnings("deprecation")
@SneakyThrows(InterruptedException.class)
protected void initialize(AbstractConfiguration<?> conf,
StatsLogger statsLogger,
RetryPolicy zkRetryPolicy,
Optional<Object> optionalCtx) throws MetadataException {
... |
1575956_9 | @SneakyThrows
public synchronized LedgerManagerFactory getLedgerManagerFactory()
throws MetadataException {
if (null == lmFactory) {
try {
lmFactory = AbstractZkLedgerManagerFactory.newLedgerManagerFactory(
conf,
layoutManager);
} catch (IOExceptio... |
1577630_0 | public void print(final Value v) throws RippleException {
if (null == v) {
throw new NullPointerException();
}
if (v instanceof IRI) {
printURI((IRI) v);
} else if (v instanceof Literal) {
printLiteral((Literal) v);
} else if (v instanceof BNode) {
print("_:");
... |
1577630_1 | @Override
public int arity() {
return 2;
} |
1577630_2 | public Object eval(final String script,
final ScriptContext context) throws ScriptException {
// TODO: use context
return eval(script);
} |
1577630_3 | public Object eval(final String script,
final ScriptContext context) throws ScriptException {
// TODO: use context
return eval(script);
} |
1577630_4 | public Object eval(final String script,
final ScriptContext context) throws ScriptException {
// TODO: use context
return eval(script);
} |
1577630_5 | public Object eval(final String script,
final ScriptContext context) throws ScriptException {
// TODO: use context
return eval(script);
} |
1577630_6 | public String getMethodCallSyntax(final String obj,
final String m,
final String... args) {
StringBuilder sb = new StringBuilder(obj);
for (String arg : args) {
sb.append(" ");
sb.append(arg);
}
sb.append(" ");
sb.ap... |
1577630_7 | public String getProgram(final String... statements) {
StringBuilder sb = new StringBuilder();
boolean first = true;
for (String st : statements) {
if (first) {
first = false;
} else {
sb.append("\n");
}
sb.append(st);
// It doesn't hurt to add... |
1577630_8 | public Object getParameter(final String key) {
return null; //To change body of implemented methods use File | Settings | File Templates.
} |
1577630_9 | public String getOutputStatement(final String toDisplay) {
return null; //To change body of implemented methods use File | Settings | File Templates.
} |
1579900_0 | public int getPercentile (float value)
{
if (value < _min) {
return 0;
} else if (value > _max) {
return 100;
} else {
return _percentile[toBucketIndex(value)];
}
} |
1579936_0 | public String merge (String newlyGenerated, String previouslyGenerated)
throws Exception
{
// Extract the generated section names from the output and make sure they're all matched
Map<String, Section> sections = Maps.newLinkedHashMap();
Matcher m = _sectionDelimiter.matcher(newlyGenerated);
while (m... |
1579936_1 | public String merge (String newlyGenerated, String previouslyGenerated)
throws Exception
{
// Extract the generated section names from the output and make sure they're all matched
Map<String, Section> sections = Maps.newLinkedHashMap();
Matcher m = _sectionDelimiter.matcher(newlyGenerated);
while (m... |
1579936_2 | public String merge (String newlyGenerated, String previouslyGenerated)
throws Exception
{
// Extract the generated section names from the output and make sure they're all matched
Map<String, Section> sections = Maps.newLinkedHashMap();
Matcher m = _sectionDelimiter.matcher(newlyGenerated);
while (m... |
1579936_3 | public String merge (String newlyGenerated, String previouslyGenerated)
throws Exception
{
// Extract the generated section names from the output and make sure they're all matched
Map<String, Section> sections = Maps.newLinkedHashMap();
Matcher m = _sectionDelimiter.matcher(newlyGenerated);
while (m... |
1579936_4 | public String merge (String newlyGenerated, String previouslyGenerated)
throws Exception
{
// Extract the generated section names from the output and make sure they're all matched
Map<String, Section> sections = Maps.newLinkedHashMap();
Matcher m = _sectionDelimiter.matcher(newlyGenerated);
while (m... |
1581151_0 | public long toLong() {
long result = 0L;
for (int i = 0; i < array.length; ++i) {
result = (result << FULL_BYTE_SHIFT) + (array[i] & FULL_BYTE_MASK);
}
return result;
} |
1581151_1 | public byte[] toByteArray() {
final byte[] tmp = new byte[LENGTH];
System.arraycopy(array, 0, tmp, 0, LENGTH);
return tmp;
} |
1581151_2 | public long toLong() {
long result = 0L;
for (int i = 0; i < array.length; ++i) {
result = (result << FULL_BYTE_SHIFT) + (array[i] & FULL_BYTE_MASK);
}
return result;
} |
1581151_3 | public byte[] toByteArray() {
final byte[] tmp = new byte[LENGTH];
System.arraycopy(array, 0, tmp, 0, LENGTH);
return tmp;
} |
1581151_4 | public byte[] toByteArray() {
final byte[] tmp = new byte[LENGTH];
System.arraycopy(array, 0, tmp, 0, LENGTH);
return tmp;
} |
1581151_5 | public long toLong() {
long result = 0L;
for (int i = 0; i < array.length; ++i) {
result = (result << FULL_BYTE_SHIFT) + (array[i] & FULL_BYTE_MASK);
}
return result;
} |
1581151_6 | @Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final MacAddress that = (MacAddress) o;
return Arrays.equals(array, that.array);
} |
1581151_7 | @Override
public int hashCode() {
return Arrays.hashCode(array);
} |
1581151_8 | public MacAddress to16BitMacAddress() {
byte[] result = new byte[LENGTH];
int offset = LENGTH - 2;
System.arraycopy(array, offset, result, offset, 2);
return new MacAddress(result);
} |
1583138_0 | @Override
public boolean isRunning() {
return !fired;
} |
1583138_1 | @Override
public boolean isRunning() {
return !fired;
} |
1583138_2 | public int getTotalPages() {
return totalPages;
} |
1583138_3 | public static double minimumDifference(double a, double b) {
double diffAngle = b - a;
if (diffAngle > 180)
diffAngle -= 360;
else if (diffAngle < -180)
diffAngle += 360;
return diffAngle;
} |
1583138_4 | @Override
public boolean isEmpty() {
return items.isEmpty();
} |
1583138_5 | @Override
public boolean isEmpty() {
return items.isEmpty();
} |
1583138_6 | public void update() {
boolean down = isDown();
pressed = !wasDown && down;
released = wasDown && !down;
holded = down && !pressed;
wasDown = down;
} |
1583138_7 | public void update() {
boolean down = isDown();
pressed = !wasDown && down;
released = wasDown && !down;
holded = down && !pressed;
wasDown = down;
} |
1583138_8 | public void update() {
boolean down = isDown();
pressed = !wasDown && down;
released = wasDown && !down;
holded = down && !pressed;
wasDown = down;
} |
1583138_9 | public void update() {
boolean down = isDown();
pressed = !wasDown && down;
released = wasDown && !down;
holded = down && !pressed;
wasDown = down;
} |
1584558_0 | public static boolean isHiddenSingle(SDKSquare s, SDKBoard board) {
LinkedList<SDKSquare> zsqrs = board.getSquaresInZone(s);
zsqrs.remove(s);
LinkedList<SDKSquare> csqrs = board.getSquaresInCol(s.col);
csqrs.remove(s);
LinkedList<SDKSquare> rsqrs = board.getSquaresInRow(s.row);
rsqrs.remove(s);
HashSet<Integer> ... |
1589946_0 | public static List<Category> fromCatalogAPI(TaxonomyResponse response) {
if (response == null || response.getTaxonomy() == null) {
return null;
}
return convertChildren(response.getTaxonomy().getCategories());
} |
1589946_1 | @Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o == null || !(o instanceof Rating)) {
return false;
}
Rating rhs = (Rating) o;
return new EqualsBuilder()
.append(dimension, rhs.dimension)
.append(value, rhs.value)
... |
1589946_2 | public static MerchantResponse fromCatalogAPI(MerchantsResponse response) {
final MerchantResponse output = new MerchantResponse();
output.setMerchants(convertMerchants(response));
return output;
} |
1589946_3 | public static MerchantResponse fromCatalogAPI(MerchantsResponse response) {
final MerchantResponse output = new MerchantResponse();
output.setMerchants(convertMerchants(response));
return output;
} |
1589946_4 | public static CatalogResponse fromCatalogAPI(ProductResponse result) {
if (result == null) {
return null;
}
CatalogResponse toReturn = new CatalogResponse();
Classification classification = result.getClassification();
if (classification != null) {
toReturn.setRelevancyScore(classific... |
1589946_5 | public static CatalogResponse fromCatalogAPI(ProductResponse result) {
if (result == null) {
return null;
}
CatalogResponse toReturn = new CatalogResponse();
Classification classification = result.getClassification();
if (classification != null) {
toReturn.setRelevancyScore(classific... |
1589946_6 | public static CatalogResponse fromCatalogAPI(ProductResponse result) {
if (result == null) {
return null;
}
CatalogResponse toReturn = new CatalogResponse();
Classification classification = result.getClassification();
if (classification != null) {
toReturn.setRelevancyScore(classific... |
1589946_7 | public static CatalogResponse fromCatalogAPI(ProductResponse result) {
if (result == null) {
return null;
}
CatalogResponse toReturn = new CatalogResponse();
Classification classification = result.getClassification();
if (classification != null) {
toReturn.setRelevancyScore(classific... |
1589946_8 | public static CatalogResponse fromCatalogAPI(ProductResponse result) {
if (result == null) {
return null;
}
CatalogResponse toReturn = new CatalogResponse();
Classification classification = result.getClassification();
if (classification != null) {
toReturn.setRelevancyScore(classific... |
1589946_9 | public static AttributeSearchResponse fromCatalogAPI(AttributeResponse result) {
AttributeSearchResponse attributeSearchResponse = new AttributeSearchResponse();
if (inputIsValid(result)) {
return attributeSearchResponse;
}
AttributeResponse.Attributes resultAttributes = result.getAttributes();
... |
1592475_0 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_1 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_2 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_3 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_4 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_5 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_6 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_7 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_8 | public void traverse( Object instance, Selector selector, HierarchicalModel<?> model,
YogaRequestContext context ) throws IOException
{
if (instance != null)
{
if (instance instanceof Iterable)
{
traverseIterable( (Iterable<?>) instance, selector, (ListHierarchicalModel<?>) m... |
1592475_9 | public void setMetaDataRegistry( MetaDataRegistry metaDataRegistry )
{
this._metaDataRegistry = metaDataRegistry;
} |
1595052_0 | protected String getJdbcManagerComponentName(String name) {
String jmName = name;
if (StringUtil.isEmpty(jmName)) {
return "jdbcManager";
}
return jmName + "JdbcManager";
} |
1595052_1 | @Override
public String getJdbcManagerName() {
String name = jdbcManagerName.get();
if (! isValidSlaveJdbcManagerName(name)) {
name = getMasterJdbcManagerName();
}
return name;
} |
1595052_2 | @Override
public void useSlave() {
for (String name : masterSlaveJdbcManagerFactoryNames) {
useSlave(name);
}
} |
1595052_3 | @Override
public void useMaster() {
for (String name : masterSlaveJdbcManagerFactoryNames) {
useMaster(name);
}
} |
1595052_4 | @Override
public boolean isSlave() {
boolean slave = true;
for (String name : masterSlaveJdbcManagerFactoryNames) {
slave &= isSlave(name);
}
return slave;
} |
1595052_5 | @Override
public boolean isMaster() {
boolean master = true;
for (String name : masterSlaveJdbcManagerFactoryNames) {
master &= isMaster(name);
}
return master;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.