id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
11,400 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java | EbInterfaceWriter.ebInterface302 | @Nonnull
public static EbInterfaceWriter <Ebi302InvoiceType> ebInterface302 ()
{
final EbInterfaceWriter <Ebi302InvoiceType> ret = EbInterfaceWriter.create (Ebi302InvoiceType.class);
ret.setNamespaceContext (EbInterface302NamespaceContext.getInstance ());
return ret;
} | java | @Nonnull
public static EbInterfaceWriter <Ebi302InvoiceType> ebInterface302 ()
{
final EbInterfaceWriter <Ebi302InvoiceType> ret = EbInterfaceWriter.create (Ebi302InvoiceType.class);
ret.setNamespaceContext (EbInterface302NamespaceContext.getInstance ());
return ret;
} | [
"@",
"Nonnull",
"public",
"static",
"EbInterfaceWriter",
"<",
"Ebi302InvoiceType",
">",
"ebInterface302",
"(",
")",
"{",
"final",
"EbInterfaceWriter",
"<",
"Ebi302InvoiceType",
">",
"ret",
"=",
"EbInterfaceWriter",
".",
"create",
"(",
"Ebi302InvoiceType",
".",
"clas... | Create a writer builder for Ebi302InvoiceType.
@return The builder and never <code>null</code> | [
"Create",
"a",
"writer",
"builder",
"for",
"Ebi302InvoiceType",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java#L97-L103 |
11,401 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java | EbInterfaceWriter.ebInterface40 | @Nonnull
public static EbInterfaceWriter <Ebi40InvoiceType> ebInterface40 ()
{
final EbInterfaceWriter <Ebi40InvoiceType> ret = EbInterfaceWriter.create (Ebi40InvoiceType.class);
ret.setNamespaceContext (EbInterface40NamespaceContext.getInstance ());
return ret;
} | java | @Nonnull
public static EbInterfaceWriter <Ebi40InvoiceType> ebInterface40 ()
{
final EbInterfaceWriter <Ebi40InvoiceType> ret = EbInterfaceWriter.create (Ebi40InvoiceType.class);
ret.setNamespaceContext (EbInterface40NamespaceContext.getInstance ());
return ret;
} | [
"@",
"Nonnull",
"public",
"static",
"EbInterfaceWriter",
"<",
"Ebi40InvoiceType",
">",
"ebInterface40",
"(",
")",
"{",
"final",
"EbInterfaceWriter",
"<",
"Ebi40InvoiceType",
">",
"ret",
"=",
"EbInterfaceWriter",
".",
"create",
"(",
"Ebi40InvoiceType",
".",
"class",
... | Create a writer builder for Ebi40InvoiceType.
@return The builder and never <code>null</code> | [
"Create",
"a",
"writer",
"builder",
"for",
"Ebi40InvoiceType",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java#L110-L116 |
11,402 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java | EbInterfaceWriter.ebInterface41 | @Nonnull
public static EbInterfaceWriter <Ebi41InvoiceType> ebInterface41 ()
{
final EbInterfaceWriter <Ebi41InvoiceType> ret = EbInterfaceWriter.create (Ebi41InvoiceType.class);
ret.setNamespaceContext (EbInterface41NamespaceContext.getInstance ());
return ret;
} | java | @Nonnull
public static EbInterfaceWriter <Ebi41InvoiceType> ebInterface41 ()
{
final EbInterfaceWriter <Ebi41InvoiceType> ret = EbInterfaceWriter.create (Ebi41InvoiceType.class);
ret.setNamespaceContext (EbInterface41NamespaceContext.getInstance ());
return ret;
} | [
"@",
"Nonnull",
"public",
"static",
"EbInterfaceWriter",
"<",
"Ebi41InvoiceType",
">",
"ebInterface41",
"(",
")",
"{",
"final",
"EbInterfaceWriter",
"<",
"Ebi41InvoiceType",
">",
"ret",
"=",
"EbInterfaceWriter",
".",
"create",
"(",
"Ebi41InvoiceType",
".",
"class",
... | Create a writer builder for Ebi41InvoiceType.
@return The builder and never <code>null</code> | [
"Create",
"a",
"writer",
"builder",
"for",
"Ebi41InvoiceType",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java#L123-L129 |
11,403 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java | EbInterfaceWriter.ebInterface42 | @Nonnull
public static EbInterfaceWriter <Ebi42InvoiceType> ebInterface42 ()
{
final EbInterfaceWriter <Ebi42InvoiceType> ret = EbInterfaceWriter.create (Ebi42InvoiceType.class);
ret.setNamespaceContext (EbInterface42NamespaceContext.getInstance ());
return ret;
} | java | @Nonnull
public static EbInterfaceWriter <Ebi42InvoiceType> ebInterface42 ()
{
final EbInterfaceWriter <Ebi42InvoiceType> ret = EbInterfaceWriter.create (Ebi42InvoiceType.class);
ret.setNamespaceContext (EbInterface42NamespaceContext.getInstance ());
return ret;
} | [
"@",
"Nonnull",
"public",
"static",
"EbInterfaceWriter",
"<",
"Ebi42InvoiceType",
">",
"ebInterface42",
"(",
")",
"{",
"final",
"EbInterfaceWriter",
"<",
"Ebi42InvoiceType",
">",
"ret",
"=",
"EbInterfaceWriter",
".",
"create",
"(",
"Ebi42InvoiceType",
".",
"class",
... | Create a writer builder for Ebi42InvoiceType.
@return The builder and never <code>null</code> | [
"Create",
"a",
"writer",
"builder",
"for",
"Ebi42InvoiceType",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java#L136-L142 |
11,404 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java | EbInterfaceWriter.ebInterface43 | @Nonnull
public static EbInterfaceWriter <Ebi43InvoiceType> ebInterface43 ()
{
final EbInterfaceWriter <Ebi43InvoiceType> ret = EbInterfaceWriter.create (Ebi43InvoiceType.class);
ret.setNamespaceContext (EbInterface43NamespaceContext.getInstance ());
return ret;
} | java | @Nonnull
public static EbInterfaceWriter <Ebi43InvoiceType> ebInterface43 ()
{
final EbInterfaceWriter <Ebi43InvoiceType> ret = EbInterfaceWriter.create (Ebi43InvoiceType.class);
ret.setNamespaceContext (EbInterface43NamespaceContext.getInstance ());
return ret;
} | [
"@",
"Nonnull",
"public",
"static",
"EbInterfaceWriter",
"<",
"Ebi43InvoiceType",
">",
"ebInterface43",
"(",
")",
"{",
"final",
"EbInterfaceWriter",
"<",
"Ebi43InvoiceType",
">",
"ret",
"=",
"EbInterfaceWriter",
".",
"create",
"(",
"Ebi43InvoiceType",
".",
"class",
... | Create a writer builder for Ebi43InvoiceType.
@return The builder and never <code>null</code> | [
"Create",
"a",
"writer",
"builder",
"for",
"Ebi43InvoiceType",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java#L149-L155 |
11,405 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java | EbInterfaceWriter.ebInterface50 | @Nonnull
public static EbInterfaceWriter <Ebi50InvoiceType> ebInterface50 ()
{
final EbInterfaceWriter <Ebi50InvoiceType> ret = EbInterfaceWriter.create (Ebi50InvoiceType.class);
ret.setNamespaceContext (EbInterface50NamespaceContext.getInstance ());
return ret;
} | java | @Nonnull
public static EbInterfaceWriter <Ebi50InvoiceType> ebInterface50 ()
{
final EbInterfaceWriter <Ebi50InvoiceType> ret = EbInterfaceWriter.create (Ebi50InvoiceType.class);
ret.setNamespaceContext (EbInterface50NamespaceContext.getInstance ());
return ret;
} | [
"@",
"Nonnull",
"public",
"static",
"EbInterfaceWriter",
"<",
"Ebi50InvoiceType",
">",
"ebInterface50",
"(",
")",
"{",
"final",
"EbInterfaceWriter",
"<",
"Ebi50InvoiceType",
">",
"ret",
"=",
"EbInterfaceWriter",
".",
"create",
"(",
"Ebi50InvoiceType",
".",
"class",
... | Create a writer builder for Ebi50InvoiceType.
@return The builder and never <code>null</code> | [
"Create",
"a",
"writer",
"builder",
"for",
"Ebi50InvoiceType",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/builder/EbInterfaceWriter.java#L162-L168 |
11,406 | telly/groundy | library/src/main/java/com/telly/groundy/CallbacksManager.java | CallbacksManager.init | public static CallbacksManager init(Bundle bundle, Object... callbackHandlers) {
if (bundle == null) {
return new CallbacksManager();
}
CallbacksManager callbacksManager = new CallbacksManager();
ArrayList<TaskHandler> taskProxies = bundle.getParcelableArrayList(TASK_PROXY_LIST);
if (taskProx... | java | public static CallbacksManager init(Bundle bundle, Object... callbackHandlers) {
if (bundle == null) {
return new CallbacksManager();
}
CallbacksManager callbacksManager = new CallbacksManager();
ArrayList<TaskHandler> taskProxies = bundle.getParcelableArrayList(TASK_PROXY_LIST);
if (taskProx... | [
"public",
"static",
"CallbacksManager",
"init",
"(",
"Bundle",
"bundle",
",",
"Object",
"...",
"callbackHandlers",
")",
"{",
"if",
"(",
"bundle",
"==",
"null",
")",
"{",
"return",
"new",
"CallbacksManager",
"(",
")",
";",
"}",
"CallbacksManager",
"callbacksMan... | Call from within your activity or fragment onCreate method.
@param bundle the onSaveInstance bundle
@param callbackHandlers an array of callback handlers to mange
@return an instance of {@link CallbacksManager} | [
"Call",
"from",
"within",
"your",
"activity",
"or",
"fragment",
"onCreate",
"method",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/CallbacksManager.java#L63-L81 |
11,407 | telly/groundy | library/src/main/java/com/telly/groundy/CallbacksManager.java | CallbacksManager.linkCallbacks | public void linkCallbacks(Object... callbackHandlers) {
if (callbackHandlers != null) {
for (TaskHandler proxyTask : new ArrayList<TaskHandler>(proxyTasks)) {
proxyTask.clearCallbacks();
proxyTask.appendCallbacks(callbackHandlers);
}
}
} | java | public void linkCallbacks(Object... callbackHandlers) {
if (callbackHandlers != null) {
for (TaskHandler proxyTask : new ArrayList<TaskHandler>(proxyTasks)) {
proxyTask.clearCallbacks();
proxyTask.appendCallbacks(callbackHandlers);
}
}
} | [
"public",
"void",
"linkCallbacks",
"(",
"Object",
"...",
"callbackHandlers",
")",
"{",
"if",
"(",
"callbackHandlers",
"!=",
"null",
")",
"{",
"for",
"(",
"TaskHandler",
"proxyTask",
":",
"new",
"ArrayList",
"<",
"TaskHandler",
">",
"(",
"proxyTasks",
")",
")... | Links the specified callback handlers to their respective tasks.
@param callbackHandlers an array of callback handlers | [
"Links",
"the",
"specified",
"callback",
"handlers",
"to",
"their",
"respective",
"tasks",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/CallbacksManager.java#L88-L95 |
11,408 | telly/groundy | library/src/main/java/com/telly/groundy/CallbacksManager.java | CallbacksManager.onSaveInstanceState | public void onSaveInstanceState(Bundle bundle) {
bundle.putParcelableArrayList(TASK_PROXY_LIST, proxyTasks);
for (TaskHandler proxyTask : proxyTasks) {
bundle.putParcelable(GROUNDY_PROXY_KEY_PREFIX + proxyTask.getTaskId(), proxyTask);
}
} | java | public void onSaveInstanceState(Bundle bundle) {
bundle.putParcelableArrayList(TASK_PROXY_LIST, proxyTasks);
for (TaskHandler proxyTask : proxyTasks) {
bundle.putParcelable(GROUNDY_PROXY_KEY_PREFIX + proxyTask.getTaskId(), proxyTask);
}
} | [
"public",
"void",
"onSaveInstanceState",
"(",
"Bundle",
"bundle",
")",
"{",
"bundle",
".",
"putParcelableArrayList",
"(",
"TASK_PROXY_LIST",
",",
"proxyTasks",
")",
";",
"for",
"(",
"TaskHandler",
"proxyTask",
":",
"proxyTasks",
")",
"{",
"bundle",
".",
"putParc... | Saves the current callback handlers information in order to restore them after the
configuration change.
@param bundle the same bundle you receive from within your activity or fragment
onSaveInstanceState method | [
"Saves",
"the",
"current",
"callback",
"handlers",
"information",
"in",
"order",
"to",
"restore",
"them",
"after",
"the",
"configuration",
"change",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/CallbacksManager.java#L104-L109 |
11,409 | ralscha/extclassgenerator | src/main/java/ch/rasc/extclassgenerator/ModelBean.java | ModelBean.addFields | public void addFields(List<ModelFieldBean> modelFields) {
Assert.notNull(modelFields, "modelFields must not be null");
for (ModelFieldBean bean : modelFields) {
this.fields.put(bean.getName(), bean);
}
} | java | public void addFields(List<ModelFieldBean> modelFields) {
Assert.notNull(modelFields, "modelFields must not be null");
for (ModelFieldBean bean : modelFields) {
this.fields.put(bean.getName(), bean);
}
} | [
"public",
"void",
"addFields",
"(",
"List",
"<",
"ModelFieldBean",
">",
"modelFields",
")",
"{",
"Assert",
".",
"notNull",
"(",
"modelFields",
",",
"\"modelFields must not be null\"",
")",
";",
"for",
"(",
"ModelFieldBean",
"bean",
":",
"modelFields",
")",
"{",
... | Add all provided fields to the collection of fields
@param modelFields collection of {@link ModelFieldBean} | [
"Add",
"all",
"provided",
"fields",
"to",
"the",
"collection",
"of",
"fields"
] | 6f106cf5ca83ef004225a3512e2291dfd028cf07 | https://github.com/ralscha/extclassgenerator/blob/6f106cf5ca83ef004225a3512e2291dfd028cf07/src/main/java/ch/rasc/extclassgenerator/ModelBean.java#L194-L200 |
11,410 | telly/groundy | library/src/main/java/com/telly/groundy/L.java | L.d | public static void d(String tag, String msg) {
if (logEnabled) {
Log.d(tag, msg);
}
} | java | public static void d(String tag, String msg) {
if (logEnabled) {
Log.d(tag, msg);
}
} | [
"public",
"static",
"void",
"d",
"(",
"String",
"tag",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"logEnabled",
")",
"{",
"Log",
".",
"d",
"(",
"tag",
",",
"msg",
")",
";",
"}",
"}"
] | Sends a debug message to the log.
@param tag Tag to use
@param msg Message to send | [
"Sends",
"a",
"debug",
"message",
"to",
"the",
"log",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/L.java#L47-L51 |
11,411 | telly/groundy | library/src/main/java/com/telly/groundy/Groundy.java | Groundy.service | public Groundy service(Class<? extends GroundyService> groundyClass) {
if (groundyClass == GroundyService.class) {
throw new IllegalStateException(
"This method is meant to set a different GroundyService implementation. "
+ "You cannot use GroundyService.class, http://i.imgur.com/IR23P... | java | public Groundy service(Class<? extends GroundyService> groundyClass) {
if (groundyClass == GroundyService.class) {
throw new IllegalStateException(
"This method is meant to set a different GroundyService implementation. "
+ "You cannot use GroundyService.class, http://i.imgur.com/IR23P... | [
"public",
"Groundy",
"service",
"(",
"Class",
"<",
"?",
"extends",
"GroundyService",
">",
"groundyClass",
")",
"{",
"if",
"(",
"groundyClass",
"==",
"GroundyService",
".",
"class",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"This method is meant to ... | This allows you to use a different GroundyService implementation.
@param groundyClass a different Groundy service implementation
@return itself | [
"This",
"allows",
"you",
"to",
"use",
"a",
"different",
"GroundyService",
"implementation",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L203-L212 |
11,412 | telly/groundy | library/src/main/java/com/telly/groundy/GroundyTaskFactory.java | GroundyTaskFactory.get | static GroundyTask get(Class<? extends GroundyTask> taskClass, Context context) {
if (CACHE.containsKey(taskClass)) {
return CACHE.get(taskClass);
}
GroundyTask groundyTask = null;
try {
L.d(TAG, "Instantiating " + taskClass);
Constructor ctc = taskClass.getConstructor();
groundy... | java | static GroundyTask get(Class<? extends GroundyTask> taskClass, Context context) {
if (CACHE.containsKey(taskClass)) {
return CACHE.get(taskClass);
}
GroundyTask groundyTask = null;
try {
L.d(TAG, "Instantiating " + taskClass);
Constructor ctc = taskClass.getConstructor();
groundy... | [
"static",
"GroundyTask",
"get",
"(",
"Class",
"<",
"?",
"extends",
"GroundyTask",
">",
"taskClass",
",",
"Context",
"context",
")",
"{",
"if",
"(",
"CACHE",
".",
"containsKey",
"(",
"taskClass",
")",
")",
"{",
"return",
"CACHE",
".",
"get",
"(",
"taskCla... | Builds a GroundyTask based on call.
@param taskClass groundy value implementation class
@param context used to instantiate the value
@return An instance of a GroundyTask if a given call is valid null otherwise | [
"Builds",
"a",
"GroundyTask",
"based",
"on",
"call",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/GroundyTaskFactory.java#L47-L68 |
11,413 | ralscha/extclassgenerator | src/main/java/ch/rasc/extclassgenerator/ModelFieldBean.java | ModelFieldBean.hasOnlyName | public boolean hasOnlyName(OutputConfig outputConfig) {
if (StringUtils.hasText(this.name) && !StringUtils.hasText(this.type)
&& this.defaultValue == null && !StringUtils.hasText(this.dateFormat)
&& !StringUtils.hasText(this.mapping) && this.persist == null
&& !StringUtils.hasText(this.convert)) {
if (... | java | public boolean hasOnlyName(OutputConfig outputConfig) {
if (StringUtils.hasText(this.name) && !StringUtils.hasText(this.type)
&& this.defaultValue == null && !StringUtils.hasText(this.dateFormat)
&& !StringUtils.hasText(this.mapping) && this.persist == null
&& !StringUtils.hasText(this.convert)) {
if (... | [
"public",
"boolean",
"hasOnlyName",
"(",
"OutputConfig",
"outputConfig",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"name",
")",
"&&",
"!",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"type",
")",
"&&",
"this",
".",
"defau... | Returns true if only the name property is set | [
"Returns",
"true",
"if",
"only",
"the",
"name",
"property",
"is",
"set"
] | 6f106cf5ca83ef004225a3512e2291dfd028cf07 | https://github.com/ralscha/extclassgenerator/blob/6f106cf5ca83ef004225a3512e2291dfd028cf07/src/main/java/ch/rasc/extclassgenerator/ModelFieldBean.java#L90-L112 |
11,414 | Terracotta-OSS/statistics | src/main/java/org/terracotta/statistics/derived/histogram/ExponentialHistogram.java | ExponentialHistogram.merge | public void merge(ExponentialHistogram b) {
if (b.mergeThreshold != mergeThreshold) {
throw new IllegalArgumentException();
}
merge(b.boxes, b.total);
} | java | public void merge(ExponentialHistogram b) {
if (b.mergeThreshold != mergeThreshold) {
throw new IllegalArgumentException();
}
merge(b.boxes, b.total);
} | [
"public",
"void",
"merge",
"(",
"ExponentialHistogram",
"b",
")",
"{",
"if",
"(",
"b",
".",
"mergeThreshold",
"!=",
"mergeThreshold",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"merge",
"(",
"b",
".",
"boxes",
",",
"b",
"."... | Merge the supplied ExponentialHistogram in to this one.
@param b histogram to merge
@throws IllegalArgumentException if the two merge-thresholds are not equals | [
"Merge",
"the",
"supplied",
"ExponentialHistogram",
"in",
"to",
"this",
"one",
"."
] | d24e4989b8c8dbe4f5210e49c7945d51b6585881 | https://github.com/Terracotta-OSS/statistics/blob/d24e4989b8c8dbe4f5210e49c7945d51b6585881/src/main/java/org/terracotta/statistics/derived/histogram/ExponentialHistogram.java#L77-L82 |
11,415 | Terracotta-OSS/statistics | src/main/java/org/terracotta/statistics/derived/histogram/ExponentialHistogram.java | ExponentialHistogram.expire | public long expire(long time) {
for (int logSize = (Long.SIZE - 1) - numberOfLeadingZeros(last); logSize >= 0; logSize--) {
boolean live = false;
for (int i = min_l(logSize); i < max_l(logSize); i++) {
long end = boxes[i];
if (end != MIN_VALUE) {
if ((time - end) >= window) {
... | java | public long expire(long time) {
for (int logSize = (Long.SIZE - 1) - numberOfLeadingZeros(last); logSize >= 0; logSize--) {
boolean live = false;
for (int i = min_l(logSize); i < max_l(logSize); i++) {
long end = boxes[i];
if (end != MIN_VALUE) {
if ((time - end) >= window) {
... | [
"public",
"long",
"expire",
"(",
"long",
"time",
")",
"{",
"for",
"(",
"int",
"logSize",
"=",
"(",
"Long",
".",
"SIZE",
"-",
"1",
")",
"-",
"numberOfLeadingZeros",
"(",
"last",
")",
";",
"logSize",
">=",
"0",
";",
"logSize",
"--",
")",
"{",
"boolea... | Expire old events.
@param time current timestamp
@return the count following expiry | [
"Expire",
"old",
"events",
"."
] | d24e4989b8c8dbe4f5210e49c7945d51b6585881 | https://github.com/Terracotta-OSS/statistics/blob/d24e4989b8c8dbe4f5210e49c7945d51b6585881/src/main/java/org/terracotta/statistics/derived/histogram/ExponentialHistogram.java#L248-L269 |
11,416 | airomem/airomem | airomem-chatsample/airomem-chatsample-web/src/main/java/pl/setblack/chatsample/web/ChatService.java | ChatService.putJson | @PUT
@Consumes("application/json")
public void putJson(IncomingMessage msg) {
chatBean.addMessage(msg.nick, msg.content);
} | java | @PUT
@Consumes("application/json")
public void putJson(IncomingMessage msg) {
chatBean.addMessage(msg.nick, msg.content);
} | [
"@",
"PUT",
"@",
"Consumes",
"(",
"\"application/json\"",
")",
"public",
"void",
"putJson",
"(",
"IncomingMessage",
"msg",
")",
"{",
"chatBean",
".",
"addMessage",
"(",
"msg",
".",
"nick",
",",
"msg",
".",
"content",
")",
";",
"}"
] | PUT method for updating or creating an instance of ChatService
@param content representation for the resource
@return an HTTP response with content of the updated or created resource. | [
"PUT",
"method",
"for",
"updating",
"or",
"creating",
"an",
"instance",
"of",
"ChatService"
] | 281ce18ff64836fccfb0edab18b8d677f1101a32 | https://github.com/airomem/airomem/blob/281ce18ff64836fccfb0edab18b8d677f1101a32/airomem-chatsample/airomem-chatsample-web/src/main/java/pl/setblack/chatsample/web/ChatService.java#L60-L64 |
11,417 | telly/groundy | library/src/main/java/com/telly/groundy/GroundyTask.java | GroundyTask.callback | protected void callback(String name, Bundle resultData) {
if (resultData == null) resultData = new Bundle();
resultData.putString(Groundy.KEY_CALLBACK_NAME, name);
resultData.putSerializable(Groundy.TASK_IMPLEMENTATION, getClass());
send(OnCallback.class, resultData);
} | java | protected void callback(String name, Bundle resultData) {
if (resultData == null) resultData = new Bundle();
resultData.putString(Groundy.KEY_CALLBACK_NAME, name);
resultData.putSerializable(Groundy.TASK_IMPLEMENTATION, getClass());
send(OnCallback.class, resultData);
} | [
"protected",
"void",
"callback",
"(",
"String",
"name",
",",
"Bundle",
"resultData",
")",
"{",
"if",
"(",
"resultData",
"==",
"null",
")",
"resultData",
"=",
"new",
"Bundle",
"(",
")",
";",
"resultData",
".",
"putString",
"(",
"Groundy",
".",
"KEY_CALLBACK... | Sends this data to the callback methods annotated with the specified name.
@param name the name of the callback to invoke
@param resultData optional arguments to send | [
"Sends",
"this",
"data",
"to",
"the",
"callback",
"methods",
"annotated",
"with",
"the",
"specified",
"name",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/GroundyTask.java#L242-L247 |
11,418 | telly/groundy | compiler/src/main/java/com/telly/groundy/GroundyCodeGen.java | GroundyCodeGen.mergeProxiesWithClassHierarchy | private void mergeProxiesWithClassHierarchy() {
for (Map.Entry<HandlerAndTask, Set<ProxyImplContent>> elementSetEntry : implMap.entrySet()) {
final HandlerAndTask handlerAndTask = elementSetEntry.getKey();
// 1. merge super tasks, for same handler
final Set<Element> superTasks = getSuperClasses(h... | java | private void mergeProxiesWithClassHierarchy() {
for (Map.Entry<HandlerAndTask, Set<ProxyImplContent>> elementSetEntry : implMap.entrySet()) {
final HandlerAndTask handlerAndTask = elementSetEntry.getKey();
// 1. merge super tasks, for same handler
final Set<Element> superTasks = getSuperClasses(h... | [
"private",
"void",
"mergeProxiesWithClassHierarchy",
"(",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"HandlerAndTask",
",",
"Set",
"<",
"ProxyImplContent",
">",
">",
"elementSetEntry",
":",
"implMap",
".",
"entrySet",
"(",
")",
")",
"{",
"final",
"Handl... | Merges callbacks implementations taking into account the supper types of the handlers and
the tasks.
1. It will look for callbacks of the super classes of the tasks, in the same handler.
2. It will look for callbacks of the super classes of the handler, that use the same task.
3. It will look for callbacks of the super... | [
"Merges",
"callbacks",
"implementations",
"taking",
"into",
"account",
"the",
"supper",
"types",
"of",
"the",
"handlers",
"and",
"the",
"tasks",
".",
"1",
".",
"It",
"will",
"look",
"for",
"callbacks",
"of",
"the",
"super",
"classes",
"of",
"the",
"tasks",
... | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/compiler/src/main/java/com/telly/groundy/GroundyCodeGen.java#L130-L160 |
11,419 | telly/groundy | compiler/src/main/java/com/telly/groundy/GroundyCodeGen.java | GroundyCodeGen.appendNonExistentCallbacks | private void appendNonExistentCallbacks(HandlerAndTask from, HandlerAndTask to) {
final Set<ProxyImplContent> proxyImplContentsTo = implMap.get(to);
if (proxyImplContentsTo == null) {
return;
}
final Set<ProxyImplContent> proxyImplContentsFrom = implMap.get(from);
if (proxyImplContentsFrom ==... | java | private void appendNonExistentCallbacks(HandlerAndTask from, HandlerAndTask to) {
final Set<ProxyImplContent> proxyImplContentsTo = implMap.get(to);
if (proxyImplContentsTo == null) {
return;
}
final Set<ProxyImplContent> proxyImplContentsFrom = implMap.get(from);
if (proxyImplContentsFrom ==... | [
"private",
"void",
"appendNonExistentCallbacks",
"(",
"HandlerAndTask",
"from",
",",
"HandlerAndTask",
"to",
")",
"{",
"final",
"Set",
"<",
"ProxyImplContent",
">",
"proxyImplContentsTo",
"=",
"implMap",
".",
"get",
"(",
"to",
")",
";",
"if",
"(",
"proxyImplCont... | Copy all callbacks implementations from -> to the specified set. It makes sure
to copy the callbacks that don't exist already on the destination set.
@param from key for the set of callbacks to copy from
@param to key for the set of callbacks to copy to | [
"Copy",
"all",
"callbacks",
"implementations",
"from",
"-",
">",
"to",
"the",
"specified",
"set",
".",
"It",
"makes",
"sure",
"to",
"copy",
"the",
"callbacks",
"that",
"don",
"t",
"exist",
"already",
"on",
"the",
"destination",
"set",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/compiler/src/main/java/com/telly/groundy/GroundyCodeGen.java#L169-L193 |
11,420 | telly/groundy | compiler/src/main/java/com/telly/groundy/GroundyCodeGen.java | GroundyCodeGen.getParamNames | private static List<NameAndType> getParamNames(Element callbackMethod) {
Element parentClass = callbackMethod.getEnclosingElement();
String methodFullInfo = parentClass + "#" + callbackMethod;
ExecutableElement method = (ExecutableElement) callbackMethod;
if (!method.getModifiers().contains(Modifier.P... | java | private static List<NameAndType> getParamNames(Element callbackMethod) {
Element parentClass = callbackMethod.getEnclosingElement();
String methodFullInfo = parentClass + "#" + callbackMethod;
ExecutableElement method = (ExecutableElement) callbackMethod;
if (!method.getModifiers().contains(Modifier.P... | [
"private",
"static",
"List",
"<",
"NameAndType",
">",
"getParamNames",
"(",
"Element",
"callbackMethod",
")",
"{",
"Element",
"parentClass",
"=",
"callbackMethod",
".",
"getEnclosingElement",
"(",
")",
";",
"String",
"methodFullInfo",
"=",
"parentClass",
"+",
"\"#... | Makes sure method is public, returns void and all its parameters are annotated too. | [
"Makes",
"sure",
"method",
"is",
"public",
"returns",
"void",
"and",
"all",
"its",
"parameters",
"are",
"annotated",
"too",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/compiler/src/main/java/com/telly/groundy/GroundyCodeGen.java#L443-L472 |
11,421 | ralscha/extclassgenerator | src/main/java/ch/rasc/extclassgenerator/ReferenceBean.java | ReferenceBean.hasAnyProperties | public boolean hasAnyProperties() {
return StringUtils.hasText(this.type) || StringUtils.hasText(this.association)
|| StringUtils.hasText(this.child) || StringUtils.hasText(this.parent)
|| StringUtils.hasText(this.role) || StringUtils.hasText(this.inverse);
} | java | public boolean hasAnyProperties() {
return StringUtils.hasText(this.type) || StringUtils.hasText(this.association)
|| StringUtils.hasText(this.child) || StringUtils.hasText(this.parent)
|| StringUtils.hasText(this.role) || StringUtils.hasText(this.inverse);
} | [
"public",
"boolean",
"hasAnyProperties",
"(",
")",
"{",
"return",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"type",
")",
"||",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"association",
")",
"||",
"StringUtils",
".",
"hasText",
"(",
"this",
"."... | Tests if something is set. | [
"Tests",
"if",
"something",
"is",
"set",
"."
] | 6f106cf5ca83ef004225a3512e2291dfd028cf07 | https://github.com/ralscha/extclassgenerator/blob/6f106cf5ca83ef004225a3512e2291dfd028cf07/src/main/java/ch/rasc/extclassgenerator/ReferenceBean.java#L47-L51 |
11,422 | eirbjo/jetty-console | jetty-console-maven-plugin/src/main/java/org/simplericity/jettyconsole/CreateDescriptorMojo.java | CreateDescriptorMojo.hasSlf4jBinding | private boolean hasSlf4jBinding(File file) throws MojoExecutionException {
try (JarFile jarFile = new JarFile(file)){
return jarFile.getEntry("org/slf4j/impl/StaticLoggerBinder.class") != null;
} catch (IOException e) {
throw new MojoExecutionException(e.getMessage(), e);
... | java | private boolean hasSlf4jBinding(File file) throws MojoExecutionException {
try (JarFile jarFile = new JarFile(file)){
return jarFile.getEntry("org/slf4j/impl/StaticLoggerBinder.class") != null;
} catch (IOException e) {
throw new MojoExecutionException(e.getMessage(), e);
... | [
"private",
"boolean",
"hasSlf4jBinding",
"(",
"File",
"file",
")",
"throws",
"MojoExecutionException",
"{",
"try",
"(",
"JarFile",
"jarFile",
"=",
"new",
"JarFile",
"(",
"file",
")",
")",
"{",
"return",
"jarFile",
".",
"getEntry",
"(",
"\"org/slf4j/impl/StaticLo... | Returns true if the given jar file contains an SLF4J binding
@param file the file
@return true if the jar file contains an SLF4J binding | [
"Returns",
"true",
"if",
"the",
"given",
"jar",
"file",
"contains",
"an",
"SLF4J",
"binding"
] | 5bd32ecab12837394dd45fd15c51c3934afcd76b | https://github.com/eirbjo/jetty-console/blob/5bd32ecab12837394dd45fd15c51c3934afcd76b/jetty-console-maven-plugin/src/main/java/org/simplericity/jettyconsole/CreateDescriptorMojo.java#L283-L289 |
11,423 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/visualization/VisualizationManager.java | VisualizationManager.getXSLTTemplates | @Nullable
public static Templates getXSLTTemplates (@Nonnull final EEbInterfaceVersion eVersion)
{
final String sNamespaceURI = eVersion.getNamespaceURI ();
final Templates ret = s_aRWLock.readLocked ( () -> s_aTemplates.get (sNamespaceURI));
if (ret != null)
return ret;
return s_aRWLock.writ... | java | @Nullable
public static Templates getXSLTTemplates (@Nonnull final EEbInterfaceVersion eVersion)
{
final String sNamespaceURI = eVersion.getNamespaceURI ();
final Templates ret = s_aRWLock.readLocked ( () -> s_aTemplates.get (sNamespaceURI));
if (ret != null)
return ret;
return s_aRWLock.writ... | [
"@",
"Nullable",
"public",
"static",
"Templates",
"getXSLTTemplates",
"(",
"@",
"Nonnull",
"final",
"EEbInterfaceVersion",
"eVersion",
")",
"{",
"final",
"String",
"sNamespaceURI",
"=",
"eVersion",
".",
"getNamespaceURI",
"(",
")",
";",
"final",
"Templates",
"ret"... | Get the precompiled XSLT template to be used. It is lazily initialized upon
first call.
@param eVersion
The ebInterface version to be used. May not be <code>null</code>.
@return The XSLT {@link Templates} to be used to visualize invoices or
<code>null</code> if the template is buggy! | [
"Get",
"the",
"precompiled",
"XSLT",
"template",
"to",
"be",
"used",
".",
"It",
"is",
"lazily",
"initialized",
"upon",
"first",
"call",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/visualization/VisualizationManager.java#L75-L100 |
11,424 | phax/ph-ebinterface | src/main/java/com/helger/ebinterface/visualization/VisualizationManager.java | VisualizationManager.visualize | @Nonnull
public static ESuccess visualize (@Nonnull final EEbInterfaceVersion eVersion,
@Nonnull final Source aSource,
@Nonnull final Result aResult)
{
ValueEnforcer.notNull (eVersion, "version");
// Get cache XSL templates
final T... | java | @Nonnull
public static ESuccess visualize (@Nonnull final EEbInterfaceVersion eVersion,
@Nonnull final Source aSource,
@Nonnull final Result aResult)
{
ValueEnforcer.notNull (eVersion, "version");
// Get cache XSL templates
final T... | [
"@",
"Nonnull",
"public",
"static",
"ESuccess",
"visualize",
"(",
"@",
"Nonnull",
"final",
"EEbInterfaceVersion",
"eVersion",
",",
"@",
"Nonnull",
"final",
"Source",
"aSource",
",",
"@",
"Nonnull",
"final",
"Result",
"aResult",
")",
"{",
"ValueEnforcer",
".",
... | Visualize a source to a result for a certain ebInterface version using
XSLT. This is the most generic method.
@param eVersion
ebInterface version to use.
@param aSource
Source.
@param aResult
Destination
@return {@link ESuccess} | [
"Visualize",
"a",
"source",
"to",
"a",
"result",
"for",
"a",
"certain",
"ebInterface",
"version",
"using",
"XSLT",
".",
"This",
"is",
"the",
"most",
"generic",
"method",
"."
] | e3d2381f25c2fdfcc98acff2509bf5f33752d087 | https://github.com/phax/ph-ebinterface/blob/e3d2381f25c2fdfcc98acff2509bf5f33752d087/src/main/java/com/helger/ebinterface/visualization/VisualizationManager.java#L114-L138 |
11,425 | telly/groundy | library/src/main/java/com/telly/groundy/util/DownloadUtils.java | DownloadUtils.getDownloadListenerForTask | public static DownloadProgressListener getDownloadListenerForTask(final GroundyTask groundyTask) {
return new DownloadProgressListener() {
@Override
public void onProgress(String url, int progress) {
groundyTask.updateProgress(progress);
}
};
} | java | public static DownloadProgressListener getDownloadListenerForTask(final GroundyTask groundyTask) {
return new DownloadProgressListener() {
@Override
public void onProgress(String url, int progress) {
groundyTask.updateProgress(progress);
}
};
} | [
"public",
"static",
"DownloadProgressListener",
"getDownloadListenerForTask",
"(",
"final",
"GroundyTask",
"groundyTask",
")",
"{",
"return",
"new",
"DownloadProgressListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onProgress",
"(",
"String",
"url",
",",
... | Returns a progress listener that will post progress to the specified groundyTask.
@param groundyTask the groundyTask to post progress to. Cannot be null.
@return a progress listener | [
"Returns",
"a",
"progress",
"listener",
"that",
"will",
"post",
"progress",
"to",
"the",
"specified",
"groundyTask",
"."
] | e90baf9901a8be20b348bd1575d5ad782560cec8 | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/util/DownloadUtils.java#L102-L109 |
11,426 | Terracotta-OSS/statistics | src/main/java/org/terracotta/context/query/Matchers.java | Matchers.subclassOf | public static Matcher<Class<?>> subclassOf(final Class<?> klazz) {
return new Matcher<Class<?>>() {
@Override
protected boolean matchesSafely(Class<?> t) {
return klazz.isAssignableFrom(t);
}
@Override
public String toString() {
return "a subtype of " + klazz;
}... | java | public static Matcher<Class<?>> subclassOf(final Class<?> klazz) {
return new Matcher<Class<?>>() {
@Override
protected boolean matchesSafely(Class<?> t) {
return klazz.isAssignableFrom(t);
}
@Override
public String toString() {
return "a subtype of " + klazz;
}... | [
"public",
"static",
"Matcher",
"<",
"Class",
"<",
"?",
">",
">",
"subclassOf",
"(",
"final",
"Class",
"<",
"?",
">",
"klazz",
")",
"{",
"return",
"new",
"Matcher",
"<",
"Class",
"<",
"?",
">",
">",
"(",
")",
"{",
"@",
"Override",
"protected",
"bool... | Returns a matcher that matches classes that are sub-types of the supplied
class.
@param klazz a potential super-type
@return a {@code Class<?>} matcher | [
"Returns",
"a",
"matcher",
"that",
"matches",
"classes",
"that",
"are",
"sub",
"-",
"types",
"of",
"the",
"supplied",
"class",
"."
] | d24e4989b8c8dbe4f5210e49c7945d51b6585881 | https://github.com/Terracotta-OSS/statistics/blob/d24e4989b8c8dbe4f5210e49c7945d51b6585881/src/main/java/org/terracotta/context/query/Matchers.java#L107-L120 |
11,427 | Terracotta-OSS/statistics | src/main/java/org/terracotta/context/query/Matchers.java | Matchers.hasAttribute | public static Matcher<Map<String, Object>> hasAttribute(final String key, final Object value) {
return new Matcher<Map<String, Object>>() {
@Override
protected boolean matchesSafely(Map<String, Object> object) {
return object.containsKey(key) && value.equals(object.get(key));
}
};
} | java | public static Matcher<Map<String, Object>> hasAttribute(final String key, final Object value) {
return new Matcher<Map<String, Object>>() {
@Override
protected boolean matchesSafely(Map<String, Object> object) {
return object.containsKey(key) && value.equals(object.get(key));
}
};
} | [
"public",
"static",
"Matcher",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"hasAttribute",
"(",
"final",
"String",
"key",
",",
"final",
"Object",
"value",
")",
"{",
"return",
"new",
"Matcher",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",... | Returns a matcher that matches attribute maps that include the given
attribute entry.
@param key attribute name
@param value attribute value
@return a {@code Map<String, Object>} matcher | [
"Returns",
"a",
"matcher",
"that",
"matches",
"attribute",
"maps",
"that",
"include",
"the",
"given",
"attribute",
"entry",
"."
] | d24e4989b8c8dbe4f5210e49c7945d51b6585881 | https://github.com/Terracotta-OSS/statistics/blob/d24e4989b8c8dbe4f5210e49c7945d51b6585881/src/main/java/org/terracotta/context/query/Matchers.java#L130-L138 |
11,428 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELProcessor.java | ELProcessor.getValue | public Object getValue(String expression, Class<?> expectedType) {
ValueExpression exp = factory.createValueExpression(
elManager.getELContext(),
bracket(expression), expectedType);
return exp.getValue(elManager.getELContext());
} | java | public Object getValue(String expression, Class<?> expectedType) {
ValueExpression exp = factory.createValueExpression(
elManager.getELContext(),
bracket(expression), expectedType);
return exp.getValue(elManager.getELContext());
} | [
"public",
"Object",
"getValue",
"(",
"String",
"expression",
",",
"Class",
"<",
"?",
">",
"expectedType",
")",
"{",
"ValueExpression",
"exp",
"=",
"factory",
".",
"createValueExpression",
"(",
"elManager",
".",
"getELContext",
"(",
")",
",",
"bracket",
"(",
... | Evaluates an EL expression, and coerces the result to the specified type.
@param expression The EL expression to be evaluated.
@param expectedType Specifies the type that the resultant evaluation
will be coerced to.
@return The result of the expression evaluation. | [
"Evaluates",
"an",
"EL",
"expression",
"and",
"coerces",
"the",
"result",
"to",
"the",
"specified",
"type",
"."
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELProcessor.java#L125-L130 |
11,429 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELProcessor.java | ELProcessor.defineFunction | public void defineFunction(String prefix, String function, Method method)
throws NoSuchMethodException {
if (prefix == null || function == null || method == null) {
throw new NullPointerException("Null argument for defineFunction");
}
if (! Modifier.isStatic(method.getMod... | java | public void defineFunction(String prefix, String function, Method method)
throws NoSuchMethodException {
if (prefix == null || function == null || method == null) {
throw new NullPointerException("Null argument for defineFunction");
}
if (! Modifier.isStatic(method.getMod... | [
"public",
"void",
"defineFunction",
"(",
"String",
"prefix",
",",
"String",
"function",
",",
"Method",
"method",
")",
"throws",
"NoSuchMethodException",
"{",
"if",
"(",
"prefix",
"==",
"null",
"||",
"function",
"==",
"null",
"||",
"method",
"==",
"null",
")"... | Define an EL function in the local function mapper.
@param prefix The namespace for the function or "" for no namesapce.
@param function The name of the function.
If empty (""), the method name is used as the function name.
@param method The <code>java.lang.reflect.Method</code> instance of
the method that implements t... | [
"Define",
"an",
"EL",
"function",
"in",
"the",
"local",
"function",
"mapper",
"."
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELProcessor.java#L257-L269 |
11,430 | rpau/javalang | src/main/java/org/walkmod/javalang/actions/ReplaceAction.java | ReplaceAction.getText | public String getText(String indentation, char indentationChar) {
newCode = FormatterHelper.indent(
newNode.getPrettySource(indentationChar, indentationLevel, indentationSize, acceptedComments),
indentation, indentationChar, indentationLevel, indentationSize, requiresExtraIndent... | java | public String getText(String indentation, char indentationChar) {
newCode = FormatterHelper.indent(
newNode.getPrettySource(indentationChar, indentationLevel, indentationSize, acceptedComments),
indentation, indentationChar, indentationLevel, indentationSize, requiresExtraIndent... | [
"public",
"String",
"getText",
"(",
"String",
"indentation",
",",
"char",
"indentationChar",
")",
"{",
"newCode",
"=",
"FormatterHelper",
".",
"indent",
"(",
"newNode",
".",
"getPrettySource",
"(",
"indentationChar",
",",
"indentationLevel",
",",
"indentationSize",
... | Returns the new text to insert with the appropriate indentation and comments
@param indentation
the existing indentation at the file. It never should be null and it is needed for
files that mix tabs and spaces in the same line.
@param indentationChar
the used indentation char (' ', or '\t')
@return the new text that r... | [
"Returns",
"the",
"new",
"text",
"to",
"insert",
"with",
"the",
"appropriate",
"indentation",
"and",
"comments"
] | 17ab1d6cbe7527a2f272049c4958354328de2171 | https://github.com/rpau/javalang/blob/17ab1d6cbe7527a2f272049c4958354328de2171/src/main/java/org/walkmod/javalang/actions/ReplaceAction.java#L105-L112 |
11,431 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.getContext | public Object getContext(Class key) {
if(key == null) {
throw new NullPointerException();
}
return map.get(key);
} | java | public Object getContext(Class key) {
if(key == null) {
throw new NullPointerException();
}
return map.get(key);
} | [
"public",
"Object",
"getContext",
"(",
"Class",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"return",
"map",
".",
"get",
"(",
"key",
")",
";",
"}"
] | Returns the context object associated with the given key.
<p>The <code>ELContext</code> maintains a collection of context objects
relevant to the evaluation of an expression. These context objects
are used by <code>ELResolver</code>s. This method is used to
retrieve the context with the given key from the collection.... | [
"Returns",
"the",
"context",
"object",
"associated",
"with",
"the",
"given",
"key",
"."
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L219-L224 |
11,432 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.addEvaluationListener | public void addEvaluationListener(EvaluationListener listener) {
if (listeners == null) {
listeners = new ArrayList<EvaluationListener>();
}
listeners.add(listener);
} | java | public void addEvaluationListener(EvaluationListener listener) {
if (listeners == null) {
listeners = new ArrayList<EvaluationListener>();
}
listeners.add(listener);
} | [
"public",
"void",
"addEvaluationListener",
"(",
"EvaluationListener",
"listener",
")",
"{",
"if",
"(",
"listeners",
"==",
"null",
")",
"{",
"listeners",
"=",
"new",
"ArrayList",
"<",
"EvaluationListener",
">",
"(",
")",
";",
"}",
"listeners",
".",
"add",
"("... | Registers an evaluation listener to the ELContext.
@param listener The listener to be added.
@since EL 3.0 | [
"Registers",
"an",
"evaluation",
"listener",
"to",
"the",
"ELContext",
"."
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L315-L320 |
11,433 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.notifyBeforeEvaluation | public void notifyBeforeEvaluation(String expr) {
if (getEvaluationListeners() == null)
return;
for (EvaluationListener listener: getEvaluationListeners()) {
listener.beforeEvaluation(this, expr);
}
} | java | public void notifyBeforeEvaluation(String expr) {
if (getEvaluationListeners() == null)
return;
for (EvaluationListener listener: getEvaluationListeners()) {
listener.beforeEvaluation(this, expr);
}
} | [
"public",
"void",
"notifyBeforeEvaluation",
"(",
"String",
"expr",
")",
"{",
"if",
"(",
"getEvaluationListeners",
"(",
")",
"==",
"null",
")",
"return",
";",
"for",
"(",
"EvaluationListener",
"listener",
":",
"getEvaluationListeners",
"(",
")",
")",
"{",
"list... | Notifies the listeners before an EL expression is evaluated
@param expr The EL expression string to be evaluated | [
"Notifies",
"the",
"listeners",
"before",
"an",
"EL",
"expression",
"is",
"evaluated"
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L336-L342 |
11,434 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.notifyAfterEvaluation | public void notifyAfterEvaluation(String expr) {
if (getEvaluationListeners() == null)
return;
for (EvaluationListener listener: getEvaluationListeners()) {
listener.afterEvaluation(this, expr);
}
} | java | public void notifyAfterEvaluation(String expr) {
if (getEvaluationListeners() == null)
return;
for (EvaluationListener listener: getEvaluationListeners()) {
listener.afterEvaluation(this, expr);
}
} | [
"public",
"void",
"notifyAfterEvaluation",
"(",
"String",
"expr",
")",
"{",
"if",
"(",
"getEvaluationListeners",
"(",
")",
"==",
"null",
")",
"return",
";",
"for",
"(",
"EvaluationListener",
"listener",
":",
"getEvaluationListeners",
"(",
")",
")",
"{",
"liste... | Notifies the listeners after an EL expression is evaluated
@param expr The EL expression string that has been evaluated | [
"Notifies",
"the",
"listeners",
"after",
"an",
"EL",
"expression",
"is",
"evaluated"
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L348-L354 |
11,435 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.isLambdaArgument | public boolean isLambdaArgument(String arg) {
if (lambdaArgs == null) {
return false;
}
for (int i = lambdaArgs.size() - 1; i >= 0; i--) {
Map<String, Object> lmap = lambdaArgs.elementAt(i);
if (lmap.containsKey(arg)) {
return true;
... | java | public boolean isLambdaArgument(String arg) {
if (lambdaArgs == null) {
return false;
}
for (int i = lambdaArgs.size() - 1; i >= 0; i--) {
Map<String, Object> lmap = lambdaArgs.elementAt(i);
if (lmap.containsKey(arg)) {
return true;
... | [
"public",
"boolean",
"isLambdaArgument",
"(",
"String",
"arg",
")",
"{",
"if",
"(",
"lambdaArgs",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"lambdaArgs",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
... | Inquires if the name is a LambdaArgument
@param arg A possible Lambda formal parameter name
@return true if arg is a LambdaArgument, false otherwise. | [
"Inquires",
"if",
"the",
"name",
"is",
"a",
"LambdaArgument"
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L374-L386 |
11,436 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.getLambdaArgument | public Object getLambdaArgument(String arg) {
if (lambdaArgs == null) {
return null;
}
for (int i = lambdaArgs.size() - 1; i >= 0; i--) {
Map<String, Object> lmap = lambdaArgs.elementAt(i);
Object v = lmap.get(arg);
if (v != null) {
... | java | public Object getLambdaArgument(String arg) {
if (lambdaArgs == null) {
return null;
}
for (int i = lambdaArgs.size() - 1; i >= 0; i--) {
Map<String, Object> lmap = lambdaArgs.elementAt(i);
Object v = lmap.get(arg);
if (v != null) {
... | [
"public",
"Object",
"getLambdaArgument",
"(",
"String",
"arg",
")",
"{",
"if",
"(",
"lambdaArgs",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"lambdaArgs",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
... | Retrieves the Lambda argument associated with a formal parameter.
If the Lambda expression is nested within other Lambda expressions, the
arguments for the current Lambda expression is first searched, and if
not found, the arguments for the immediate nesting Lambda expression
then searched, and so on.
@param arg The f... | [
"Retrieves",
"the",
"Lambda",
"argument",
"associated",
"with",
"a",
"formal",
"parameter",
".",
"If",
"the",
"Lambda",
"expression",
"is",
"nested",
"within",
"other",
"Lambda",
"expressions",
"the",
"arguments",
"for",
"the",
"current",
"Lambda",
"expression",
... | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L400-L413 |
11,437 | jboss/jboss-el-api_spec | src/main/java/javax/el/ELContext.java | ELContext.enterLambdaScope | public void enterLambdaScope(Map<String,Object> args) {
if (lambdaArgs == null) {
lambdaArgs = new Stack<Map<String,Object>>();
}
lambdaArgs.push(args);
} | java | public void enterLambdaScope(Map<String,Object> args) {
if (lambdaArgs == null) {
lambdaArgs = new Stack<Map<String,Object>>();
}
lambdaArgs.push(args);
} | [
"public",
"void",
"enterLambdaScope",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"args",
")",
"{",
"if",
"(",
"lambdaArgs",
"==",
"null",
")",
"{",
"lambdaArgs",
"=",
"new",
"Stack",
"<",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"(",
")",
... | Installs a Lambda argument map, in preparation for the evaluation
of a Lambda expression. The arguments in the map will be in scope
during the evaluation of the Lambda expression.
@param args The Lambda arguments map
@since EL 3.0 | [
"Installs",
"a",
"Lambda",
"argument",
"map",
"in",
"preparation",
"for",
"the",
"evaluation",
"of",
"a",
"Lambda",
"expression",
".",
"The",
"arguments",
"in",
"the",
"map",
"will",
"be",
"in",
"scope",
"during",
"the",
"evaluation",
"of",
"the",
"Lambda",
... | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L422-L427 |
11,438 | rpau/javalang | src/main/java/org/walkmod/javalang/ast/CompilationUnit.java | CompilationUnit.setPackage | public void setPackage(PackageDeclaration pakage) {
if (this.pakage != null) {
updateReferences(this.pakage);
}
this.pakage = pakage;
setAsParentNodeOf(pakage);
} | java | public void setPackage(PackageDeclaration pakage) {
if (this.pakage != null) {
updateReferences(this.pakage);
}
this.pakage = pakage;
setAsParentNodeOf(pakage);
} | [
"public",
"void",
"setPackage",
"(",
"PackageDeclaration",
"pakage",
")",
"{",
"if",
"(",
"this",
".",
"pakage",
"!=",
"null",
")",
"{",
"updateReferences",
"(",
"this",
".",
"pakage",
")",
";",
"}",
"this",
".",
"pakage",
"=",
"pakage",
";",
"setAsParen... | Sets or clear the package declarations of this compilation unit.
@param pakage
the pakage declaration to set or <code>null</code> to default package | [
"Sets",
"or",
"clear",
"the",
"package",
"declarations",
"of",
"this",
"compilation",
"unit",
"."
] | 17ab1d6cbe7527a2f272049c4958354328de2171 | https://github.com/rpau/javalang/blob/17ab1d6cbe7527a2f272049c4958354328de2171/src/main/java/org/walkmod/javalang/ast/CompilationUnit.java#L240-L246 |
11,439 | hdbeukel/james-core | src/main/java/org/jamesframework/core/subset/neigh/SingleSwapNeighbourhood.java | SingleSwapNeighbourhood.getAllMoves | @Override
public List<SubsetMove> getAllMoves(SubsetSolution solution) {
// get set of candidate IDs for removal and addition (possibly fixed IDs are discarded)
Set<Integer> removeCandidates = getRemoveCandidates(solution);
Set<Integer> addCandidates = getAddCandidates(solution);
// ... | java | @Override
public List<SubsetMove> getAllMoves(SubsetSolution solution) {
// get set of candidate IDs for removal and addition (possibly fixed IDs are discarded)
Set<Integer> removeCandidates = getRemoveCandidates(solution);
Set<Integer> addCandidates = getAddCandidates(solution);
// ... | [
"@",
"Override",
"public",
"List",
"<",
"SubsetMove",
">",
"getAllMoves",
"(",
"SubsetSolution",
"solution",
")",
"{",
"// get set of candidate IDs for removal and addition (possibly fixed IDs are discarded)",
"Set",
"<",
"Integer",
">",
"removeCandidates",
"=",
"getRemoveCan... | Generates a list of all possible swap moves that transform the given subset solution by removing a single ID from
the current selection and replacing it with a new ID which is currently not selected. Possible fixed IDs are not
considered to be swapped. May return an empty list if no swap moves can be generated.
@param... | [
"Generates",
"a",
"list",
"of",
"all",
"possible",
"swap",
"moves",
"that",
"transform",
"the",
"given",
"subset",
"solution",
"by",
"removing",
"a",
"single",
"ID",
"from",
"the",
"current",
"selection",
"and",
"replacing",
"it",
"with",
"a",
"new",
"ID",
... | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/SingleSwapNeighbourhood.java#L97-L111 |
11,440 | rpau/javalang | src/main/java/org/walkmod/javalang/ast/PackageDeclaration.java | PackageDeclaration.setName | public void setName(NameExpr name) {
if (this.name != null) {
updateReferences(this.name);
}
this.name = name;
setAsParentNodeOf(name);
} | java | public void setName(NameExpr name) {
if (this.name != null) {
updateReferences(this.name);
}
this.name = name;
setAsParentNodeOf(name);
} | [
"public",
"void",
"setName",
"(",
"NameExpr",
"name",
")",
"{",
"if",
"(",
"this",
".",
"name",
"!=",
"null",
")",
"{",
"updateReferences",
"(",
"this",
".",
"name",
")",
";",
"}",
"this",
".",
"name",
"=",
"name",
";",
"setAsParentNodeOf",
"(",
"nam... | Sets the name of this package declaration.
@param name
the name to set | [
"Sets",
"the",
"name",
"of",
"this",
"package",
"declaration",
"."
] | 17ab1d6cbe7527a2f272049c4958354328de2171 | https://github.com/rpau/javalang/blob/17ab1d6cbe7527a2f272049c4958354328de2171/src/main/java/org/walkmod/javalang/ast/PackageDeclaration.java#L149-L155 |
11,441 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/algo/ParallelTempering.java | ParallelTempering.searchStep | @Override
protected void searchStep() {
// submit replicas for execution in thread pool
// (future returns index of respective replica)
for(int i=0; i < replicas.size(); i++){
futures.add(pool.submit(replicas.get(i), i));
}
// logger.debug("{}: started {} Metropol... | java | @Override
protected void searchStep() {
// submit replicas for execution in thread pool
// (future returns index of respective replica)
for(int i=0; i < replicas.size(); i++){
futures.add(pool.submit(replicas.get(i), i));
}
// logger.debug("{}: started {} Metropol... | [
"@",
"Override",
"protected",
"void",
"searchStep",
"(",
")",
"{",
"// submit replicas for execution in thread pool",
"// (future returns index of respective replica)",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"replicas",
".",
"size",
"(",
")",
";",
"i",
"... | In each search step, every replica performs several steps after which solutions of adjacent
replicas may be swapped.
@throws SearchException if an error occurs during concurrent execution of the Metropolis replicas
@throws JamesRuntimeException if depending on malfunctioning components (problem,
neighbourhood, replica... | [
"In",
"each",
"search",
"step",
"every",
"replica",
"performs",
"several",
"steps",
"after",
"which",
"solutions",
"of",
"adjacent",
"replicas",
"may",
"be",
"swapped",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/algo/ParallelTempering.java#L370-L432 |
11,442 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/algo/ParallelTempering.java | ParallelTempering.searchDisposed | @Override
protected void searchDisposed(){
// dispose replicas
replicas.forEach(r -> r.dispose());
// shut down thread pool
pool.shutdown();
// dispose super
super.searchDisposed();
} | java | @Override
protected void searchDisposed(){
// dispose replicas
replicas.forEach(r -> r.dispose());
// shut down thread pool
pool.shutdown();
// dispose super
super.searchDisposed();
} | [
"@",
"Override",
"protected",
"void",
"searchDisposed",
"(",
")",
"{",
"// dispose replicas",
"replicas",
".",
"forEach",
"(",
"r",
"->",
"r",
".",
"dispose",
"(",
")",
")",
";",
"// shut down thread pool",
"pool",
".",
"shutdown",
"(",
")",
";",
"// dispose... | When disposing a parallel tempering search, it will dispose each contained Metropolis replica and will
shut down the thread pool used for concurrent execution of replicas. | [
"When",
"disposing",
"a",
"parallel",
"tempering",
"search",
"it",
"will",
"dispose",
"each",
"contained",
"Metropolis",
"replica",
"and",
"will",
"shut",
"down",
"the",
"thread",
"pool",
"used",
"for",
"concurrent",
"execution",
"of",
"replicas",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/algo/ParallelTempering.java#L438-L446 |
11,443 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getIfdCount | public int getIfdCount() {
int c = 0;
if (metadata != null && metadata.contains("IFD"))
c = getMetadataList("IFD").size();
return c;
} | java | public int getIfdCount() {
int c = 0;
if (metadata != null && metadata.contains("IFD"))
c = getMetadataList("IFD").size();
return c;
} | [
"public",
"int",
"getIfdCount",
"(",
")",
"{",
"int",
"c",
"=",
"0",
";",
"if",
"(",
"metadata",
"!=",
"null",
"&&",
"metadata",
".",
"contains",
"(",
"\"IFD\"",
")",
")",
"c",
"=",
"getMetadataList",
"(",
"\"IFD\"",
")",
".",
"size",
"(",
")",
";"... | Gets the ifd count.
@return the ifd count | [
"Gets",
"the",
"ifd",
"count",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L156-L161 |
11,444 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getMainImagesCount | public int getMainImagesCount() {
int count = 0;
List<TiffObject> list = new ArrayList<>();
list.addAll(getMetadataList("IFD"));
list.addAll(getMetadataList("SubIFDs"));
for (TiffObject to : list) {
if (to instanceof IFD) {
IFD ifd = (IFD) to;
if (ifd.isImage() && !ifd.isThumb... | java | public int getMainImagesCount() {
int count = 0;
List<TiffObject> list = new ArrayList<>();
list.addAll(getMetadataList("IFD"));
list.addAll(getMetadataList("SubIFDs"));
for (TiffObject to : list) {
if (to instanceof IFD) {
IFD ifd = (IFD) to;
if (ifd.isImage() && !ifd.isThumb... | [
"public",
"int",
"getMainImagesCount",
"(",
")",
"{",
"int",
"count",
"=",
"0",
";",
"List",
"<",
"TiffObject",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"list",
".",
"addAll",
"(",
"getMetadataList",
"(",
"\"IFD\"",
")",
")",
";",
"... | Gets the main images count.
@return the ifd count | [
"Gets",
"the",
"main",
"images",
"count",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L190-L205 |
11,445 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getSubIfdCount | public int getSubIfdCount() {
int c = 0;
if (metadata != null && metadata.contains("SubIFDs"))
c = getMetadataList("SubIFDs").size();
return c;
} | java | public int getSubIfdCount() {
int c = 0;
if (metadata != null && metadata.contains("SubIFDs"))
c = getMetadataList("SubIFDs").size();
return c;
} | [
"public",
"int",
"getSubIfdCount",
"(",
")",
"{",
"int",
"c",
"=",
"0",
";",
"if",
"(",
"metadata",
"!=",
"null",
"&&",
"metadata",
".",
"contains",
"(",
"\"SubIFDs\"",
")",
")",
"c",
"=",
"getMetadataList",
"(",
"\"SubIFDs\"",
")",
".",
"size",
"(",
... | Gets the Subifd count.
@return the Subifd count | [
"Gets",
"the",
"Subifd",
"count",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L234-L239 |
11,446 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getIfds | public List<TiffObject> getIfds() {
List<TiffObject> l = new ArrayList<TiffObject>();
if (metadata != null && metadata.contains("IFD"))
l = getMetadataList("IFD");
return l;
} | java | public List<TiffObject> getIfds() {
List<TiffObject> l = new ArrayList<TiffObject>();
if (metadata != null && metadata.contains("IFD"))
l = getMetadataList("IFD");
return l;
} | [
"public",
"List",
"<",
"TiffObject",
">",
"getIfds",
"(",
")",
"{",
"List",
"<",
"TiffObject",
">",
"l",
"=",
"new",
"ArrayList",
"<",
"TiffObject",
">",
"(",
")",
";",
"if",
"(",
"metadata",
"!=",
"null",
"&&",
"metadata",
".",
"contains",
"(",
"\"I... | Returns a list of ifds including exifds.
@return the ifds list | [
"Returns",
"a",
"list",
"of",
"ifds",
"including",
"exifds",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L255-L260 |
11,447 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getImageIfds | public List<TiffObject> getImageIfds() {
List<TiffObject> l = new ArrayList<TiffObject>();
IFD oifd = this.firstIFD;
while (oifd != null) {
if (oifd.isImage()) {
if (oifd.hasSubIFD()) {
try {
long length = oifd.getMetadata().get("ImageLength").getFirstNumericValue();
... | java | public List<TiffObject> getImageIfds() {
List<TiffObject> l = new ArrayList<TiffObject>();
IFD oifd = this.firstIFD;
while (oifd != null) {
if (oifd.isImage()) {
if (oifd.hasSubIFD()) {
try {
long length = oifd.getMetadata().get("ImageLength").getFirstNumericValue();
... | [
"public",
"List",
"<",
"TiffObject",
">",
"getImageIfds",
"(",
")",
"{",
"List",
"<",
"TiffObject",
">",
"l",
"=",
"new",
"ArrayList",
"<",
"TiffObject",
">",
"(",
")",
";",
"IFD",
"oifd",
"=",
"this",
".",
"firstIFD",
";",
"while",
"(",
"oifd",
"!="... | Returns a list of ifds representing Images.
@return the ifds list | [
"Returns",
"a",
"list",
"of",
"ifds",
"representing",
"Images",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L267-L294 |
11,448 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getIfdsAndSubIfds | public List<TiffObject> getIfdsAndSubIfds() {
List<TiffObject> all = new ArrayList<TiffObject>();
all.addAll(getMetadataList("IFD"));
all.addAll(getMetadataList("SubIFDs"));
return all;
} | java | public List<TiffObject> getIfdsAndSubIfds() {
List<TiffObject> all = new ArrayList<TiffObject>();
all.addAll(getMetadataList("IFD"));
all.addAll(getMetadataList("SubIFDs"));
return all;
} | [
"public",
"List",
"<",
"TiffObject",
">",
"getIfdsAndSubIfds",
"(",
")",
"{",
"List",
"<",
"TiffObject",
">",
"all",
"=",
"new",
"ArrayList",
"<",
"TiffObject",
">",
"(",
")",
";",
"all",
".",
"addAll",
"(",
"getMetadataList",
"(",
"\"IFD\"",
")",
")",
... | Returns a list of subifds.
@return the subifds list | [
"Returns",
"a",
"list",
"of",
"subifds",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L322-L327 |
11,449 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.getMetadataList | public List<TiffObject> getMetadataList(String name) {
List<TiffObject> l = new ArrayList<TiffObject>();
if (metadata == null)
createMetadataDictionary();
if (metadata.contains(name))
l = metadata.getList(name);
return l;
} | java | public List<TiffObject> getMetadataList(String name) {
List<TiffObject> l = new ArrayList<TiffObject>();
if (metadata == null)
createMetadataDictionary();
if (metadata.contains(name))
l = metadata.getList(name);
return l;
} | [
"public",
"List",
"<",
"TiffObject",
">",
"getMetadataList",
"(",
"String",
"name",
")",
"{",
"List",
"<",
"TiffObject",
">",
"l",
"=",
"new",
"ArrayList",
"<",
"TiffObject",
">",
"(",
")",
";",
"if",
"(",
"metadata",
"==",
"null",
")",
"createMetadataDi... | Gets the metadata ok a given class name.
@param name the class name
@return the list of metadata that matches with the class name | [
"Gets",
"the",
"metadata",
"ok",
"a",
"given",
"class",
"name",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L386-L393 |
11,450 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.addMetadataFromIFD | private void addMetadataFromIFD(IFD ifd, String key, boolean exif) {
metadata.add(key, ifd);
for (TagValue tag : ifd.getMetadata().getTags()) {
if (tag.getCardinality() == 1) {
abstractTiffType t = tag.getValue().get(0);
if (t.isIFD()) {
addMetadataFromIFD((IFD) t, key, true);
... | java | private void addMetadataFromIFD(IFD ifd, String key, boolean exif) {
metadata.add(key, ifd);
for (TagValue tag : ifd.getMetadata().getTags()) {
if (tag.getCardinality() == 1) {
abstractTiffType t = tag.getValue().get(0);
if (t.isIFD()) {
addMetadataFromIFD((IFD) t, key, true);
... | [
"private",
"void",
"addMetadataFromIFD",
"(",
"IFD",
"ifd",
",",
"String",
"key",
",",
"boolean",
"exif",
")",
"{",
"metadata",
".",
"add",
"(",
"key",
",",
"ifd",
")",
";",
"for",
"(",
"TagValue",
"tag",
":",
"ifd",
".",
"getMetadata",
"(",
")",
"."... | Adds the metadata from ifd.
@param ifd the ifd
@param key the key
@param exif the exif
@the tiff tags io exception | [
"Adds",
"the",
"metadata",
"from",
"ifd",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L413-L441 |
11,451 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffDocument.java | TiffDocument.printMetadata | public void printMetadata() {
if (metadata == null)
createMetadataDictionary();
System.out.println("METADATA");
// if (metadata.getCreator() != null) System.out.println("Creator:" + metadata.getCreator());
for (String name : metadata.keySet()) {
String mult = "";
if (getMetadataList(na... | java | public void printMetadata() {
if (metadata == null)
createMetadataDictionary();
System.out.println("METADATA");
// if (metadata.getCreator() != null) System.out.println("Creator:" + metadata.getCreator());
for (String name : metadata.keySet()) {
String mult = "";
if (getMetadataList(na... | [
"public",
"void",
"printMetadata",
"(",
")",
"{",
"if",
"(",
"metadata",
"==",
"null",
")",
"createMetadataDictionary",
"(",
")",
";",
"System",
".",
"out",
".",
"println",
"(",
"\"METADATA\"",
")",
";",
"// if (metadata.getCreator() != null) System.out.println(\"Cr... | Prints the metadata. | [
"Prints",
"the",
"metadata",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffDocument.java#L446-L460 |
11,452 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/algo/tabu/FullTabuMemory.java | FullTabuMemory.isTabu | @Override
public boolean isTabu(Move<? super SolutionType> move, SolutionType currentSolution) {
// apply move
move.apply(currentSolution);
// check: contained in tabu memory?
boolean tabu = memory.contains(currentSolution);
// undo move
move.undo(currentSolution);
... | java | @Override
public boolean isTabu(Move<? super SolutionType> move, SolutionType currentSolution) {
// apply move
move.apply(currentSolution);
// check: contained in tabu memory?
boolean tabu = memory.contains(currentSolution);
// undo move
move.undo(currentSolution);
... | [
"@",
"Override",
"public",
"boolean",
"isTabu",
"(",
"Move",
"<",
"?",
"super",
"SolutionType",
">",
"move",
",",
"SolutionType",
"currentSolution",
")",
"{",
"// apply move",
"move",
".",
"apply",
"(",
"currentSolution",
")",
";",
"// check: contained in tabu mem... | Verifies whether the given move is tabu by applying it to the current solution and checking if the obtained
neighbour is currently contained in the tabu memory. If not, the move is allowed. Before returning, the move
is undone to restore the original state of the current solution.
@param move move to be applied to the... | [
"Verifies",
"whether",
"the",
"given",
"move",
"is",
"tabu",
"by",
"applying",
"it",
"to",
"the",
"current",
"solution",
"and",
"checking",
"if",
"the",
"obtained",
"neighbour",
"is",
"currently",
"contained",
"in",
"the",
"tabu",
"memory",
".",
"If",
"not",... | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/algo/tabu/FullTabuMemory.java#L67-L77 |
11,453 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/algo/tabu/FullTabuMemory.java | FullTabuMemory.registerVisitedSolution | @Override
public void registerVisitedSolution(SolutionType visitedSolution, Move<? super SolutionType> appliedMove) {
// store deep copy of newly visited solution
memory.add(Solution.checkedCopy(visitedSolution));
} | java | @Override
public void registerVisitedSolution(SolutionType visitedSolution, Move<? super SolutionType> appliedMove) {
// store deep copy of newly visited solution
memory.add(Solution.checkedCopy(visitedSolution));
} | [
"@",
"Override",
"public",
"void",
"registerVisitedSolution",
"(",
"SolutionType",
"visitedSolution",
",",
"Move",
"<",
"?",
"super",
"SolutionType",
">",
"appliedMove",
")",
"{",
"// store deep copy of newly visited solution",
"memory",
".",
"add",
"(",
"Solution",
"... | A newly visited solution is registered by storing a deep copy of this solution in the full tabu memory.
@param visitedSolution newly visited solution (copied to memory)
@param appliedMove applied move (not used here, allowed to be <code>null</code>) | [
"A",
"newly",
"visited",
"solution",
"is",
"registered",
"by",
"storing",
"a",
"deep",
"copy",
"of",
"this",
"solution",
"in",
"the",
"full",
"tabu",
"memory",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/algo/tabu/FullTabuMemory.java#L85-L89 |
11,454 | hdbeukel/james-core | src/main/java/org/jamesframework/core/subset/neigh/SingleAdditionNeighbourhood.java | SingleAdditionNeighbourhood.getAllMoves | @Override
public List<SubsetMove> getAllMoves(SubsetSolution solution) {
// check size limit
if(maxSizeReached(solution)){
return Collections.emptyList();
}
// get set of candidate IDs for addition (possibly fixed IDs are discarded)
Set<Integer> addCandidates = ge... | java | @Override
public List<SubsetMove> getAllMoves(SubsetSolution solution) {
// check size limit
if(maxSizeReached(solution)){
return Collections.emptyList();
}
// get set of candidate IDs for addition (possibly fixed IDs are discarded)
Set<Integer> addCandidates = ge... | [
"@",
"Override",
"public",
"List",
"<",
"SubsetMove",
">",
"getAllMoves",
"(",
"SubsetSolution",
"solution",
")",
"{",
"// check size limit",
"if",
"(",
"maxSizeReached",
"(",
"solution",
")",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",... | Generates a list of all possible addition moves that add a single ID to the selection of a given
subset solution. Possible fixed IDs are not considered to be added and the maximum subset size
is taken into account. May return an empty list if no addition moves can be generated.
@param solution solution for which all p... | [
"Generates",
"a",
"list",
"of",
"all",
"possible",
"addition",
"moves",
"that",
"add",
"a",
"single",
"ID",
"to",
"the",
"selection",
"of",
"a",
"given",
"subset",
"solution",
".",
"Possible",
"fixed",
"IDs",
"are",
"not",
"considered",
"to",
"be",
"added"... | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/SingleAdditionNeighbourhood.java#L131-L147 |
11,455 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/stopcriteria/MinDelta.java | MinDelta.searchShouldStop | @Override
public boolean searchShouldStop(Search<?> search) {
return search.getMinDelta() != JamesConstants.INVALID_DELTA && search.getMinDelta() < minDelta;
} | java | @Override
public boolean searchShouldStop(Search<?> search) {
return search.getMinDelta() != JamesConstants.INVALID_DELTA && search.getMinDelta() < minDelta;
} | [
"@",
"Override",
"public",
"boolean",
"searchShouldStop",
"(",
"Search",
"<",
"?",
">",
"search",
")",
"{",
"return",
"search",
".",
"getMinDelta",
"(",
")",
"!=",
"JamesConstants",
".",
"INVALID_DELTA",
"&&",
"search",
".",
"getMinDelta",
"(",
")",
"<",
"... | Checks whether the minimum delta observed during the current run of the given
search is still above the required minimum.
@param search search for which the minimum delta has to be checked
@return <code>true</code> in case of a minimum delta below the required minimum | [
"Checks",
"whether",
"the",
"minimum",
"delta",
"observed",
"during",
"the",
"current",
"run",
"of",
"the",
"given",
"search",
"is",
"still",
"above",
"the",
"required",
"minimum",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/stopcriteria/MinDelta.java#L60-L63 |
11,456 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffTags.java | TiffTags.generateTagRules | protected void generateTagRules() throws ReadTagsIOException {
try {
PrintWriter writer = new PrintWriter("typecheck.xml", "UTF-8");
for (int tagId : tagMap.keySet()) {
Tag tag = tagMap.get(tagId);
writer.println(" <rule context=\"tag[id=" + tag.getId() + "]\">");
String typeRul... | java | protected void generateTagRules() throws ReadTagsIOException {
try {
PrintWriter writer = new PrintWriter("typecheck.xml", "UTF-8");
for (int tagId : tagMap.keySet()) {
Tag tag = tagMap.get(tagId);
writer.println(" <rule context=\"tag[id=" + tag.getId() + "]\">");
String typeRul... | [
"protected",
"void",
"generateTagRules",
"(",
")",
"throws",
"ReadTagsIOException",
"{",
"try",
"{",
"PrintWriter",
"writer",
"=",
"new",
"PrintWriter",
"(",
"\"typecheck.xml\"",
",",
"\"UTF-8\"",
")",
";",
"for",
"(",
"int",
"tagId",
":",
"tagMap",
".",
"keyS... | Generate tag rules.
@throws ReadTagsIOException the read tags io exception | [
"Generate",
"tag",
"rules",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffTags.java#L213-L251 |
11,457 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TiffTags.java | TiffTags.getTagId | public static int getTagId(String name) {
int id = -1;
try {
if (instance == null)
getTiffTags();
} catch (ReadTagsIOException e) {
/*Nothing to be shown*/
}
if (tagNames.containsKey(name))
id = tagNames.get(name).getId();
return id;
} | java | public static int getTagId(String name) {
int id = -1;
try {
if (instance == null)
getTiffTags();
} catch (ReadTagsIOException e) {
/*Nothing to be shown*/
}
if (tagNames.containsKey(name))
id = tagNames.get(name).getId();
return id;
} | [
"public",
"static",
"int",
"getTagId",
"(",
"String",
"name",
")",
"{",
"int",
"id",
"=",
"-",
"1",
";",
"try",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"getTiffTags",
"(",
")",
";",
"}",
"catch",
"(",
"ReadTagsIOException",
"e",
")",
"{",
"/... | Gets the tag id.
@param name the name
@return the tag id | [
"Gets",
"the",
"tag",
"id",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TiffTags.java#L322-L333 |
11,458 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/Metadata.java | Metadata.get | public TiffObject get(String name) {
TiffObject result = null;
String container = null;
ArrayList<TiffObject> found = new ArrayList<>();
if (contains(name)) {
// Find objects with this exact name
if (metadata.get(name).getObjectList().size() == 1) {
found.add(getFirst(name));
... | java | public TiffObject get(String name) {
TiffObject result = null;
String container = null;
ArrayList<TiffObject> found = new ArrayList<>();
if (contains(name)) {
// Find objects with this exact name
if (metadata.get(name).getObjectList().size() == 1) {
found.add(getFirst(name));
... | [
"public",
"TiffObject",
"get",
"(",
"String",
"name",
")",
"{",
"TiffObject",
"result",
"=",
"null",
";",
"String",
"container",
"=",
"null",
";",
"ArrayList",
"<",
"TiffObject",
">",
"found",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"c... | Gets a metadata value, returning the appropriate value when multiple are found.
@param name the name of the metadata.
@return the tiff object with the value of the metadata. | [
"Gets",
"a",
"metadata",
"value",
"returning",
"the",
"appropriate",
"value",
"when",
"multiple",
"are",
"found",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/Metadata.java#L116-L167 |
11,459 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/Metadata.java | Metadata.addMetadata | public void addMetadata(Metadata meta) {
for (String k : meta.keySet()) {
for (TiffObject to : meta.getList(k)) {
add(k, to, meta.getMetadataObject(k).isDublinCore(), meta.getMetadataObject(k).getPath());
}
}
} | java | public void addMetadata(Metadata meta) {
for (String k : meta.keySet()) {
for (TiffObject to : meta.getList(k)) {
add(k, to, meta.getMetadataObject(k).isDublinCore(), meta.getMetadataObject(k).getPath());
}
}
} | [
"public",
"void",
"addMetadata",
"(",
"Metadata",
"meta",
")",
"{",
"for",
"(",
"String",
"k",
":",
"meta",
".",
"keySet",
"(",
")",
")",
"{",
"for",
"(",
"TiffObject",
"to",
":",
"meta",
".",
"getList",
"(",
"k",
")",
")",
"{",
"add",
"(",
"k",
... | Adds a complete dictionary to the current one.
@param meta the metadata dictionary to add | [
"Adds",
"a",
"complete",
"dictionary",
"to",
"the",
"current",
"one",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/Metadata.java#L213-L219 |
11,460 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/reader/TiffReader.java | TiffReader.readFile | public int readFile(String filename, boolean validate) {
int result = 0;
try {
if (Files.exists(Paths.get(filename))) {
data = new TiffInputStream(new File(filename));
tiffModel = new TiffDocument();
validation = new ValidationResult(validate);
tiffModel.setSize(data.size... | java | public int readFile(String filename, boolean validate) {
int result = 0;
try {
if (Files.exists(Paths.get(filename))) {
data = new TiffInputStream(new File(filename));
tiffModel = new TiffDocument();
validation = new ValidationResult(validate);
tiffModel.setSize(data.size... | [
"public",
"int",
"readFile",
"(",
"String",
"filename",
",",
"boolean",
"validate",
")",
"{",
"int",
"result",
"=",
"0",
";",
"try",
"{",
"if",
"(",
"Files",
".",
"exists",
"(",
"Paths",
".",
"get",
"(",
"filename",
")",
")",
")",
"{",
"data",
"=",... | Parses a Tiff File and create an internal model representation.
@param filename the Tiff filename
@return Error code (0: successful, -1: file not found, -2: IO exception) | [
"Parses",
"a",
"Tiff",
"File",
"and",
"create",
"an",
"internal",
"model",
"representation",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/reader/TiffReader.java#L168-L213 |
11,461 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/reader/TiffReader.java | TiffReader.readHeader | private boolean readHeader() {
boolean correct = true;
ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
int c1 = 0;
int c2 = 0;
try {
c1 = data.readByte().toInt();
c2 = data.readByte().toInt();
} catch (Exception ex) {
validation.addErrorLoc("Header IO Exception", "Header");
... | java | private boolean readHeader() {
boolean correct = true;
ByteOrder byteOrder = ByteOrder.LITTLE_ENDIAN;
int c1 = 0;
int c2 = 0;
try {
c1 = data.readByte().toInt();
c2 = data.readByte().toInt();
} catch (Exception ex) {
validation.addErrorLoc("Header IO Exception", "Header");
... | [
"private",
"boolean",
"readHeader",
"(",
")",
"{",
"boolean",
"correct",
"=",
"true",
";",
"ByteOrder",
"byteOrder",
"=",
"ByteOrder",
".",
"LITTLE_ENDIAN",
";",
"int",
"c1",
"=",
"0",
";",
"int",
"c2",
"=",
"0",
";",
"try",
"{",
"c1",
"=",
"data",
"... | Reads the Tiff header.
@return true, if successful | [
"Reads",
"the",
"Tiff",
"header",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/reader/TiffReader.java#L220-L265 |
11,462 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/reader/TiffReader.java | TiffReader.readIFDs | private void readIFDs() {
int offset0 = 0;
try {
// The pointer to the first IFD is located in bytes 4-7
offset0 = data.readLong(4).toInt();
tiffModel.setFirstIFDOffset(offset0);
if (offset0 == 0)
validation.addErrorLoc("There is no first IFD", "Header");
else if (offset0 >... | java | private void readIFDs() {
int offset0 = 0;
try {
// The pointer to the first IFD is located in bytes 4-7
offset0 = data.readLong(4).toInt();
tiffModel.setFirstIFDOffset(offset0);
if (offset0 == 0)
validation.addErrorLoc("There is no first IFD", "Header");
else if (offset0 >... | [
"private",
"void",
"readIFDs",
"(",
")",
"{",
"int",
"offset0",
"=",
"0",
";",
"try",
"{",
"// The pointer to the first IFD is located in bytes 4-7",
"offset0",
"=",
"data",
".",
"readLong",
"(",
"4",
")",
".",
"toInt",
"(",
")",
";",
"tiffModel",
".",
"setF... | Read the IFDs contained in the Tiff file. | [
"Read",
"the",
"IFDs",
"contained",
"in",
"the",
"Tiff",
"file",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/reader/TiffReader.java#L270-L334 |
11,463 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/reader/TiffReader.java | TiffReader.checkType | private boolean checkType(int tagid, int tagType, int n) {
if (TiffTags.hasTag(tagid) && !TiffTags.getTag(tagid).getName().equals("IPTC")) {
boolean found = false;
String stagType = TiffTags.getTagTypeName(tagType);
if (stagType != null) {
if (stagType.equals("SUBIFD"))
stagType ... | java | private boolean checkType(int tagid, int tagType, int n) {
if (TiffTags.hasTag(tagid) && !TiffTags.getTag(tagid).getName().equals("IPTC")) {
boolean found = false;
String stagType = TiffTags.getTagTypeName(tagType);
if (stagType != null) {
if (stagType.equals("SUBIFD"))
stagType ... | [
"private",
"boolean",
"checkType",
"(",
"int",
"tagid",
",",
"int",
"tagType",
",",
"int",
"n",
")",
"{",
"if",
"(",
"TiffTags",
".",
"hasTag",
"(",
"tagid",
")",
"&&",
"!",
"TiffTags",
".",
"getTag",
"(",
"tagid",
")",
".",
"getName",
"(",
")",
".... | Check tag type.
@param tagid the tagid
@param tagType the tag type
@param n the n | [
"Check",
"tag",
"type",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/reader/TiffReader.java#L437-L463 |
11,464 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/IfdTags.java | IfdTags.addTag | public void addTag(TagValue tag) {
//int pos = 0;
//while (pos < tags.size() && tags.get(pos).getId() < tag.getId()) pos++;
//tags.add(pos, tag);
tags.add(tag);
if (!hashTagsId.containsKey(tag.getId())) {
hashTagsId.put(tag.getId(), tag);
}
Tag t = TiffTags.getTag(tag.getId());
if ... | java | public void addTag(TagValue tag) {
//int pos = 0;
//while (pos < tags.size() && tags.get(pos).getId() < tag.getId()) pos++;
//tags.add(pos, tag);
tags.add(tag);
if (!hashTagsId.containsKey(tag.getId())) {
hashTagsId.put(tag.getId(), tag);
}
Tag t = TiffTags.getTag(tag.getId());
if ... | [
"public",
"void",
"addTag",
"(",
"TagValue",
"tag",
")",
"{",
"//int pos = 0;",
"//while (pos < tags.size() && tags.get(pos).getId() < tag.getId()) pos++;",
"//tags.add(pos, tag);",
"tags",
".",
"add",
"(",
"tag",
")",
";",
"if",
"(",
"!",
"hashTagsId",
".",
"containsKe... | Adds a tag to the set.
@param tag the tag to add | [
"Adds",
"a",
"tag",
"to",
"the",
"set",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/IfdTags.java#L70-L84 |
11,465 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/stopcriteria/StopCriterionChecker.java | StopCriterionChecker.startChecking | public void startChecking() {
// synchronize with other attempts to update the running task
synchronized(runningTaskLock){
// check if not already active
if(runningTask == null) {
// only activate if at least one stop criterion has been set
if(!sto... | java | public void startChecking() {
// synchronize with other attempts to update the running task
synchronized(runningTaskLock){
// check if not already active
if(runningTask == null) {
// only activate if at least one stop criterion has been set
if(!sto... | [
"public",
"void",
"startChecking",
"(",
")",
"{",
"// synchronize with other attempts to update the running task",
"synchronized",
"(",
"runningTaskLock",
")",
"{",
"// check if not already active",
"if",
"(",
"runningTask",
"==",
"null",
")",
"{",
"// only activate if at lea... | Start checking the stop criteria, in a separate background thread. If the stop criterion checker is
already active, or if no stop criteria have been added, calling this method does not have any effect. | [
"Start",
"checking",
"the",
"stop",
"criteria",
"in",
"a",
"separate",
"background",
"thread",
".",
"If",
"the",
"stop",
"criterion",
"checker",
"is",
"already",
"active",
"or",
"if",
"no",
"stop",
"criteria",
"have",
"been",
"added",
"calling",
"this",
"met... | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/stopcriteria/StopCriterionChecker.java#L143-L161 |
11,466 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/stopcriteria/StopCriterionChecker.java | StopCriterionChecker.stopChecking | public void stopChecking() {
// synchronize with other attempts to update the running task
synchronized(runningTaskLock){
if(runningTask != null) {
// cancel task (let it complete its current run if running)
runningTaskFuture.cancel(false);
// ... | java | public void stopChecking() {
// synchronize with other attempts to update the running task
synchronized(runningTaskLock){
if(runningTask != null) {
// cancel task (let it complete its current run if running)
runningTaskFuture.cancel(false);
// ... | [
"public",
"void",
"stopChecking",
"(",
")",
"{",
"// synchronize with other attempts to update the running task",
"synchronized",
"(",
"runningTaskLock",
")",
"{",
"if",
"(",
"runningTask",
"!=",
"null",
")",
"{",
"// cancel task (let it complete its current run if running)",
... | Instructs the stop criterion checker to stop checking. In case the checker is not active,
calling this method does not have any effect. | [
"Instructs",
"the",
"stop",
"criterion",
"checker",
"to",
"stop",
"checking",
".",
"In",
"case",
"the",
"checker",
"is",
"not",
"active",
"calling",
"this",
"method",
"does",
"not",
"have",
"any",
"effect",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/stopcriteria/StopCriterionChecker.java#L167-L180 |
11,467 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/stopcriteria/StopCriterionChecker.java | StopCriterionChecker.stopCriterionSatisfied | public boolean stopCriterionSatisfied(){
int i = 0;
while (i < stopCriteria.size() && !stopCriteria.get(i).searchShouldStop(search)) {
i++;
}
return i < stopCriteria.size();
} | java | public boolean stopCriterionSatisfied(){
int i = 0;
while (i < stopCriteria.size() && !stopCriteria.get(i).searchShouldStop(search)) {
i++;
}
return i < stopCriteria.size();
} | [
"public",
"boolean",
"stopCriterionSatisfied",
"(",
")",
"{",
"int",
"i",
"=",
"0",
";",
"while",
"(",
"i",
"<",
"stopCriteria",
".",
"size",
"(",
")",
"&&",
"!",
"stopCriteria",
".",
"get",
"(",
"i",
")",
".",
"searchShouldStop",
"(",
"search",
")",
... | Check whether at least one stop criterion is satisfied.
@return <code>true</code> if a stop condition is satisfied | [
"Check",
"whether",
"at",
"least",
"one",
"stop",
"criterion",
"is",
"satisfied",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/stopcriteria/StopCriterionChecker.java#L187-L193 |
11,468 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java | Base64Slow.encode | public static String encode(String string, String enc) throws UnsupportedEncodingException {
return new String(encode(string.getBytes(enc)), enc);
} | java | public static String encode(String string, String enc) throws UnsupportedEncodingException {
return new String(encode(string.getBytes(enc)), enc);
} | [
"public",
"static",
"String",
"encode",
"(",
"String",
"string",
",",
"String",
"enc",
")",
"throws",
"UnsupportedEncodingException",
"{",
"return",
"new",
"String",
"(",
"encode",
"(",
"string",
".",
"getBytes",
"(",
"enc",
")",
")",
",",
"enc",
")",
";",... | Encode a String in Base64. No line breaks or other white space are inserted into the encoded
data.
@param string The data to encode.
@param enc Character encoding to use when converting to and from bytes.
@return An encoded String.
@throws UnsupportedEncodingException if the character encoding specified is not support... | [
"Encode",
"a",
"String",
"in",
"Base64",
".",
"No",
"line",
"breaks",
"or",
"other",
"white",
"space",
"are",
"inserted",
"into",
"the",
"encoded",
"data",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L254-L256 |
11,469 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java | Base64Slow.encode | public static void encode(InputStream in, OutputStream out) throws IOException {
encode(in, out, true);
} | java | public static void encode(InputStream in, OutputStream out) throws IOException {
encode(in, out, true);
} | [
"public",
"static",
"void",
"encode",
"(",
"InputStream",
"in",
",",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"encode",
"(",
"in",
",",
"out",
",",
"true",
")",
";",
"}"
] | Encode data from the InputStream to the OutputStream in Base64. Line breaks are inserted every
76 characters in the output.
@param in Stream from which to read data that needs to be encoded.
@param out Stream to which to write encoded data.
@throws IOException if there is a problem reading or writing.
@since ostermill... | [
"Encode",
"data",
"from",
"the",
"InputStream",
"to",
"the",
"OutputStream",
"in",
"Base64",
".",
"Line",
"breaks",
"are",
"inserted",
"every",
"76",
"characters",
"in",
"the",
"output",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L341-L343 |
11,470 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java | Base64Slow.encode | public static void encode(InputStream in, OutputStream out, boolean lineBreaks)
throws IOException {
// Base64 encoding converts three bytes of input to
// four bytes of output
int[] inBuffer = new int[3];
int lineCount = 0;
boolean done = false;
while (!done && (inBuffer[0] = in.read()) ... | java | public static void encode(InputStream in, OutputStream out, boolean lineBreaks)
throws IOException {
// Base64 encoding converts three bytes of input to
// four bytes of output
int[] inBuffer = new int[3];
int lineCount = 0;
boolean done = false;
while (!done && (inBuffer[0] = in.read()) ... | [
"public",
"static",
"void",
"encode",
"(",
"InputStream",
"in",
",",
"OutputStream",
"out",
",",
"boolean",
"lineBreaks",
")",
"throws",
"IOException",
"{",
"// Base64 encoding converts three bytes of input to",
"// four bytes of output",
"int",
"[",
"]",
"inBuffer",
"=... | Encode data from the InputStream to the OutputStream in Base64.
@param in Stream from which to read data that needs to be encoded.
@param out Stream to which to write encoded data.
@param lineBreaks Whether to insert line breaks every 76 characters in the output.
@throws IOException if there is a problem reading or wr... | [
"Encode",
"data",
"from",
"the",
"InputStream",
"to",
"the",
"OutputStream",
"in",
"Base64",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L354-L414 |
11,471 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java | Base64Slow.decode | public static void decode(byte[] bytes, OutputStream out) throws IOException {
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
decode(in, out, false);
} | java | public static void decode(byte[] bytes, OutputStream out) throws IOException {
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
decode(in, out, false);
} | [
"public",
"static",
"void",
"decode",
"(",
"byte",
"[",
"]",
"bytes",
",",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"ByteArrayInputStream",
"in",
"=",
"new",
"ByteArrayInputStream",
"(",
"bytes",
")",
";",
"decode",
"(",
"in",
",",
"out",
... | Decode Base64 encoded bytes to the an OutputStream. Characters that are not part of the Base64
alphabet are ignored in the input.
@param bytes The data to decode.
@param out Stream to which to write decoded data.
@throws IOException if an IO error occurs.
@since ostermillerutils 1.00.00 | [
"Decode",
"Base64",
"encoded",
"bytes",
"to",
"the",
"an",
"OutputStream",
".",
"Characters",
"that",
"are",
"not",
"part",
"of",
"the",
"Base64",
"alphabet",
"are",
"ignored",
"in",
"the",
"input",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L645-L648 |
11,472 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java | Base64Slow.decodeToBytes | public static byte[] decodeToBytes(InputStream in) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
decode(in, out, false);
return out.toByteArray();
} | java | public static byte[] decodeToBytes(InputStream in) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
decode(in, out, false);
return out.toByteArray();
} | [
"public",
"static",
"byte",
"[",
"]",
"decodeToBytes",
"(",
"InputStream",
"in",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"decode",
"(",
"in",
",",
"out",
",",
"false",
")",
";",
... | Decode Base64 encoded data from the InputStream to a byte array. Characters that are not part
of the Base64 alphabet are ignored in the input.
@param in Stream from which to read data that needs to be decoded.
@return decoded data.
@throws IOException if an IO error occurs.
@since ostermillerutils 1.00.00 | [
"Decode",
"Base64",
"encoded",
"data",
"from",
"the",
"InputStream",
"to",
"a",
"byte",
"array",
".",
"Characters",
"that",
"are",
"not",
"part",
"of",
"the",
"Base64",
"alphabet",
"are",
"ignored",
"in",
"the",
"input",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L713-L717 |
11,473 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java | Base64Slow.decodeToString | public static String decodeToString(InputStream in, String enc) throws IOException {
return new String(decodeToBytes(in), enc);
} | java | public static String decodeToString(InputStream in, String enc) throws IOException {
return new String(decodeToBytes(in), enc);
} | [
"public",
"static",
"String",
"decodeToString",
"(",
"InputStream",
"in",
",",
"String",
"enc",
")",
"throws",
"IOException",
"{",
"return",
"new",
"String",
"(",
"decodeToBytes",
"(",
"in",
")",
",",
"enc",
")",
";",
"}"
] | Decode Base64 encoded data from the InputStream to a String. Characters that are not part of
the Base64 alphabet are ignored in the input.
@param in Stream from which to read data that needs to be decoded.
@param enc Character encoding to use when converting bytes to characters.
@return decoded data.
@throws IOExcepti... | [
"Decode",
"Base64",
"encoded",
"data",
"from",
"the",
"InputStream",
"to",
"a",
"String",
".",
"Characters",
"that",
"are",
"not",
"part",
"of",
"the",
"Base64",
"alphabet",
"are",
"ignored",
"in",
"the",
"input",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/base64/Base64Slow.java#L744-L746 |
11,474 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/TiffReaderWriter.java | TiffReaderWriter.reportResults | private static void reportResults(TiffReader tiffReader, int result, String filename,
String output_file) {
TiffDocument to = tiffReader.getModel();
if (output_file != null) {
// TODO: Create xml file with report
} else {
// Display results human readable
switch (result) {
ca... | java | private static void reportResults(TiffReader tiffReader, int result, String filename,
String output_file) {
TiffDocument to = tiffReader.getModel();
if (output_file != null) {
// TODO: Create xml file with report
} else {
// Display results human readable
switch (result) {
ca... | [
"private",
"static",
"void",
"reportResults",
"(",
"TiffReader",
"tiffReader",
",",
"int",
"result",
",",
"String",
"filename",
",",
"String",
"output_file",
")",
"{",
"TiffDocument",
"to",
"=",
"tiffReader",
".",
"getModel",
"(",
")",
";",
"if",
"(",
"outpu... | Report the results of the reading process to the console.
@param tiffReader the tiff reader
@param result the result
@param filename the filename
@param output_file the output_file | [
"Report",
"the",
"results",
"of",
"the",
"reading",
"process",
"to",
"the",
"console",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/TiffReaderWriter.java#L143-L200 |
11,475 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSData.java | LCMSData.unload | public synchronized void unload(LCMSDataSubset subset, Object user, Set<LCMSDataSubset> exclude) {
//System.err.println("=========== UNLOAD (user) CALLED ***********************");
if (!isLoaded(subset)) {
throw new IllegalStateException("LCMSData load/unload methods only"
+ " work for subsets l... | java | public synchronized void unload(LCMSDataSubset subset, Object user, Set<LCMSDataSubset> exclude) {
//System.err.println("=========== UNLOAD (user) CALLED ***********************");
if (!isLoaded(subset)) {
throw new IllegalStateException("LCMSData load/unload methods only"
+ " work for subsets l... | [
"public",
"synchronized",
"void",
"unload",
"(",
"LCMSDataSubset",
"subset",
",",
"Object",
"user",
",",
"Set",
"<",
"LCMSDataSubset",
">",
"exclude",
")",
"{",
"//System.err.println(\"=========== UNLOAD (user) CALLED ***********************\");",
"if",
"(",
"!",
"isLoade... | Unloads spectra matched by this subset.
@param subset to be unloaded
@param user the user, that has had this subset loaded. If other users have parts of this subset
loaded, those parts won't be unloaded.
@param exclude can be null. If specified, data from these subsets won't be excluded. | [
"Unloads",
"spectra",
"matched",
"by",
"this",
"subset",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSData.java#L195-L240 |
11,476 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSData.java | LCMSData.unsafeUnload | private void unsafeUnload(LCMSDataSubset subset) {
//System.err.println("=========== UNLOAD (unsafe) CALLED ***********************");
// getting subsets loaded by all other users of this LCMSData
ConcurrentMap<Object, Set<LCMSDataSubset>> otherUserMaps = cache.asMap();
HashSet<LCMSDataSubset> otherUser... | java | private void unsafeUnload(LCMSDataSubset subset) {
//System.err.println("=========== UNLOAD (unsafe) CALLED ***********************");
// getting subsets loaded by all other users of this LCMSData
ConcurrentMap<Object, Set<LCMSDataSubset>> otherUserMaps = cache.asMap();
HashSet<LCMSDataSubset> otherUser... | [
"private",
"void",
"unsafeUnload",
"(",
"LCMSDataSubset",
"subset",
")",
"{",
"//System.err.println(\"=========== UNLOAD (unsafe) CALLED ***********************\");",
"// getting subsets loaded by all other users of this LCMSData",
"ConcurrentMap",
"<",
"Object",
",",
"Set",
"<",
"LC... | Unloads the subset without checking the user. It's required by our user-tracking automatic
cleanup, if a user was GCed and it hasn't unloaded its subsets, we detect the GC automatically,
and unload all the subsets, used by this killed user. It will still check for other users using
scans from this subset. | [
"Unloads",
"the",
"subset",
"without",
"checking",
"the",
"user",
".",
"It",
"s",
"required",
"by",
"our",
"user",
"-",
"tracking",
"automatic",
"cleanup",
"if",
"a",
"user",
"was",
"GCed",
"and",
"it",
"hasn",
"t",
"unloaded",
"its",
"subsets",
"we",
"d... | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSData.java#L248-L267 |
11,477 | hdbeukel/james-core | src/main/java/org/jamesframework/core/subset/algo/exh/SubsetSolutionIterator.java | SubsetSolutionIterator.next | @Override
public SubsetSolution next() {
// get next subset
Set<Integer> subset = subsetIterator.next();
// wrap in subset solution
return new SubsetSolution(IDs, subset);
} | java | @Override
public SubsetSolution next() {
// get next subset
Set<Integer> subset = subsetIterator.next();
// wrap in subset solution
return new SubsetSolution(IDs, subset);
} | [
"@",
"Override",
"public",
"SubsetSolution",
"next",
"(",
")",
"{",
"// get next subset",
"Set",
"<",
"Integer",
">",
"subset",
"=",
"subsetIterator",
".",
"next",
"(",
")",
";",
"// wrap in subset solution",
"return",
"new",
"SubsetSolution",
"(",
"IDs",
",",
... | Generate the next subset solution. The returned subset will either have the same size as the previously generated solution,
if any, or it will be a larger subset.
@return next subset solution within the size bounds
@throws NoSuchElementException if there is no next solution to be generated | [
"Generate",
"the",
"next",
"subset",
"solution",
".",
"The",
"returned",
"subset",
"will",
"either",
"have",
"the",
"same",
"size",
"as",
"the",
"previously",
"generated",
"solution",
"if",
"any",
"or",
"it",
"will",
"be",
"a",
"larger",
"subset",
"."
] | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/algo/exh/SubsetSolutionIterator.java#L94-L100 |
11,478 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/ValidationEvent.java | ValidationEvent.printError | public void printError() {
System.out.print(description);
if (value != null)
System.out.print(" (" + value + ")");
System.out.println();
} | java | public void printError() {
System.out.print(description);
if (value != null)
System.out.print(" (" + value + ")");
System.out.println();
} | [
"public",
"void",
"printError",
"(",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"description",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"System",
".",
"out",
".",
"print",
"(",
"\" (\"",
"+",
"value",
"+",
"\")\"",
")",
";",
"System... | Prints the error in the console. | [
"Prints",
"the",
"error",
"in",
"the",
"console",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/ValidationEvent.java#L91-L96 |
11,479 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/ValidationEvent.java | ValidationEvent.printWarning | public void printWarning() {
System.out.print("Warning: ");
System.out.print(description);
if (value != null)
System.out.print(" (" + value + ")");
System.out.println();
} | java | public void printWarning() {
System.out.print("Warning: ");
System.out.print(description);
if (value != null)
System.out.print(" (" + value + ")");
System.out.println();
} | [
"public",
"void",
"printWarning",
"(",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"Warning: \"",
")",
";",
"System",
".",
"out",
".",
"print",
"(",
"description",
")",
";",
"if",
"(",
"value",
"!=",
"null",
")",
"System",
".",
"out",
".",
... | Prints the warning in the console. | [
"Prints",
"the",
"warning",
"in",
"the",
"console",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/ValidationEvent.java#L101-L107 |
11,480 | hdbeukel/james-core | src/main/java/org/jamesframework/core/subset/neigh/adv/DisjointMultiSwapNeighbourhood.java | DisjointMultiSwapNeighbourhood.numSwaps | private int numSwaps(Set<Integer> addCandidates, Set<Integer> deleteCandidates){
return Math.min(addCandidates.size(), Math.min(deleteCandidates.size(), numSwaps));
} | java | private int numSwaps(Set<Integer> addCandidates, Set<Integer> deleteCandidates){
return Math.min(addCandidates.size(), Math.min(deleteCandidates.size(), numSwaps));
} | [
"private",
"int",
"numSwaps",
"(",
"Set",
"<",
"Integer",
">",
"addCandidates",
",",
"Set",
"<",
"Integer",
">",
"deleteCandidates",
")",
"{",
"return",
"Math",
".",
"min",
"(",
"addCandidates",
".",
"size",
"(",
")",
",",
"Math",
".",
"min",
"(",
"del... | Infer the number of swaps that will be performed, taking into account the fixed number of desired
swaps as specified at construction and the maximum number of possible swaps for the given subset solution.
@param addCandidates candidate IDs to be added to the selection
@param deleteCandidates candidate IDs to be remove... | [
"Infer",
"the",
"number",
"of",
"swaps",
"that",
"will",
"be",
"performed",
"taking",
"into",
"account",
"the",
"fixed",
"number",
"of",
"desired",
"swaps",
"as",
"specified",
"at",
"construction",
"and",
"the",
"maximum",
"number",
"of",
"possible",
"swaps",
... | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/adv/DisjointMultiSwapNeighbourhood.java#L188-L190 |
11,481 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TagValue.java | TagValue.getDescriptiveValueObject | public List<abstractTiffType> getDescriptiveValueObject() {
Tag tag = TiffTags.getTag(id);
if (tag != null) {
if (tag.hasReadableDescription()){
String desc = this.toString();
String tagDescription = tag.getTextDescription(toString());
if (tagDescription != null){
desc = ... | java | public List<abstractTiffType> getDescriptiveValueObject() {
Tag tag = TiffTags.getTag(id);
if (tag != null) {
if (tag.hasReadableDescription()){
String desc = this.toString();
String tagDescription = tag.getTextDescription(toString());
if (tagDescription != null){
desc = ... | [
"public",
"List",
"<",
"abstractTiffType",
">",
"getDescriptiveValueObject",
"(",
")",
"{",
"Tag",
"tag",
"=",
"TiffTags",
".",
"getTag",
"(",
"id",
")",
";",
"if",
"(",
"tag",
"!=",
"null",
")",
"{",
"if",
"(",
"tag",
".",
"hasReadableDescription",
"(",... | Gets the descriptive value.
@return the descriptive value | [
"Gets",
"the",
"descriptive",
"value",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TagValue.java#L130-L145 |
11,482 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TagValue.java | TagValue.getFirstNumericValue | public long getFirstNumericValue() {
String val = (value != null) ? value.get(0).toString() : readValue.get(0).toString();
if (isInteger(val)) {
return Long.parseLong(val);
} else {
return 0;
}
} | java | public long getFirstNumericValue() {
String val = (value != null) ? value.get(0).toString() : readValue.get(0).toString();
if (isInteger(val)) {
return Long.parseLong(val);
} else {
return 0;
}
} | [
"public",
"long",
"getFirstNumericValue",
"(",
")",
"{",
"String",
"val",
"=",
"(",
"value",
"!=",
"null",
")",
"?",
"value",
".",
"get",
"(",
"0",
")",
".",
"toString",
"(",
")",
":",
"readValue",
".",
"get",
"(",
"0",
")",
".",
"toString",
"(",
... | Gets the first value of the list parsed as a number.
@return the first integer value | [
"Gets",
"the",
"first",
"value",
"of",
"the",
"list",
"parsed",
"as",
"a",
"number",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TagValue.java#L260-L267 |
11,483 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/TagValue.java | TagValue.getName | public String getName() {
String name = "" + id;
if (TiffTags.hasTag(id))
name = TiffTags.getTag(id).getName();
return name;
} | java | public String getName() {
String name = "" + id;
if (TiffTags.hasTag(id))
name = TiffTags.getTag(id).getName();
return name;
} | [
"public",
"String",
"getName",
"(",
")",
"{",
"String",
"name",
"=",
"\"\"",
"+",
"id",
";",
"if",
"(",
"TiffTags",
".",
"hasTag",
"(",
"id",
")",
")",
"name",
"=",
"TiffTags",
".",
"getTag",
"(",
"id",
")",
".",
"getName",
"(",
")",
";",
"return... | Gets the name of the tag.
@return the name | [
"Gets",
"the",
"name",
"of",
"the",
"tag",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/TagValue.java#L354-L359 |
11,484 | maxirosson/jdroid-android | jdroid-android-google-inappbilling/src/main/java/com/jdroid/android/google/inappbilling/client/InAppBillingClient.java | InAppBillingClient.startSetup | @MainThread
public void startSetup() {
try {
LOGGER.debug("Starting in-app billing setup.");
billingClient = BillingClient.newBuilder(AbstractApplication.get()).setListener(this).build();
Runnable runnable = new Runnable() {
@Override
public void run() {
LOGGER.debug("In-app billing setup ... | java | @MainThread
public void startSetup() {
try {
LOGGER.debug("Starting in-app billing setup.");
billingClient = BillingClient.newBuilder(AbstractApplication.get()).setListener(this).build();
Runnable runnable = new Runnable() {
@Override
public void run() {
LOGGER.debug("In-app billing setup ... | [
"@",
"MainThread",
"public",
"void",
"startSetup",
"(",
")",
"{",
"try",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Starting in-app billing setup.\"",
")",
";",
"billingClient",
"=",
"BillingClient",
".",
"newBuilder",
"(",
"AbstractApplication",
".",
"get",
"(",
")",... | Starts the setup process. This will start up the setup process asynchronously. You will be notified through the
listener when the setup process is complete. | [
"Starts",
"the",
"setup",
"process",
".",
"This",
"will",
"start",
"up",
"the",
"setup",
"process",
"asynchronously",
".",
"You",
"will",
"be",
"notified",
"through",
"the",
"listener",
"when",
"the",
"setup",
"process",
"is",
"complete",
"."
] | 1ba9cae56a16fa36bdb2c9c04379853f0300707f | https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-google-inappbilling/src/main/java/com/jdroid/android/google/inappbilling/client/InAppBillingClient.java#L90-L130 |
11,485 | maxirosson/jdroid-android | jdroid-android-google-inappbilling/src/main/java/com/jdroid/android/google/inappbilling/client/InAppBillingClient.java | InAppBillingClient.launchPurchaseFlow | private void launchPurchaseFlow(Activity activity, Product product, ItemType itemType, String oldProductId) {
executeServiceRequest(new Runnable() {
@Override
public void run() {
if (itemType.equals(ItemType.SUBSCRIPTION) && !isSubscriptionsSupported()) {
LOGGER.debug("Failed in-app purchase flow for p... | java | private void launchPurchaseFlow(Activity activity, Product product, ItemType itemType, String oldProductId) {
executeServiceRequest(new Runnable() {
@Override
public void run() {
if (itemType.equals(ItemType.SUBSCRIPTION) && !isSubscriptionsSupported()) {
LOGGER.debug("Failed in-app purchase flow for p... | [
"private",
"void",
"launchPurchaseFlow",
"(",
"Activity",
"activity",
",",
"Product",
"product",
",",
"ItemType",
"itemType",
",",
"String",
"oldProductId",
")",
"{",
"executeServiceRequest",
"(",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"voi... | Initiate the UI flow for an in-app purchase. Call this method to initiate an in-app purchase, which will involve
bringing up the Google Play screen. The calling activity will be paused while the user interacts with Google
Play
This method MUST be called from the UI thread of the Activity.
@param activity The calling a... | [
"Initiate",
"the",
"UI",
"flow",
"for",
"an",
"in",
"-",
"app",
"purchase",
".",
"Call",
"this",
"method",
"to",
"initiate",
"an",
"in",
"-",
"app",
"purchase",
"which",
"will",
"involve",
"bringing",
"up",
"the",
"Google",
"Play",
"screen",
".",
"The",
... | 1ba9cae56a16fa36bdb2c9c04379853f0300707f | https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-google-inappbilling/src/main/java/com/jdroid/android/google/inappbilling/client/InAppBillingClient.java#L393-L422 |
11,486 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/external/BufferedRandomAccessFile.java | BufferedRandomAccessFile.fillBuffer | private int fillBuffer() throws IOException {
int n = super.read(buffer, 0, BUF_SIZE);
if (n >= 0) {
real_pos += n;
buf_end = n;
buf_pos = 0;
}
return n;
} | java | private int fillBuffer() throws IOException {
int n = super.read(buffer, 0, BUF_SIZE);
if (n >= 0) {
real_pos += n;
buf_end = n;
buf_pos = 0;
}
return n;
} | [
"private",
"int",
"fillBuffer",
"(",
")",
"throws",
"IOException",
"{",
"int",
"n",
"=",
"super",
".",
"read",
"(",
"buffer",
",",
"0",
",",
"BUF_SIZE",
")",
";",
"if",
"(",
"n",
">=",
"0",
")",
"{",
"real_pos",
"+=",
"n",
";",
"buf_end",
"=",
"n... | Reads the next BUF_SIZE bytes into the internal buffer. | [
"Reads",
"the",
"next",
"BUF_SIZE",
"bytes",
"into",
"the",
"internal",
"buffer",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/external/BufferedRandomAccessFile.java#L73-L81 |
11,487 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/external/BufferedRandomAccessFile.java | BufferedRandomAccessFile.read | @Override
public int read(byte b[], int off, int len) throws IOException {
int leftover = buf_end - buf_pos;
if (len <= leftover) {
System.arraycopy(buffer, buf_pos, b, off, len);
buf_pos += len;
return len;
}
for (int i = 0; i < len; i++) {
int c = this.read();
... | java | @Override
public int read(byte b[], int off, int len) throws IOException {
int leftover = buf_end - buf_pos;
if (len <= leftover) {
System.arraycopy(buffer, buf_pos, b, off, len);
buf_pos += len;
return len;
}
for (int i = 0; i < len; i++) {
int c = this.read();
... | [
"@",
"Override",
"public",
"int",
"read",
"(",
"byte",
"b",
"[",
"]",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"int",
"leftover",
"=",
"buf_end",
"-",
"buf_pos",
";",
"if",
"(",
"len",
"<=",
"leftover",
")",
"{",
"Sy... | Reads the set number of bytes into the passed buffer.
@param b The buffer to read the bytes into.
@param off Byte offset within the file to start reading from
@param len Number of bytes to read into the buffer.
@return Number of bytes read. | [
"Reads",
"the",
"set",
"number",
"of",
"bytes",
"into",
"the",
"passed",
"buffer",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/external/BufferedRandomAccessFile.java#L100-L117 |
11,488 | hdbeukel/james-core | src/main/java/org/jamesframework/core/search/algo/PipedLocalSearch.java | PipedLocalSearch.searchStep | @Override
protected void searchStep() {
// execute pipeline
pipeline.stream().forEachOrdered(l -> {
// attach listener
l.addSearchListener(pipelineListener);
// set initial solution (copy!)
l.setCurrentSolution(Solution.checkedCopy(getCurrentSolution()... | java | @Override
protected void searchStep() {
// execute pipeline
pipeline.stream().forEachOrdered(l -> {
// attach listener
l.addSearchListener(pipelineListener);
// set initial solution (copy!)
l.setCurrentSolution(Solution.checkedCopy(getCurrentSolution()... | [
"@",
"Override",
"protected",
"void",
"searchStep",
"(",
")",
"{",
"// execute pipeline",
"pipeline",
".",
"stream",
"(",
")",
".",
"forEachOrdered",
"(",
"l",
"->",
"{",
"// attach listener",
"l",
".",
"addSearchListener",
"(",
"pipelineListener",
")",
";",
"... | Executes all local searches in the pipeline, where the best solution of the previous search is used as initial
solution for the next search. When the entire pipeline has been executed, the search step is complete and the
search terminates. | [
"Executes",
"all",
"local",
"searches",
"in",
"the",
"pipeline",
"where",
"the",
"best",
"solution",
"of",
"the",
"previous",
"search",
"is",
"used",
"as",
"initial",
"solution",
"for",
"the",
"next",
"search",
".",
"When",
"the",
"entire",
"pipeline",
"has"... | 4e85c20c142902373e5b5e8b5d12a2558650f66d | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/algo/PipedLocalSearch.java#L161-L185 |
11,489 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/types/IccProfile.java | IccProfile.readVersion | private void readVersion(TagValue tv) {
int maj = tv.getBytesBigEndian(8, 1); // Major version
int min = (tv.getBytesBigEndian(9, 1) & 0xF0) >> 4; // Minor version (in the first 4 bits of the
// byte)
version = maj + "." + min;
} | java | private void readVersion(TagValue tv) {
int maj = tv.getBytesBigEndian(8, 1); // Major version
int min = (tv.getBytesBigEndian(9, 1) & 0xF0) >> 4; // Minor version (in the first 4 bits of the
// byte)
version = maj + "." + min;
} | [
"private",
"void",
"readVersion",
"(",
"TagValue",
"tv",
")",
"{",
"int",
"maj",
"=",
"tv",
".",
"getBytesBigEndian",
"(",
"8",
",",
"1",
")",
";",
"// Major version",
"int",
"min",
"=",
"(",
"tv",
".",
"getBytesBigEndian",
"(",
"9",
",",
"1",
")",
"... | Read version.
@param tv the tv | [
"Read",
"version",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/types/IccProfile.java#L125-L130 |
11,490 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/types/IccProfile.java | IccProfile.readClass | private void readClass(TagValue tv) {
int profileClass = tv.getBytesBigEndian(12, 4);
String hex = Integer.toHexString(profileClass);
if (hex.equals("73636e72")) {
this.profileClass = ProfileClass.Input;
} else if (hex.equals("6d6e7472")) {
this.profileClass = ProfileClass.Display;
} els... | java | private void readClass(TagValue tv) {
int profileClass = tv.getBytesBigEndian(12, 4);
String hex = Integer.toHexString(profileClass);
if (hex.equals("73636e72")) {
this.profileClass = ProfileClass.Input;
} else if (hex.equals("6d6e7472")) {
this.profileClass = ProfileClass.Display;
} els... | [
"private",
"void",
"readClass",
"(",
"TagValue",
"tv",
")",
"{",
"int",
"profileClass",
"=",
"tv",
".",
"getBytesBigEndian",
"(",
"12",
",",
"4",
")",
";",
"String",
"hex",
"=",
"Integer",
".",
"toHexString",
"(",
"profileClass",
")",
";",
"if",
"(",
"... | Read class.
@param tv the tv | [
"Read",
"class",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/types/IccProfile.java#L148-L168 |
11,491 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/types/IccProfile.java | IccProfile.readCreator | private void readCreator(TagValue tv) {
int creatorSignature = tv.getBytesBigEndian(4, 4);
creator = IccProfileCreators.getIccProfile(creatorSignature);
} | java | private void readCreator(TagValue tv) {
int creatorSignature = tv.getBytesBigEndian(4, 4);
creator = IccProfileCreators.getIccProfile(creatorSignature);
} | [
"private",
"void",
"readCreator",
"(",
"TagValue",
"tv",
")",
"{",
"int",
"creatorSignature",
"=",
"tv",
".",
"getBytesBigEndian",
"(",
"4",
",",
"4",
")",
";",
"creator",
"=",
"IccProfileCreators",
".",
"getIccProfile",
"(",
"creatorSignature",
")",
";",
"}... | Read creator.
@param tv the tv | [
"Read",
"creator",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/types/IccProfile.java#L179-L182 |
11,492 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/types/IccProfile.java | IccProfile.readDescription | private void readDescription(TagValue tv) throws NumberFormatException, IOException {
int index = 128;
int tagCount = tv.getBytesBigEndian(index, 4);
index += 4;
for (int i = 0; i < tagCount; i++) {
int signature = tv.getBytesBigEndian(index, 4);
int tagOffset = tv.getBytesBigEndian(index + ... | java | private void readDescription(TagValue tv) throws NumberFormatException, IOException {
int index = 128;
int tagCount = tv.getBytesBigEndian(index, 4);
index += 4;
for (int i = 0; i < tagCount; i++) {
int signature = tv.getBytesBigEndian(index, 4);
int tagOffset = tv.getBytesBigEndian(index + ... | [
"private",
"void",
"readDescription",
"(",
"TagValue",
"tv",
")",
"throws",
"NumberFormatException",
",",
"IOException",
"{",
"int",
"index",
"=",
"128",
";",
"int",
"tagCount",
"=",
"tv",
".",
"getBytesBigEndian",
"(",
"index",
",",
"4",
")",
";",
"index",
... | Read description.
@param tv the tag value
@throws IOException exception
@throws NumberFormatException exception | [
"Read",
"description",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/types/IccProfile.java#L191-L217 |
11,493 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/types/IccProfile.java | IccProfile.read | @Override
public void read(TagValue tv) {
readClass(tv);
readVersion(tv);
readCreator(tv);
readEmbedded(tv);
try {
readDescription(tv);
} catch (NumberFormatException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
tv.clear();
tv.add(... | java | @Override
public void read(TagValue tv) {
readClass(tv);
readVersion(tv);
readCreator(tv);
readEmbedded(tv);
try {
readDescription(tv);
} catch (NumberFormatException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
tv.clear();
tv.add(... | [
"@",
"Override",
"public",
"void",
"read",
"(",
"TagValue",
"tv",
")",
"{",
"readClass",
"(",
"tv",
")",
";",
"readVersion",
"(",
"tv",
")",
";",
"readCreator",
"(",
"tv",
")",
";",
"readEmbedded",
"(",
"tv",
")",
";",
"try",
"{",
"readDescription",
... | Reads the desired values of the ICCProfile.
@param tv the TagValue containing the array of bytes of the ICCProfile | [
"Reads",
"the",
"desired",
"values",
"of",
"the",
"ICCProfile",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/types/IccProfile.java#L224-L239 |
11,494 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/fileio/filetypes/mzxml/jaxb/MsRun.java | MsRun.getParentFile | public List<MsRun.ParentFile> getParentFile() {
if (parentFile == null) {
parentFile = new ArrayList<MsRun.ParentFile>();
}
return this.parentFile;
} | java | public List<MsRun.ParentFile> getParentFile() {
if (parentFile == null) {
parentFile = new ArrayList<MsRun.ParentFile>();
}
return this.parentFile;
} | [
"public",
"List",
"<",
"MsRun",
".",
"ParentFile",
">",
"getParentFile",
"(",
")",
"{",
"if",
"(",
"parentFile",
"==",
"null",
")",
"{",
"parentFile",
"=",
"new",
"ArrayList",
"<",
"MsRun",
".",
"ParentFile",
">",
"(",
")",
";",
"}",
"return",
"this",
... | Gets the value of the parentFile property.
<p>
This accessor method returns a reference to the live list, not a snapshot. Therefore any
modification you make to the returned list will be present inside the JAXB object. This is why
there is not a <CODE>set</CODE> method for the parentFile property.
<p>
For example, to... | [
"Gets",
"the",
"value",
"of",
"the",
"parentFile",
"property",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/fileio/filetypes/mzxml/jaxb/MsRun.java#L276-L281 |
11,495 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/fileio/filetypes/mzxml/jaxb/MsRun.java | MsRun.getMsInstrument | public List<MsRun.MsInstrument> getMsInstrument() {
if (msInstrument == null) {
msInstrument = new ArrayList<MsRun.MsInstrument>();
}
return this.msInstrument;
} | java | public List<MsRun.MsInstrument> getMsInstrument() {
if (msInstrument == null) {
msInstrument = new ArrayList<MsRun.MsInstrument>();
}
return this.msInstrument;
} | [
"public",
"List",
"<",
"MsRun",
".",
"MsInstrument",
">",
"getMsInstrument",
"(",
")",
"{",
"if",
"(",
"msInstrument",
"==",
"null",
")",
"{",
"msInstrument",
"=",
"new",
"ArrayList",
"<",
"MsRun",
".",
"MsInstrument",
">",
"(",
")",
";",
"}",
"return",
... | Gets the value of the msInstrument property.
<p>
This accessor method returns a reference to the live list, not a snapshot. Therefore any
modification you make to the returned list will be present inside the JAXB object. This is why
there is not a <CODE>set</CODE> method for the msInstrument property.
<p>
For example... | [
"Gets",
"the",
"value",
"of",
"the",
"msInstrument",
"property",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/fileio/filetypes/mzxml/jaxb/MsRun.java#L301-L306 |
11,496 | chhh/MSFTBX | MSFileToolbox/src/main/java/umich/ms/fileio/filetypes/mzxml/jaxb/MsRun.java | MsRun.getDataProcessing | public List<MsRun.DataProcessing> getDataProcessing() {
if (dataProcessing == null) {
dataProcessing = new ArrayList<MsRun.DataProcessing>();
}
return this.dataProcessing;
} | java | public List<MsRun.DataProcessing> getDataProcessing() {
if (dataProcessing == null) {
dataProcessing = new ArrayList<MsRun.DataProcessing>();
}
return this.dataProcessing;
} | [
"public",
"List",
"<",
"MsRun",
".",
"DataProcessing",
">",
"getDataProcessing",
"(",
")",
"{",
"if",
"(",
"dataProcessing",
"==",
"null",
")",
"{",
"dataProcessing",
"=",
"new",
"ArrayList",
"<",
"MsRun",
".",
"DataProcessing",
">",
"(",
")",
";",
"}",
... | Gets the value of the dataProcessing property.
<p>
This accessor method returns a reference to the live list, not a snapshot. Therefore any
modification you make to the returned list will be present inside the JAXB object. This is why
there is not a <CODE>set</CODE> method for the dataProcessing property.
<p>
For exa... | [
"Gets",
"the",
"value",
"of",
"the",
"dataProcessing",
"property",
"."
] | e53ae6be982e2de3123292be7d5297715bec70bb | https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/fileio/filetypes/mzxml/jaxb/MsRun.java#L326-L331 |
11,497 | jboss/jboss-el-api_spec | src/main/java/org/jboss/el/cache/FactoryFinderCache.java | FactoryFinderCache.addCacheEntry | public static void addCacheEntry(final ClassLoader classLoader, final String factoryId, final String factoryClassName) {
if (factoryClassName == null) {
CLASS_CACHE.put(new CacheKey(classLoader, factoryId), "");
} else {
CLASS_CACHE.put(new CacheKey(classLoader, factoryId), facto... | java | public static void addCacheEntry(final ClassLoader classLoader, final String factoryId, final String factoryClassName) {
if (factoryClassName == null) {
CLASS_CACHE.put(new CacheKey(classLoader, factoryId), "");
} else {
CLASS_CACHE.put(new CacheKey(classLoader, factoryId), facto... | [
"public",
"static",
"void",
"addCacheEntry",
"(",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"String",
"factoryId",
",",
"final",
"String",
"factoryClassName",
")",
"{",
"if",
"(",
"factoryClassName",
"==",
"null",
")",
"{",
"CLASS_CACHE",
".",
"put",
... | Called by the container at deployment time to set the name of a given factory, to remove the need for the
implementation to look it up on every call.
@param classLoader The deployments class loader
@param factoryId The type of factory that is being recorded (at this stage only javax.el.ExpressionFactory ha... | [
"Called",
"by",
"the",
"container",
"at",
"deployment",
"time",
"to",
"set",
"the",
"name",
"of",
"a",
"given",
"factory",
"to",
"remove",
"the",
"need",
"for",
"the",
"implementation",
"to",
"look",
"it",
"up",
"on",
"every",
"call",
"."
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/org/jboss/el/cache/FactoryFinderCache.java#L47-L53 |
11,498 | jboss/jboss-el-api_spec | src/main/java/org/jboss/el/cache/FactoryFinderCache.java | FactoryFinderCache.clearClassLoader | public static void clearClassLoader(final ClassLoader classLoader) {
BeanPropertiesCache.clear(classLoader);
final Iterator<Map.Entry<CacheKey, String>> it = CLASS_CACHE.entrySet().iterator();
while (it.hasNext()) {
final CacheKey key = it.next().getKey();
if (key.loader ... | java | public static void clearClassLoader(final ClassLoader classLoader) {
BeanPropertiesCache.clear(classLoader);
final Iterator<Map.Entry<CacheKey, String>> it = CLASS_CACHE.entrySet().iterator();
while (it.hasNext()) {
final CacheKey key = it.next().getKey();
if (key.loader ... | [
"public",
"static",
"void",
"clearClassLoader",
"(",
"final",
"ClassLoader",
"classLoader",
")",
"{",
"BeanPropertiesCache",
".",
"clear",
"(",
"classLoader",
")",
";",
"final",
"Iterator",
"<",
"Map",
".",
"Entry",
"<",
"CacheKey",
",",
"String",
">",
">",
... | This should be called by the container on undeploy to remove all references to the given class loader
from the cache.
@param classLoader The class loader to remove | [
"This",
"should",
"be",
"called",
"by",
"the",
"container",
"on",
"undeploy",
"to",
"remove",
"all",
"references",
"to",
"the",
"given",
"class",
"loader",
"from",
"the",
"cache",
"."
] | 4cef117cae3ccf9f76439845687a8d219ad2eb43 | https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/org/jboss/el/cache/FactoryFinderCache.java#L61-L70 |
11,499 | EasyinnovaSL/Tiff-Library-4J | src/main/java/com/easyinnova/tiff/model/Tag.java | Tag.createValuesDictionary | public void createValuesDictionary() {
tagValueDescriptions = new HashMap<String, String>();
if (valueCodes != null && valueDescriptions != null && valueCodes.size() > 0
&& valueCodes.size() == valueDescriptions.size()) {
for (int i = 0; i < valueCodes.size(); i++) {
tagValueDescriptions.p... | java | public void createValuesDictionary() {
tagValueDescriptions = new HashMap<String, String>();
if (valueCodes != null && valueDescriptions != null && valueCodes.size() > 0
&& valueCodes.size() == valueDescriptions.size()) {
for (int i = 0; i < valueCodes.size(); i++) {
tagValueDescriptions.p... | [
"public",
"void",
"createValuesDictionary",
"(",
")",
"{",
"tagValueDescriptions",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"if",
"(",
"valueCodes",
"!=",
"null",
"&&",
"valueDescriptions",
"!=",
"null",
"&&",
"valueCodes",
".... | Creates the values dictionary. | [
"Creates",
"the",
"values",
"dictionary",
"."
] | 682605d3ed207a66213278c054c98f1b909472b7 | https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/Tag.java#L110-L118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.