code
stringlengths 130
281k
| code_dependency
stringlengths 182
306k
|
|---|---|
public class class_name {
public final DataMapping toDataConfig(Class dataClass, String id, Datamappingstype datamappingstype) throws ClassNotFoundException {
if (!dataMappings.containsKey(dataClass.getName() + id)) {
boolean useAnnotations = datamappingstype == null || datamappingstype.isUseannotations();
Datamappingtype jaxbMapping = (datamappingstype != null) ? findDataMapping(dataClass, id, datamappingstype) : null;
DataMapping dm = new DataMapping();
dataMappings.put(dataClass.getName() + id, dm);
if (jaxbMapping != null && jaxbMapping.getStartcontainer() != null && jaxbMapping.getStartcontainer().size() > 0) {
dm.setId(jaxbMapping.getId());
for (Startcontainertype cs : jaxbMapping.getStartcontainer()) {
dm.addStartcontainer((StartContainerConfig) new StartContainerConfig()
.setAdddata(cs.isAdddata())
.setContainertype(CONTAINER_ELEMENT.valueOf(cs.getContainertype().name()))
.setContainertypemethod(cs.getContainertypemethod())
.setSectionlevel(cs.getSectionlevel().intValue())
.addStyleClasses(cs.getStyleclass().toArray(new String[cs.getStyleclass().size()]))
.setStyleclassesmethod(cs.getStyleclassesmethod())
.setValueasstringmethod(cs.getValueasstringmethod()));
}
}
if (useAnnotations && dm.getStartcontainer().isEmpty()) {
List<StartContainerConfig> scc = getContainers(dataClass);
if (scc != null) {
for (StartContainerConfig s : scc) {
dm.addStartcontainer(s);
}
}
}
if (jaxbMapping != null && jaxbMapping.getElement() != null && jaxbMapping.getElement().size() > 0) {
for (Elementtype e : jaxbMapping.getElement()) {
dm.addElement(fromJaxb(e));
}
}
if (useAnnotations && dm.getElement().isEmpty()) {
List<ElementConfig> ec = getElements(dataClass);
if (ec != null) {
for (ElementConfig e : ec) {
dm.addElement(e);
}
}
}
if (jaxbMapping != null && jaxbMapping.getElementsfromdata() != null) {
dm.setElementsfromdata(new ElementsFromData()
.setElement(fromJaxb(jaxbMapping.getElementsfromdata().getElement()))
.setDatalistmethod(jaxbMapping.getElementsfromdata().getDatalistmethod()));
}
if (useAnnotations && dm.getElementsfromdata() == null) {
if (cacheM.containsKey(dataClass)) {
dm.setElementsfromdata(cacheM.get(dataClass));
} else {
MultipleFromData mfd = (MultipleFromData) dataClass.getAnnotation(MultipleFromData.class);
if (mfd != null) {
dm.setElementsfromdata(new ElementsFromData()
.setDatalistmethod(mfd.dataListMethod())
.setElement(fromAnnotation(mfd.element())));
cacheM.put(dataClass, dm.getElementsfromdata());
}
}
}
if (jaxbMapping != null && jaxbMapping.getEndcontainer() != null) {
if (logger.isLoggable(Level.FINE)) {
logger.fine(String.format("using xml configuration for end of container of %s ", dataClass.getName()));
}
dm.setEndcontainer(new EndContainerConfig().setContainertype(
CONTAINER_ELEMENT.valueOf(jaxbMapping.getEndcontainer().getContainertype().name())).
setDepthtoend(jaxbMapping.getEndcontainer().getDepthtoend().intValue()));
}
if (useAnnotations && dm.getEndcontainer() == null) {
if (cacheECC.containsKey(dataClass)) {
dm.setEndcontainer(cacheECC.get(dataClass));
} else {
ContainerEnd endAnnotation = (ContainerEnd) dataClass.getAnnotation(com.vectorprint.report.itext.annotations.ContainerEnd.class);
if (endAnnotation != null) {
if (logger.isLoggable(Level.FINE)) {
logger.fine(String.format("using annotation for end of container of %s ", dataClass.getName()));
}
dm.setEndcontainer(new EndContainerConfig().setContainertype(endAnnotation.containerType())
.setDepthtoend(endAnnotation.depthToEnd()));
cacheECC.put(dataClass, dm.getEndcontainer());
}
}
}
}
return dataMappings.get(dataClass.getName() + id);
} }
|
public class class_name {
public final DataMapping toDataConfig(Class dataClass, String id, Datamappingstype datamappingstype) throws ClassNotFoundException {
if (!dataMappings.containsKey(dataClass.getName() + id)) {
boolean useAnnotations = datamappingstype == null || datamappingstype.isUseannotations();
Datamappingtype jaxbMapping = (datamappingstype != null) ? findDataMapping(dataClass, id, datamappingstype) : null;
DataMapping dm = new DataMapping();
dataMappings.put(dataClass.getName() + id, dm);
if (jaxbMapping != null && jaxbMapping.getStartcontainer() != null && jaxbMapping.getStartcontainer().size() > 0) {
dm.setId(jaxbMapping.getId()); // depends on control dependency: [if], data = [(jaxbMapping]
for (Startcontainertype cs : jaxbMapping.getStartcontainer()) {
dm.addStartcontainer((StartContainerConfig) new StartContainerConfig()
.setAdddata(cs.isAdddata())
.setContainertype(CONTAINER_ELEMENT.valueOf(cs.getContainertype().name()))
.setContainertypemethod(cs.getContainertypemethod())
.setSectionlevel(cs.getSectionlevel().intValue())
.addStyleClasses(cs.getStyleclass().toArray(new String[cs.getStyleclass().size()]))
.setStyleclassesmethod(cs.getStyleclassesmethod())
.setValueasstringmethod(cs.getValueasstringmethod())); // depends on control dependency: [for], data = [none]
}
}
if (useAnnotations && dm.getStartcontainer().isEmpty()) {
List<StartContainerConfig> scc = getContainers(dataClass);
if (scc != null) {
for (StartContainerConfig s : scc) {
dm.addStartcontainer(s); // depends on control dependency: [for], data = [s]
}
}
}
if (jaxbMapping != null && jaxbMapping.getElement() != null && jaxbMapping.getElement().size() > 0) {
for (Elementtype e : jaxbMapping.getElement()) {
dm.addElement(fromJaxb(e)); // depends on control dependency: [for], data = [e]
}
}
if (useAnnotations && dm.getElement().isEmpty()) {
List<ElementConfig> ec = getElements(dataClass);
if (ec != null) {
for (ElementConfig e : ec) {
dm.addElement(e); // depends on control dependency: [for], data = [e]
}
}
}
if (jaxbMapping != null && jaxbMapping.getElementsfromdata() != null) {
dm.setElementsfromdata(new ElementsFromData()
.setElement(fromJaxb(jaxbMapping.getElementsfromdata().getElement()))
.setDatalistmethod(jaxbMapping.getElementsfromdata().getDatalistmethod())); // depends on control dependency: [if], data = [none]
}
if (useAnnotations && dm.getElementsfromdata() == null) {
if (cacheM.containsKey(dataClass)) {
dm.setElementsfromdata(cacheM.get(dataClass)); // depends on control dependency: [if], data = [none]
} else {
MultipleFromData mfd = (MultipleFromData) dataClass.getAnnotation(MultipleFromData.class);
if (mfd != null) {
dm.setElementsfromdata(new ElementsFromData()
.setDatalistmethod(mfd.dataListMethod())
.setElement(fromAnnotation(mfd.element()))); // depends on control dependency: [if], data = [none]
cacheM.put(dataClass, dm.getElementsfromdata()); // depends on control dependency: [if], data = [none]
}
}
}
if (jaxbMapping != null && jaxbMapping.getEndcontainer() != null) {
if (logger.isLoggable(Level.FINE)) {
logger.fine(String.format("using xml configuration for end of container of %s ", dataClass.getName())); // depends on control dependency: [if], data = [none]
}
dm.setEndcontainer(new EndContainerConfig().setContainertype(
CONTAINER_ELEMENT.valueOf(jaxbMapping.getEndcontainer().getContainertype().name())).
setDepthtoend(jaxbMapping.getEndcontainer().getDepthtoend().intValue())); // depends on control dependency: [if], data = [none]
}
if (useAnnotations && dm.getEndcontainer() == null) {
if (cacheECC.containsKey(dataClass)) {
dm.setEndcontainer(cacheECC.get(dataClass)); // depends on control dependency: [if], data = [none]
} else {
ContainerEnd endAnnotation = (ContainerEnd) dataClass.getAnnotation(com.vectorprint.report.itext.annotations.ContainerEnd.class);
if (endAnnotation != null) {
if (logger.isLoggable(Level.FINE)) {
logger.fine(String.format("using annotation for end of container of %s ", dataClass.getName())); // depends on control dependency: [if], data = [none]
}
dm.setEndcontainer(new EndContainerConfig().setContainertype(endAnnotation.containerType())
.setDepthtoend(endAnnotation.depthToEnd())); // depends on control dependency: [if], data = [none]
cacheECC.put(dataClass, dm.getEndcontainer()); // depends on control dependency: [if], data = [none]
}
}
}
}
return dataMappings.get(dataClass.getName() + id);
} }
|
public class class_name {
public static void generateFieldPersistance(BindTypeContext context, List<? extends ManagedModelProperty> collection, PersistType persistType, boolean forceName, Modifier... modifiers) {
for (ManagedModelProperty property : collection) {
if (property.bindProperty != null && !property.hasTypeAdapter()) {
// if defined a forced typeName, we use it to define every json
// mapping, to allow comparison with parameters
if (forceName)
property.bindProperty.label = DEFAULT_FIELD_NAME;
BindTransformer.checkIfIsInUnsupportedPackage(property.bindProperty.getPropertyType().getTypeName());
generateFieldSerialize(context, persistType, property.bindProperty, modifiers);
generateFieldParser(context, persistType, property.bindProperty, modifiers);
}
}
} }
|
public class class_name {
public static void generateFieldPersistance(BindTypeContext context, List<? extends ManagedModelProperty> collection, PersistType persistType, boolean forceName, Modifier... modifiers) {
for (ManagedModelProperty property : collection) {
if (property.bindProperty != null && !property.hasTypeAdapter()) {
// if defined a forced typeName, we use it to define every json
// mapping, to allow comparison with parameters
if (forceName)
property.bindProperty.label = DEFAULT_FIELD_NAME;
BindTransformer.checkIfIsInUnsupportedPackage(property.bindProperty.getPropertyType().getTypeName()); // depends on control dependency: [if], data = [(property.bindProperty]
generateFieldSerialize(context, persistType, property.bindProperty, modifiers); // depends on control dependency: [if], data = [none]
generateFieldParser(context, persistType, property.bindProperty, modifiers); // depends on control dependency: [if], data = [none]
}
}
} }
|
public class class_name {
public static URL constructResourceURL(Class<?> c, String resName) {
String strUrl = "";
if (resName.startsWith("/")) // 资源名称以"/"开头,从类所在的Class Path根目录开始定位资源
strUrl = getClassRootPath(c) + resName.substring(1);
else
// 资源名称不以"/"开头,从类所在的目录开始定位资源
strUrl = getClassPath(c) + resName;
try {
return new URL(strUrl);
} catch (Exception e) {
return null;
}
} }
|
public class class_name {
public static URL constructResourceURL(Class<?> c, String resName) {
String strUrl = "";
if (resName.startsWith("/")) // 资源名称以"/"开头,从类所在的Class Path根目录开始定位资源
strUrl = getClassRootPath(c) + resName.substring(1);
else
// 资源名称不以"/"开头,从类所在的目录开始定位资源
strUrl = getClassPath(c) + resName;
try {
return new URL(strUrl);
// depends on control dependency: [try], data = [none]
} catch (Exception e) {
return null;
}
// depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
private static void insertPolitician(final KieSession ksession, final ViewRiksdagenPolitician politicianData,
final List<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> dailyList,
final List<ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly> monthlyList,
final List<ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual> annualList,
final List<ViewRiksdagenCommitteeBallotDecisionPoliticianSummary> decisionList) {
if (politicianData.isActiveParliament() && dailyList != null && monthlyList != null && annualList != null) {
Collections.sort(dailyList,
(e1, e2) -> e1.getEmbeddedId().getVoteDate().compareTo(e2.getEmbeddedId().getVoteDate()));
final Optional<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> dailyListFirst = dailyList.stream()
.findFirst();
Collections.sort(monthlyList,
(e1, e2) -> e1.getEmbeddedId().getVoteDate().compareTo(e2.getEmbeddedId().getVoteDate()));
final Optional<ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly> monthlyListFirst = monthlyList.stream()
.findFirst();
Collections.sort(annualList,
(e1, e2) -> e1.getEmbeddedId().getVoteDate().compareTo(e2.getEmbeddedId().getVoteDate()));
final Optional<ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual> annualListFirst = annualList.stream()
.findFirst();
if (annualListFirst.isPresent() && monthlyListFirst.isPresent() && dailyListFirst.isPresent()) {
final PoliticianComplianceCheckImpl politicianComplianceCheckImpl = new PoliticianComplianceCheckImpl(
politicianData, dailyListFirst.get(), monthlyListFirst.get(), annualListFirst.get(),
decisionList);
ksession.insert(politicianComplianceCheckImpl);
}
} else {
final PoliticianComplianceCheckImpl politicianComplianceCheckImpl = new PoliticianComplianceCheckImpl(
politicianData, null, null, null, new ArrayList<>());
ksession.insert(politicianComplianceCheckImpl);
}
} }
|
public class class_name {
private static void insertPolitician(final KieSession ksession, final ViewRiksdagenPolitician politicianData,
final List<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> dailyList,
final List<ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly> monthlyList,
final List<ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual> annualList,
final List<ViewRiksdagenCommitteeBallotDecisionPoliticianSummary> decisionList) {
if (politicianData.isActiveParliament() && dailyList != null && monthlyList != null && annualList != null) {
Collections.sort(dailyList,
(e1, e2) -> e1.getEmbeddedId().getVoteDate().compareTo(e2.getEmbeddedId().getVoteDate())); // depends on control dependency: [if], data = [none]
final Optional<ViewRiksdagenVoteDataBallotPoliticianSummaryDaily> dailyListFirst = dailyList.stream()
.findFirst();
Collections.sort(monthlyList,
(e1, e2) -> e1.getEmbeddedId().getVoteDate().compareTo(e2.getEmbeddedId().getVoteDate())); // depends on control dependency: [if], data = [none]
final Optional<ViewRiksdagenVoteDataBallotPoliticianSummaryMonthly> monthlyListFirst = monthlyList.stream()
.findFirst();
Collections.sort(annualList,
(e1, e2) -> e1.getEmbeddedId().getVoteDate().compareTo(e2.getEmbeddedId().getVoteDate())); // depends on control dependency: [if], data = [none]
final Optional<ViewRiksdagenVoteDataBallotPoliticianSummaryAnnual> annualListFirst = annualList.stream()
.findFirst();
if (annualListFirst.isPresent() && monthlyListFirst.isPresent() && dailyListFirst.isPresent()) {
final PoliticianComplianceCheckImpl politicianComplianceCheckImpl = new PoliticianComplianceCheckImpl(
politicianData, dailyListFirst.get(), monthlyListFirst.get(), annualListFirst.get(),
decisionList);
ksession.insert(politicianComplianceCheckImpl); // depends on control dependency: [if], data = [none]
}
} else {
final PoliticianComplianceCheckImpl politicianComplianceCheckImpl = new PoliticianComplianceCheckImpl(
politicianData, null, null, null, new ArrayList<>());
ksession.insert(politicianComplianceCheckImpl); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
private void setProperties(final JSONObject jsonObject, final List<Object> paramlist, final StringBuilder sql) {
final Iterator<String> keys = jsonObject.keys();
final StringBuilder insertString = new StringBuilder();
final StringBuilder wildcardString = new StringBuilder();
boolean isFirst = true;
String key;
Object value;
while (keys.hasNext()) {
key = keys.next();
if (isFirst) {
insertString.append("(").append(key);
wildcardString.append("(?");
isFirst = false;
} else {
insertString.append(",").append(key);
wildcardString.append(",?");
}
value = jsonObject.get(key);
paramlist.add(value);
if (!keys.hasNext()) {
insertString.append(")");
wildcardString.append(")");
}
}
sql.append("insert into ").append(getName()).append(insertString).append(" values ").append(wildcardString);
} }
|
public class class_name {
private void setProperties(final JSONObject jsonObject, final List<Object> paramlist, final StringBuilder sql) {
final Iterator<String> keys = jsonObject.keys();
final StringBuilder insertString = new StringBuilder();
final StringBuilder wildcardString = new StringBuilder();
boolean isFirst = true;
String key;
Object value;
while (keys.hasNext()) {
key = keys.next(); // depends on control dependency: [while], data = [none]
if (isFirst) {
insertString.append("(").append(key); // depends on control dependency: [if], data = [none]
wildcardString.append("(?"); // depends on control dependency: [if], data = [none]
isFirst = false; // depends on control dependency: [if], data = [none]
} else {
insertString.append(",").append(key); // depends on control dependency: [if], data = [none]
wildcardString.append(",?"); // depends on control dependency: [if], data = [none]
}
value = jsonObject.get(key); // depends on control dependency: [while], data = [none]
paramlist.add(value); // depends on control dependency: [while], data = [none]
if (!keys.hasNext()) {
insertString.append(")"); // depends on control dependency: [if], data = [none]
wildcardString.append(")"); // depends on control dependency: [if], data = [none]
}
}
sql.append("insert into ").append(getName()).append(insertString).append(" values ").append(wildcardString);
} }
|
public class class_name {
public static Status printNodesResults(Map<Status, List<String>> map, PrintWriter reportWriter) {
boolean canFindClass = true;
boolean canFindFS = true;
for (Map.Entry<Status, List<String>> entry : map.entrySet()) {
String nodeAddresses = String.join(" ", entry.getValue());
switch (entry.getKey()) {
case FAIL_TO_FIND_CLASS:
canFindClass = false;
reportWriter.printf("Nodes of IP addresses: %s "
+ "cannot recognize Alluxio classes.%n%n", nodeAddresses);
break;
case FAIL_TO_FIND_FS:
canFindFS = false;
reportWriter.printf("Nodes of IP addresses: %s "
+ "cannot recognize Alluxio filesystem.%n%n", nodeAddresses);
break;
default:
reportWriter.printf("Nodes of IP addresses: %s "
+ "can recognize Alluxio filesystem.%n%n", nodeAddresses);
}
}
return canFindClass ? (canFindFS ? Status.SUCCESS : Status.FAIL_TO_FIND_FS)
: Status.FAIL_TO_FIND_CLASS;
} }
|
public class class_name {
public static Status printNodesResults(Map<Status, List<String>> map, PrintWriter reportWriter) {
boolean canFindClass = true;
boolean canFindFS = true;
for (Map.Entry<Status, List<String>> entry : map.entrySet()) {
String nodeAddresses = String.join(" ", entry.getValue());
switch (entry.getKey()) {
case FAIL_TO_FIND_CLASS:
canFindClass = false;
reportWriter.printf("Nodes of IP addresses: %s "
+ "cannot recognize Alluxio classes.%n%n", nodeAddresses); // depends on control dependency: [for], data = [none]
break;
case FAIL_TO_FIND_FS:
canFindFS = false;
reportWriter.printf("Nodes of IP addresses: %s "
+ "cannot recognize Alluxio filesystem.%n%n", nodeAddresses); // depends on control dependency: [for], data = [none]
break;
default:
reportWriter.printf("Nodes of IP addresses: %s "
+ "can recognize Alluxio filesystem.%n%n", nodeAddresses);
}
}
return canFindClass ? (canFindFS ? Status.SUCCESS : Status.FAIL_TO_FIND_FS)
: Status.FAIL_TO_FIND_CLASS;
} }
|
public class class_name {
public static int parseNumber(String text, int[] pos, int radix) {
// assert(pos[0] >= 0);
// assert(radix >= 2);
// assert(radix <= 36);
int n = 0;
int p = pos[0];
while (p < text.length()) {
int ch = Character.codePointAt(text, p);
int d = UCharacter.digit(ch, radix);
if (d < 0) {
break;
}
n = radix*n + d;
// ASSUME that when a 32-bit integer overflows it becomes
// negative. E.g., 214748364 * 10 + 8 => negative value.
if (n < 0) {
return -1;
}
++p;
}
if (p == pos[0]) {
return -1;
}
pos[0] = p;
return n;
} }
|
public class class_name {
public static int parseNumber(String text, int[] pos, int radix) {
// assert(pos[0] >= 0);
// assert(radix >= 2);
// assert(radix <= 36);
int n = 0;
int p = pos[0];
while (p < text.length()) {
int ch = Character.codePointAt(text, p);
int d = UCharacter.digit(ch, radix);
if (d < 0) {
break;
}
n = radix*n + d; // depends on control dependency: [while], data = [none]
// ASSUME that when a 32-bit integer overflows it becomes
// negative. E.g., 214748364 * 10 + 8 => negative value.
if (n < 0) {
return -1; // depends on control dependency: [if], data = [none]
}
++p; // depends on control dependency: [while], data = [none]
}
if (p == pos[0]) {
return -1; // depends on control dependency: [if], data = [none]
}
pos[0] = p;
return n;
} }
|
public class class_name {
protected int computeGandE_border(KltFeature feature, float cx, float cy) {
computeSubImageBounds(feature, cx, cy);
ImageMiscOps.fill(currDesc, Float.NaN);
currDesc.subimage(dstX0, dstY0, dstX1, dstY1, subimage);
interpInput.setImage(image);
interpInput.region(srcX0, srcY0, subimage);
int total = 0;
Gxx = 0; Gyy = 0; Gxy = 0;
Ex = 0; Ey = 0;
for( int i = 0; i < lengthFeature; i++ ) {
float template = feature.desc.data[i];
float current = currDesc.data[i];
// if the description was outside of the image here skip it
if( Float.isNaN(template) || Float.isNaN(current))
continue;
// count total number of points inbounds
total++;
float dX = feature.derivX.data[i];
float dY = feature.derivY.data[i];
// compute the difference between the previous and the current image
float d = template - current;
Ex += d * dX;
Ey += d * dY;
Gxx += dX * dX;
Gyy += dY * dY;
Gxy += dX * dY;
}
return total;
} }
|
public class class_name {
protected int computeGandE_border(KltFeature feature, float cx, float cy) {
computeSubImageBounds(feature, cx, cy);
ImageMiscOps.fill(currDesc, Float.NaN);
currDesc.subimage(dstX0, dstY0, dstX1, dstY1, subimage);
interpInput.setImage(image);
interpInput.region(srcX0, srcY0, subimage);
int total = 0;
Gxx = 0; Gyy = 0; Gxy = 0;
Ex = 0; Ey = 0;
for( int i = 0; i < lengthFeature; i++ ) {
float template = feature.desc.data[i];
float current = currDesc.data[i];
// if the description was outside of the image here skip it
if( Float.isNaN(template) || Float.isNaN(current))
continue;
// count total number of points inbounds
total++; // depends on control dependency: [for], data = [none]
float dX = feature.derivX.data[i];
float dY = feature.derivY.data[i];
// compute the difference between the previous and the current image
float d = template - current;
Ex += d * dX; // depends on control dependency: [for], data = [none]
Ey += d * dY; // depends on control dependency: [for], data = [none]
Gxx += dX * dX; // depends on control dependency: [for], data = [none]
Gyy += dY * dY; // depends on control dependency: [for], data = [none]
Gxy += dX * dY; // depends on control dependency: [for], data = [none]
}
return total;
} }
|
public class class_name {
private void writeCompletionFile() {
File completionFile = getCompletionFile();
try {
if (completionFile.createNewFile()) {
log.info("successfully created completion marker file: {}",
completionFile.getAbsolutePath());
} else {
log.warn("completion marker file unexpectably exists already " +
"- something may be amiss: {}",
completionFile.getAbsolutePath());
}
} catch (IOException e) {
log.error("Unable to create the completion file {}: {}",
completionFile.getAbsolutePath(),
e.getMessage());
}
} }
|
public class class_name {
private void writeCompletionFile() {
File completionFile = getCompletionFile();
try {
if (completionFile.createNewFile()) {
log.info("successfully created completion marker file: {}",
completionFile.getAbsolutePath()); // depends on control dependency: [if], data = [none]
} else {
log.warn("completion marker file unexpectably exists already " +
"- something may be amiss: {}",
completionFile.getAbsolutePath()); // depends on control dependency: [if], data = [none]
}
} catch (IOException e) {
log.error("Unable to create the completion file {}: {}",
completionFile.getAbsolutePath(),
e.getMessage());
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
@SuppressWarnings("unchecked")
public static void readModuleConfig(Properties properties, boolean isDev) {
logger.info(Messages.get("info.module.load.conf"));
//读取模块配置
Enumeration<URL> moduleUrls = IOUtils.getResources("conf/module.conf");
List<String> readedModule = Lists.newArrayList();
if (moduleUrls.hasMoreElements()) {
while (moduleUrls.hasMoreElements()) {
InputStream in = null;
URL url = moduleUrls.nextElement();
try {
String fileName = url.getFile();
String modelName = fileName;
int jarFileIndex = modelName.lastIndexOf("!");
if (jarFileIndex != -1) {
modelName = modelName.substring(0, jarFileIndex);
}
jarFileIndex = modelName.lastIndexOf(".");
if (jarFileIndex != -1) {
modelName = modelName.substring(0, jarFileIndex);
}
int fileIndex = modelName.lastIndexOf("/");
modelName = modelName.substring(fileIndex + 1);
if (url.getProtocol().equals("file") && "module".equals(modelName)) {
//projectName/target/classes/conf/module
//projectName/src/main/resources/conf/module
if (fileName.endsWith("/target/classes/conf/module.conf")) {
try {
modelName = Paths.get(url.toURI())
.resolveSibling("../../../").normalize().getFileName().toString();
} catch (URISyntaxException e) {
// no op
}
} else if (fileName.endsWith("/src/main/resources/conf/module.conf")) {
try {
modelName = Paths.get(url.toURI()).resolveSibling("../../../../")
.normalize().getFileName().toString();
} catch (URISyntaxException e) {
// no op
}
}
}
if (readedModule.contains(modelName)) continue;
readedModule.add(modelName);
logger.info(Messages.get("info.module.load", modelName));
logger.debug(Messages.get("info.module.load.item.conf", toExternalForm(url)));
URLConnection connection = url.openConnection();
if (isDev) {
connection.setUseCaches(false);
}
in = connection.getInputStream();
} catch (IOException e) {
logger.error(Messages.get("info.load.error", toExternalForm(url)));
}
loadProperties(in, properties, url);
}
} else {
logger.info(Messages.get("info.module.none"));
}
} }
|
public class class_name {
@SuppressWarnings("unchecked")
public static void readModuleConfig(Properties properties, boolean isDev) {
logger.info(Messages.get("info.module.load.conf"));
//读取模块配置
Enumeration<URL> moduleUrls = IOUtils.getResources("conf/module.conf");
List<String> readedModule = Lists.newArrayList();
if (moduleUrls.hasMoreElements()) {
while (moduleUrls.hasMoreElements()) {
InputStream in = null;
URL url = moduleUrls.nextElement();
try {
String fileName = url.getFile();
String modelName = fileName;
int jarFileIndex = modelName.lastIndexOf("!");
if (jarFileIndex != -1) {
modelName = modelName.substring(0, jarFileIndex);
}
jarFileIndex = modelName.lastIndexOf(".");
if (jarFileIndex != -1) {
modelName = modelName.substring(0, jarFileIndex);
}
int fileIndex = modelName.lastIndexOf("/");
modelName = modelName.substring(fileIndex + 1);
if (url.getProtocol().equals("file") && "module".equals(modelName)) {
//projectName/target/classes/conf/module
//projectName/src/main/resources/conf/module
if (fileName.endsWith("/target/classes/conf/module.conf")) {
try {
modelName = Paths.get(url.toURI())
.resolveSibling("../../../").normalize().getFileName().toString();
} catch (URISyntaxException e) {
// no op
}
} else if (fileName.endsWith("/src/main/resources/conf/module.conf")) {
try {
modelName = Paths.get(url.toURI()).resolveSibling("../../../../")
.normalize().getFileName().toString();
} catch (URISyntaxException e) {
// no op
}
}
}
if (readedModule.contains(modelName)) continue;
readedModule.add(modelName);
logger.info(Messages.get("info.module.load", modelName));
logger.debug(Messages.get("info.module.load.item.conf", toExternalForm(url)));
URLConnection connection = url.openConnection();
if (isDev) {
connection.setUseCaches(false); // depends on control dependency: [if], data = [none]
}
in = connection.getInputStream();
} catch (IOException e) {
logger.error(Messages.get("info.load.error", toExternalForm(url)));
}
loadProperties(in, properties, url);
}
} else {
logger.info(Messages.get("info.module.none"));
}
} }
|
public class class_name {
public void set(String name, Object obj) throws IOException {
if (name.equalsIgnoreCase(SKIP_CERTS)) {
if (!(obj instanceof Integer))
throw new IOException("Attribute value should be of type Integer.");
int skipCertsValue = ((Integer)obj).intValue();
if (skipCertsValue < -1)
throw new IOException("Invalid value for skipCerts");
if (skipCertsValue == -1) {
skipCerts = Integer.MAX_VALUE;
} else {
skipCerts = skipCertsValue;
}
} else
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:InhibitAnyPolicy.");
encodeThis();
} }
|
public class class_name {
public void set(String name, Object obj) throws IOException {
if (name.equalsIgnoreCase(SKIP_CERTS)) {
if (!(obj instanceof Integer))
throw new IOException("Attribute value should be of type Integer.");
int skipCertsValue = ((Integer)obj).intValue();
if (skipCertsValue < -1)
throw new IOException("Invalid value for skipCerts");
if (skipCertsValue == -1) {
skipCerts = Integer.MAX_VALUE; // depends on control dependency: [if], data = [none]
} else {
skipCerts = skipCertsValue; // depends on control dependency: [if], data = [none]
}
} else
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:InhibitAnyPolicy.");
encodeThis();
} }
|
public class class_name {
protected synchronized void checkRollOver ()
{
// check to see if we should roll over the log
String newDayStamp = _dayFormat.format(new Date());
// hey! we need to roll it over!
if (!newDayStamp.equals(_dayStamp)) {
log("log_closed");
_logWriter.close();
_logWriter = null;
// rename the old file
String npath = _logPath.getPath() + "." + _dayStamp;
if (!_logPath.renameTo(new File(npath))) {
log.warning("Failed to rename audit log file", "path", _logPath, "npath", npath);
}
// open our new log file
openLog(false);
// and set the next day stamp
_dayStamp = newDayStamp;
}
scheduleNextRolloverCheck();
} }
|
public class class_name {
protected synchronized void checkRollOver ()
{
// check to see if we should roll over the log
String newDayStamp = _dayFormat.format(new Date());
// hey! we need to roll it over!
if (!newDayStamp.equals(_dayStamp)) {
log("log_closed"); // depends on control dependency: [if], data = [none]
_logWriter.close(); // depends on control dependency: [if], data = [none]
_logWriter = null; // depends on control dependency: [if], data = [none]
// rename the old file
String npath = _logPath.getPath() + "." + _dayStamp;
if (!_logPath.renameTo(new File(npath))) {
log.warning("Failed to rename audit log file", "path", _logPath, "npath", npath); // depends on control dependency: [if], data = [none]
}
// open our new log file
openLog(false); // depends on control dependency: [if], data = [none]
// and set the next day stamp
_dayStamp = newDayStamp; // depends on control dependency: [if], data = [none]
}
scheduleNextRolloverCheck();
} }
|
public class class_name {
public Format getFormatForContainer(CmsObject cms, String type, int width) {
IdentityHashMap<CmsFormatterBean, Format> formatsByFormatter = new IdentityHashMap<CmsFormatterBean, Format>();
// relate formatters to formats so we can pick the corresponding format after a formatter has been selected
CmsFormatterBean mainFormatter = createFormatterBean(m_mainFormat, true);
formatsByFormatter.put(mainFormatter, m_mainFormat);
List<I_CmsFormatterBean> formatters = new ArrayList<I_CmsFormatterBean>();
for (Format format : m_otherFormats) {
CmsFormatterBean formatter = createFormatterBean(format, false);
formatsByFormatter.put(formatter, format);
formatters.add(formatter);
}
formatters.add(0, mainFormatter);
CmsFormatterConfiguration formatterConfiguration = CmsFormatterConfiguration.create(cms, formatters);
I_CmsFormatterBean matchingFormatter = formatterConfiguration.getDefaultFormatter(type, width);
if (matchingFormatter == null) {
return null;
}
return formatsByFormatter.get(matchingFormatter);
} }
|
public class class_name {
public Format getFormatForContainer(CmsObject cms, String type, int width) {
IdentityHashMap<CmsFormatterBean, Format> formatsByFormatter = new IdentityHashMap<CmsFormatterBean, Format>();
// relate formatters to formats so we can pick the corresponding format after a formatter has been selected
CmsFormatterBean mainFormatter = createFormatterBean(m_mainFormat, true);
formatsByFormatter.put(mainFormatter, m_mainFormat);
List<I_CmsFormatterBean> formatters = new ArrayList<I_CmsFormatterBean>();
for (Format format : m_otherFormats) {
CmsFormatterBean formatter = createFormatterBean(format, false);
formatsByFormatter.put(formatter, format);
// depends on control dependency: [for], data = [format]
formatters.add(formatter);
// depends on control dependency: [for], data = [format]
}
formatters.add(0, mainFormatter);
CmsFormatterConfiguration formatterConfiguration = CmsFormatterConfiguration.create(cms, formatters);
I_CmsFormatterBean matchingFormatter = formatterConfiguration.getDefaultFormatter(type, width);
if (matchingFormatter == null) {
return null;
// depends on control dependency: [if], data = [none]
}
return formatsByFormatter.get(matchingFormatter);
} }
|
public class class_name {
private Double fetchInstancesOnlineRatio(ObjectId collectorItemId) {
int totalInstances = 0, totalInstancesOnline = 0;
Double instancesOnlineScore = null;
List<EnvironmentStatus> statuses = environmentStatusRepository
.findByCollectorItemId(collectorItemId);
if (null == statuses || statuses.isEmpty()) {
return null;
}
for (EnvironmentStatus environmentStatus : statuses) {
totalInstances++;
if (environmentStatus.isOnline()) {
totalInstancesOnline++;
}
}
instancesOnlineScore = ((totalInstancesOnline * 100) / (double) totalInstances);
LOGGER.info("totalInstances " + totalInstances + " totalInstancesOnline " + totalInstancesOnline + " instancesOnlineScore " + instancesOnlineScore);
return instancesOnlineScore;
} }
|
public class class_name {
private Double fetchInstancesOnlineRatio(ObjectId collectorItemId) {
int totalInstances = 0, totalInstancesOnline = 0;
Double instancesOnlineScore = null;
List<EnvironmentStatus> statuses = environmentStatusRepository
.findByCollectorItemId(collectorItemId);
if (null == statuses || statuses.isEmpty()) {
return null; // depends on control dependency: [if], data = [none]
}
for (EnvironmentStatus environmentStatus : statuses) {
totalInstances++; // depends on control dependency: [for], data = [none]
if (environmentStatus.isOnline()) {
totalInstancesOnline++; // depends on control dependency: [if], data = [none]
}
}
instancesOnlineScore = ((totalInstancesOnline * 100) / (double) totalInstances);
LOGGER.info("totalInstances " + totalInstances + " totalInstancesOnline " + totalInstancesOnline + " instancesOnlineScore " + instancesOnlineScore);
return instancesOnlineScore;
} }
|
public class class_name {
public String getRow(final File file) {
StringBuilder builder = new StringBuilder();
Counts counts = get(file);
builder.append("<tr bgcolor=\"");
builder.append(color(counts));
builder.append("\"><td>");
int depth = dirHelper.dirDepth(file);
indent(depth, builder);
builder.append("<a href=\"");
builder.append(FitUtils.htmlSafeFile(file));
builder.append("\">");
builder.append(file.getName());
builder.append("</a>");
builder.append("</td><td>");
if (counts == null) {
builder.append("(none)");
} else {
builder.append(counts.toString());
}
builder.append("</td></tr>");
return builder.toString();
} }
|
public class class_name {
public String getRow(final File file) {
StringBuilder builder = new StringBuilder();
Counts counts = get(file);
builder.append("<tr bgcolor=\"");
builder.append(color(counts));
builder.append("\"><td>");
int depth = dirHelper.dirDepth(file);
indent(depth, builder);
builder.append("<a href=\"");
builder.append(FitUtils.htmlSafeFile(file));
builder.append("\">");
builder.append(file.getName());
builder.append("</a>");
builder.append("</td><td>");
if (counts == null) {
builder.append("(none)"); // depends on control dependency: [if], data = [none]
} else {
builder.append(counts.toString()); // depends on control dependency: [if], data = [(counts]
}
builder.append("</td></tr>");
return builder.toString();
} }
|
public class class_name {
public void setWorkGroups(java.util.Collection<WorkGroupSummary> workGroups) {
if (workGroups == null) {
this.workGroups = null;
return;
}
this.workGroups = new java.util.ArrayList<WorkGroupSummary>(workGroups);
} }
|
public class class_name {
public void setWorkGroups(java.util.Collection<WorkGroupSummary> workGroups) {
if (workGroups == null) {
this.workGroups = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
}
this.workGroups = new java.util.ArrayList<WorkGroupSummary>(workGroups);
} }
|
public class class_name {
public static String executeSubstring(String text, String parseExpression) {
LOGGER.debug("substring抽取函数之前:" + text);
String parameter = parseExpression.replace("substring(", "");
parameter = parameter.substring(0, parameter.length() - 1);
String[] attr = parameter.split(",");
if (attr != null && attr.length == 2) {
int beginIndex = Integer.parseInt(attr[0]);
int endIndex = Integer.parseInt(attr[1]);
text = text.substring(beginIndex, endIndex);
}
LOGGER.debug("substring抽取函数之后:" + text);
return text;
} }
|
public class class_name {
public static String executeSubstring(String text, String parseExpression) {
LOGGER.debug("substring抽取函数之前:" + text);
String parameter = parseExpression.replace("substring(", "");
parameter = parameter.substring(0, parameter.length() - 1);
String[] attr = parameter.split(",");
if (attr != null && attr.length == 2) {
int beginIndex = Integer.parseInt(attr[0]);
int endIndex = Integer.parseInt(attr[1]);
text = text.substring(beginIndex, endIndex); // depends on control dependency: [if], data = [none]
}
LOGGER.debug("substring抽取函数之后:" + text);
return text;
} }
|
public class class_name {
public Observable<ServiceResponse<JobAgentInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, String jobAgentName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (serverName == null) {
throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
}
if (jobAgentName == null) {
throw new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
final Map<String, String> tags = null;
JobAgentUpdate parameters = new JobAgentUpdate();
parameters.withTags(null);
return service.beginUpdate(resourceGroupName, serverName, jobAgentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<JobAgentInner>>>() {
@Override
public Observable<ServiceResponse<JobAgentInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<JobAgentInner> clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} }
|
public class class_name {
public Observable<ServiceResponse<JobAgentInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, String jobAgentName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (serverName == null) {
throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
}
if (jobAgentName == null) {
throw new IllegalArgumentException("Parameter jobAgentName is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
final Map<String, String> tags = null;
JobAgentUpdate parameters = new JobAgentUpdate();
parameters.withTags(null);
return service.beginUpdate(resourceGroupName, serverName, jobAgentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<JobAgentInner>>>() {
@Override
public Observable<ServiceResponse<JobAgentInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<JobAgentInner> clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse); // depends on control dependency: [try], data = [none]
} catch (Throwable t) {
return Observable.error(t);
} // depends on control dependency: [catch], data = [none]
}
});
} }
|
public class class_name {
public String listJs() {
StringBuffer js = new StringBuffer(1024);
CmsMessages messages = Messages.get().getBundle(getWp().getLocale());
js.append("<script type='text/javascript' src='");
js.append(CmsWorkplace.getSkinUri());
js.append("jquery/unpacked/jquery.js'></script>\n");
js.append("<script type='text/javascript' src='");
js.append(CmsWorkplace.getSkinUri());
js.append("jquery/unpacked/jquery.hint.js'></script>\n");
js.append("<script type='text/javascript' src='");
js.append(CmsWorkplace.getSkinUri());
js.append("admin/javascript/list.js'></script>\n");
if (!m_metadata.getMultiActions().isEmpty()) {
js.append("<script type='text/javascript'>\n");
js.append("\tvar ");
js.append(NO_SELECTION_HELP_VAR);
js.append(" = '");
js.append(CmsStringUtil.escapeJavaScript(messages.key(Messages.GUI_LIST_ACTION_NO_SELECTION_0)));
js.append("';\n");
Iterator<CmsListMultiAction> it = m_metadata.getMultiActions().iterator();
while (it.hasNext()) {
CmsListMultiAction action = it.next();
if (action instanceof CmsListRadioMultiAction) {
CmsListRadioMultiAction rAction = (CmsListRadioMultiAction)action;
js.append("\tvar ");
js.append(NO_SELECTION_MATCH_HELP_VAR);
js.append(rAction.getId());
js.append(" = '");
js.append(
CmsStringUtil.escapeJavaScript(
messages.key(
Messages.GUI_LIST_ACTION_NO_SELECTION_MATCH_1,
new Integer(rAction.getSelections()))));
js.append("';\n");
}
}
js.append("</script>\n");
}
return js.toString();
} }
|
public class class_name {
public String listJs() {
StringBuffer js = new StringBuffer(1024);
CmsMessages messages = Messages.get().getBundle(getWp().getLocale());
js.append("<script type='text/javascript' src='");
js.append(CmsWorkplace.getSkinUri());
js.append("jquery/unpacked/jquery.js'></script>\n");
js.append("<script type='text/javascript' src='");
js.append(CmsWorkplace.getSkinUri());
js.append("jquery/unpacked/jquery.hint.js'></script>\n");
js.append("<script type='text/javascript' src='");
js.append(CmsWorkplace.getSkinUri());
js.append("admin/javascript/list.js'></script>\n");
if (!m_metadata.getMultiActions().isEmpty()) {
js.append("<script type='text/javascript'>\n"); // depends on control dependency: [if], data = [none]
js.append("\tvar "); // depends on control dependency: [if], data = [none]
js.append(NO_SELECTION_HELP_VAR); // depends on control dependency: [if], data = [none]
js.append(" = '");
js.append(CmsStringUtil.escapeJavaScript(messages.key(Messages.GUI_LIST_ACTION_NO_SELECTION_0)));
js.append("';\n"); // depends on control dependency: [if], data = [none] // depends on control dependency: [if], data = [none]
Iterator<CmsListMultiAction> it = m_metadata.getMultiActions().iterator();
while (it.hasNext()) {
CmsListMultiAction action = it.next();
if (action instanceof CmsListRadioMultiAction) {
CmsListRadioMultiAction rAction = (CmsListRadioMultiAction)action;
js.append("\tvar "); // depends on control dependency: [if], data = [none]
js.append(NO_SELECTION_MATCH_HELP_VAR); // depends on control dependency: [if], data = [none]
js.append(rAction.getId()); // depends on control dependency: [if], data = [none]
js.append(" = '");
js.append(
CmsStringUtil.escapeJavaScript(
messages.key(
Messages.GUI_LIST_ACTION_NO_SELECTION_MATCH_1,
new Integer(rAction.getSelections()))));
js.append("';\n"); // depends on control dependency: [if], data = [none] // depends on control dependency: [if], data = [none]
}
}
js.append("</script>\n"); // depends on control dependency: [if], data = [none]
}
return js.toString();
} }
|
public class class_name {
protected void setupForWar() {
// Identify the war file that contains this class
ProtectionDomain protectionDomain = RunWar.class.getProtectionDomain();
URL location = protectionDomain.getCodeSource().getLocation();
String warFilePath = trimToFile(location.toExternalForm());
File warFile = new File(warFilePath);
if (!warFile.exists()) {
throw new IllegalStateException("war file not found: " + warFilePath);
}
webapp.setWar(warFilePath);
webapp.setClassLoader(Thread.currentThread().getContextClassLoader());
if (!Boolean.getBoolean("webapp.extractWar")) {
try {
webapp.setExtractWAR(false);
webapp.setBaseResource(JarResource.newJarResource(Resource.newResource(warFile)));
} catch (IOException e) {
throw new RuntimeException("Error setting base resource to:" + warFilePath, e);
}
}
if (log().isDebugEnabled()) {
ClassLoader classLoader = webapp.getClassLoader();
log().debug("webapp classLoader: " + classLoader);
if (classLoader instanceof URLClassLoader) {
URL[] urls = ((URLClassLoader) classLoader).getURLs();
log().debug("webapp classLoader URLs: " + Arrays.toString(urls));
}
}
} }
|
public class class_name {
protected void setupForWar() {
// Identify the war file that contains this class
ProtectionDomain protectionDomain = RunWar.class.getProtectionDomain();
URL location = protectionDomain.getCodeSource().getLocation();
String warFilePath = trimToFile(location.toExternalForm());
File warFile = new File(warFilePath);
if (!warFile.exists()) {
throw new IllegalStateException("war file not found: " + warFilePath);
}
webapp.setWar(warFilePath);
webapp.setClassLoader(Thread.currentThread().getContextClassLoader());
if (!Boolean.getBoolean("webapp.extractWar")) {
try {
webapp.setExtractWAR(false); // depends on control dependency: [try], data = [none]
webapp.setBaseResource(JarResource.newJarResource(Resource.newResource(warFile))); // depends on control dependency: [try], data = [none]
} catch (IOException e) {
throw new RuntimeException("Error setting base resource to:" + warFilePath, e);
} // depends on control dependency: [catch], data = [none]
}
if (log().isDebugEnabled()) {
ClassLoader classLoader = webapp.getClassLoader();
log().debug("webapp classLoader: " + classLoader);
if (classLoader instanceof URLClassLoader) {
URL[] urls = ((URLClassLoader) classLoader).getURLs();
log().debug("webapp classLoader URLs: " + Arrays.toString(urls));
}
}
} }
|
public class class_name {
private Stream<MemberId> getSubscriberNodes(String topicName) {
InternalTopic topic = topics.get(topicName);
if (topic == null) {
return Stream.empty();
}
return topic.remoteSubscriptions().stream()
.filter(s -> !s.isTombstone())
.map(s -> s.memberId())
.distinct();
} }
|
public class class_name {
private Stream<MemberId> getSubscriberNodes(String topicName) {
InternalTopic topic = topics.get(topicName);
if (topic == null) {
return Stream.empty(); // depends on control dependency: [if], data = [none]
}
return topic.remoteSubscriptions().stream()
.filter(s -> !s.isTombstone())
.map(s -> s.memberId())
.distinct();
} }
|
public class class_name {
protected boolean appendColName(TableAlias aTableAlias, PathInfo aPathInfo, boolean translate, StringBuffer buf)
{
String prefix = aPathInfo.prefix;
String suffix = aPathInfo.suffix;
String colName = getColName(aTableAlias, aPathInfo, translate);
if (prefix != null) // rebuild function contains (
{
buf.append(prefix);
}
buf.append(colName);
if (suffix != null) // rebuild function
{
buf.append(suffix);
}
return true;
} }
|
public class class_name {
protected boolean appendColName(TableAlias aTableAlias, PathInfo aPathInfo, boolean translate, StringBuffer buf)
{
String prefix = aPathInfo.prefix;
String suffix = aPathInfo.suffix;
String colName = getColName(aTableAlias, aPathInfo, translate);
if (prefix != null) // rebuild function contains (
{
buf.append(prefix);
// depends on control dependency: [if], data = [(prefix]
}
buf.append(colName);
if (suffix != null) // rebuild function
{
buf.append(suffix);
// depends on control dependency: [if], data = [(suffix]
}
return true;
} }
|
public class class_name {
public void setCurrentValue(double curValue, boolean fireEvent) {
// Confine the value to the range
this.curValue = Math.max(minValue, Math.min(maxValue, curValue));
double remainder = (this.curValue - minValue) % stepSize;
this.curValue -= remainder;
// Go to next step if more than halfway there
if ((remainder > (stepSize / 2)) && ((this.curValue + stepSize) <= maxValue)) {
this.curValue += stepSize;
}
// Redraw the knob
drawKnob();
// Fire the ValueChangeEvent
if (fireEvent) {
ValueChangeEvent.fire(this, this.curValue);
}
} }
|
public class class_name {
public void setCurrentValue(double curValue, boolean fireEvent) {
// Confine the value to the range
this.curValue = Math.max(minValue, Math.min(maxValue, curValue));
double remainder = (this.curValue - minValue) % stepSize;
this.curValue -= remainder;
// Go to next step if more than halfway there
if ((remainder > (stepSize / 2)) && ((this.curValue + stepSize) <= maxValue)) {
this.curValue += stepSize;
// depends on control dependency: [if], data = [none]
}
// Redraw the knob
drawKnob();
// Fire the ValueChangeEvent
if (fireEvent) {
ValueChangeEvent.fire(this, this.curValue);
// depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
private void addExportMethod(Map<String, Node> exports, String export, Node context) {
// We can export as a property if any of the following conditions holds:
// a) ES6 class members, which the above `addExportForEs6Method` handles
// b) this is a property on a name which is also being exported
// c) this is a prototype property
String methodOwnerName = null; // the object this method is on, null for exported names.
boolean isEs5StylePrototypeAssignment = false; // If this is a prototype property
String propertyName = null;
if (context.getFirstChild().isGetProp()) { // e.g. `/** @export */ a.prototype.b = obj;`
Node node = context.getFirstChild(); // e.g. get `a.prototype.b`
Node ownerNode = node.getFirstChild(); // e.g. get `a.prototype`
methodOwnerName = ownerNode.getQualifiedName(); // e.g. get the string "a.prototype"
if (ownerNode.isGetProp()
&& ownerNode.getLastChild().getString().equals(PROTOTYPE_PROPERTY)) {
// e.g. true if ownerNode is `a.prototype`
// false if this export were `/** @export */ a.b = obj;` instead
isEs5StylePrototypeAssignment = true;
}
propertyName = node.getSecondChild().getString();
}
boolean useExportSymbol = true;
if (isEs5StylePrototypeAssignment) {
useExportSymbol = false;
} else if (methodOwnerName != null && exports.containsKey(methodOwnerName)) {
useExportSymbol = false;
}
if (useExportSymbol) {
addExportSymbolCall(export, context);
} else {
addExportPropertyCall(methodOwnerName, context, export, propertyName);
}
} }
|
public class class_name {
private void addExportMethod(Map<String, Node> exports, String export, Node context) {
// We can export as a property if any of the following conditions holds:
// a) ES6 class members, which the above `addExportForEs6Method` handles
// b) this is a property on a name which is also being exported
// c) this is a prototype property
String methodOwnerName = null; // the object this method is on, null for exported names.
boolean isEs5StylePrototypeAssignment = false; // If this is a prototype property
String propertyName = null;
if (context.getFirstChild().isGetProp()) { // e.g. `/** @export */ a.prototype.b = obj;`
Node node = context.getFirstChild(); // e.g. get `a.prototype.b`
Node ownerNode = node.getFirstChild(); // e.g. get `a.prototype`
methodOwnerName = ownerNode.getQualifiedName(); // e.g. get the string "a.prototype" // depends on control dependency: [if], data = [none]
if (ownerNode.isGetProp()
&& ownerNode.getLastChild().getString().equals(PROTOTYPE_PROPERTY)) {
// e.g. true if ownerNode is `a.prototype`
// false if this export were `/** @export */ a.b = obj;` instead
isEs5StylePrototypeAssignment = true; // depends on control dependency: [if], data = [none]
}
propertyName = node.getSecondChild().getString(); // depends on control dependency: [if], data = [none]
}
boolean useExportSymbol = true;
if (isEs5StylePrototypeAssignment) {
useExportSymbol = false; // depends on control dependency: [if], data = [none]
} else if (methodOwnerName != null && exports.containsKey(methodOwnerName)) {
useExportSymbol = false; // depends on control dependency: [if], data = [none]
}
if (useExportSymbol) {
addExportSymbolCall(export, context); // depends on control dependency: [if], data = [none]
} else {
addExportPropertyCall(methodOwnerName, context, export, propertyName); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
public static void reset() {
ScheduledExecutor ex = INSTANCE.executor.getAndSet(null);
if (ex != null && ex.getThreadPool() != null) {
ex.getThreadPool().shutdownNow();
}
} }
|
public class class_name {
public static void reset() {
ScheduledExecutor ex = INSTANCE.executor.getAndSet(null);
if (ex != null && ex.getThreadPool() != null) {
ex.getThreadPool().shutdownNow(); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
public EClass getIfcPropertyBoundedValue() {
if (ifcPropertyBoundedValueEClass == null) {
ifcPropertyBoundedValueEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(398);
}
return ifcPropertyBoundedValueEClass;
} }
|
public class class_name {
public EClass getIfcPropertyBoundedValue() {
if (ifcPropertyBoundedValueEClass == null) {
ifcPropertyBoundedValueEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(398);
// depends on control dependency: [if], data = [none]
}
return ifcPropertyBoundedValueEClass;
} }
|
public class class_name {
public void setDeprecatedProperties() {
DeprecationContext deprecations = deprecationContext.get();
Properties props = getProps();
Properties overlay = getOverlay();
for (Map.Entry<String, DeprecatedKeyInfo> entry :
deprecations.getDeprecatedKeyMap().entrySet()) {
String depKey = entry.getKey();
if (!overlay.contains(depKey)) {
for (String newKey : entry.getValue().newKeys) {
String val = overlay.getProperty(newKey);
if (val != null) {
props.setProperty(depKey, val);
overlay.setProperty(depKey, val);
break;
}
}
}
}
} }
|
public class class_name {
public void setDeprecatedProperties() {
DeprecationContext deprecations = deprecationContext.get();
Properties props = getProps();
Properties overlay = getOverlay();
for (Map.Entry<String, DeprecatedKeyInfo> entry :
deprecations.getDeprecatedKeyMap().entrySet()) {
String depKey = entry.getKey();
if (!overlay.contains(depKey)) {
for (String newKey : entry.getValue().newKeys) {
String val = overlay.getProperty(newKey);
if (val != null) {
props.setProperty(depKey, val); // depends on control dependency: [if], data = [none]
overlay.setProperty(depKey, val); // depends on control dependency: [if], data = [none]
break;
}
}
}
}
} }
|
public class class_name {
private CommandFaceDescriptor getOrCreateFaceDescriptor() {
if (!isFaceConfigured()) {
if (logger.isInfoEnabled()) {
logger.info("Lazily instantiating default face descriptor on behalf of caller to prevent npe; "
+ "command is being configured manually, right?");
}
if(ValkyrieRepository.isCurrentlyRunningInContext()) {
ValkyrieRepository.getInstance().getApplicationConfig().commandConfigurer().configure(this);
} else {
setFaceDescriptor(new CommandFaceDescriptor());
}
}
return getFaceDescriptor();
} }
|
public class class_name {
private CommandFaceDescriptor getOrCreateFaceDescriptor() {
if (!isFaceConfigured()) {
if (logger.isInfoEnabled()) {
logger.info("Lazily instantiating default face descriptor on behalf of caller to prevent npe; "
+ "command is being configured manually, right?"); // depends on control dependency: [if], data = [none]
}
if(ValkyrieRepository.isCurrentlyRunningInContext()) {
ValkyrieRepository.getInstance().getApplicationConfig().commandConfigurer().configure(this); // depends on control dependency: [if], data = [none]
} else {
setFaceDescriptor(new CommandFaceDescriptor()); // depends on control dependency: [if], data = [none]
}
}
return getFaceDescriptor();
} }
|
public class class_name {
final JsMsgMap getJmsSystemPropertyMap() {
if (jmsSystemPropertyMap == null) {
List<String> keys = (List<String>) getApi().getField(JsApiAccess.SYSTEMPROPERTY_NAME);
List<Object> values = (List<Object>) getApi().getField(JsApiAccess.SYSTEMPROPERTY_VALUE);
jmsSystemPropertyMap = new JsMsgMap(keys, values);
}
return jmsSystemPropertyMap;
} }
|
public class class_name {
final JsMsgMap getJmsSystemPropertyMap() {
if (jmsSystemPropertyMap == null) {
List<String> keys = (List<String>) getApi().getField(JsApiAccess.SYSTEMPROPERTY_NAME);
List<Object> values = (List<Object>) getApi().getField(JsApiAccess.SYSTEMPROPERTY_VALUE);
jmsSystemPropertyMap = new JsMsgMap(keys, values); // depends on control dependency: [if], data = [none]
}
return jmsSystemPropertyMap;
} }
|
public class class_name {
public com.google.protobuf.ByteString
getSummaryBytes() {
java.lang.Object ref = summary_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
summary_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
} }
|
public class class_name {
public com.google.protobuf.ByteString
getSummaryBytes() {
java.lang.Object ref = summary_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
summary_ = b; // depends on control dependency: [if], data = [none]
return b; // depends on control dependency: [if], data = [none]
} else {
return (com.google.protobuf.ByteString) ref; // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
public Object repushContextClassLoaderForUnprivileged(Object origLoader, ClassLoader loader) {
if (origLoader == UNCHANGED) {
return pushContextClassLoaderForUnprivileged(loader);
}
setContextClassLoaderForUnprivileged(Thread.currentThread(), loader);
return origLoader;
} }
|
public class class_name {
public Object repushContextClassLoaderForUnprivileged(Object origLoader, ClassLoader loader) {
if (origLoader == UNCHANGED) {
return pushContextClassLoaderForUnprivileged(loader); // depends on control dependency: [if], data = [none]
}
setContextClassLoaderForUnprivileged(Thread.currentThread(), loader);
return origLoader;
} }
|
public class class_name {
private void clearParentsCache(Entity entity) {
try {
String xpath = null;
if (entity instanceof DataSource) {
// find all reports and charts with this DataSource
xpath = "//nextServer//*[@dataSource='" + entity.getId() + "']";
} else if (entity instanceof Report) {
// find all schedulers with this report
xpath = "//nextServer/scheduler/*[@report='" + entity.getId() + "']";
}
if (xpath != null) {
NodeIterator nodes = getTemplate().query(xpath).getNodes();
while (nodes.hasNext()) {
entitiesCache.remove(nodes.nextNode().getIdentifier());
}
}
// if entity is inside a drill down we have to clear the master
// report (with drillDown list)
// first parent is 'drillDownEntities' node; second parent is the
// actual report/chart
if ((entity instanceof Report) || (entity instanceof Chart)) {
xpath = " //nextServer//drillDownEntities/*[@entity='" + entity.getId() + "']";
if (xpath != null) {
NodeIterator nodes = getTemplate().query(xpath).getNodes();
while (nodes.hasNext()) {
entitiesCache.remove(nodes.nextNode().getParent().getParent().getIdentifier());
}
}
}
} catch (RepositoryException e) {
throw convertJcrAccessException(e);
}
} }
|
public class class_name {
private void clearParentsCache(Entity entity) {
try {
String xpath = null;
if (entity instanceof DataSource) {
// find all reports and charts with this DataSource
xpath = "//nextServer//*[@dataSource='" + entity.getId() + "']";
} else if (entity instanceof Report) {
// find all schedulers with this report
xpath = "//nextServer/scheduler/*[@report='" + entity.getId() + "']";
}
if (xpath != null) {
NodeIterator nodes = getTemplate().query(xpath).getNodes();
while (nodes.hasNext()) {
entitiesCache.remove(nodes.nextNode().getIdentifier()); // depends on control dependency: [while], data = [none]
}
}
// if entity is inside a drill down we have to clear the master
// report (with drillDown list)
// first parent is 'drillDownEntities' node; second parent is the
// actual report/chart
if ((entity instanceof Report) || (entity instanceof Chart)) {
xpath = " //nextServer//drillDownEntities/*[@entity='" + entity.getId() + "']";
if (xpath != null) {
NodeIterator nodes = getTemplate().query(xpath).getNodes();
while (nodes.hasNext()) {
entitiesCache.remove(nodes.nextNode().getParent().getParent().getIdentifier()); // depends on control dependency: [while], data = [none]
}
}
}
} catch (RepositoryException e) {
throw convertJcrAccessException(e);
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
protected final String getForPrint(final Class<?> pClass) {
if (pClass == PayMd.class) {
return null;
}
if (pClass == ServiceSpecifics.class || pClass == GoodsSpecifics.class) {
return PrcItemSpecificsRetrieve.class.getSimpleName();
}
return PrcEntityRetrieve.class.getSimpleName();
} }
|
public class class_name {
protected final String getForPrint(final Class<?> pClass) {
if (pClass == PayMd.class) {
return null; // depends on control dependency: [if], data = [none]
}
if (pClass == ServiceSpecifics.class || pClass == GoodsSpecifics.class) {
return PrcItemSpecificsRetrieve.class.getSimpleName(); // depends on control dependency: [if], data = [none]
}
return PrcEntityRetrieve.class.getSimpleName();
} }
|
public class class_name {
public Element discardByKey(Object key)
{
int i = findIndexByKey(key);
Element element = null;
if (i != -1) {
element = (Element) get(i);
if (element.pinned > 0) {
return null;
}
remove(i);
}
return element;
} }
|
public class class_name {
public Element discardByKey(Object key)
{
int i = findIndexByKey(key);
Element element = null;
if (i != -1) {
element = (Element) get(i); // depends on control dependency: [if], data = [(i]
if (element.pinned > 0) {
return null; // depends on control dependency: [if], data = [none]
}
remove(i); // depends on control dependency: [if], data = [(i]
}
return element;
} }
|
public class class_name {
public synchronized Properties determineIfCSIv2SettingsApply(Properties config, Map<String, Object> connectionInfo) throws SSLException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "determineIfCSIv2SettingsApply", new Object[] { connectionInfo });
Properties newConfig = null;
if (connectionInfo != null) {
String endPointName = (String) connectionInfo.get(Constants.CONNECTION_INFO_ENDPOINT_NAME);
String direction = (String) connectionInfo.get(Constants.CONNECTION_INFO_DIRECTION);
if (endPointName != null
&& (endPointName.equals(Constants.ENDPOINT_ORB_SSL_LISTENER_ADDRESS) || endPointName.equals(Constants.ENDPOINT_CSIV2_SERVERAUTH)
|| endPointName.equals(Constants.ENDPOINT_CSIV2_MUTUALAUTH))
&& direction != null && direction.equals(Constants.DIRECTION_INBOUND)) {
String sslAlias = globalConfigProperties.getProperty("com.ibm.ssl.csi.inbound.alias");
if (sslAlias != null && sslAlias.length() > 0) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Getting inbound SSL config with alias: " + sslAlias);
newConfig = getProperties(sslAlias);
}
if (newConfig != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning CSIv2 alias reference configuration.");
newConfig = (Properties) newConfig.clone();
} else {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning JSSEHelper configuration.");
newConfig = (Properties) config.clone();
}
if (newConfig != null) {
String claimSSLClientAuthSupported = globalConfigProperties.getProperty("com.ibm.CSI.claimTLClientAuthenticationSupported");
String claimSSLClientAuthRequired = globalConfigProperties.getProperty("com.ibm.CSI.claimTLClientAuthenticationRequired");
if (claimSSLClientAuthSupported != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Setting client auth supported: " + claimSSLClientAuthSupported);
newConfig.setProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION_SUPPORTED, claimSSLClientAuthSupported);
}
if (claimSSLClientAuthRequired != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Setting client auth required: " + claimSSLClientAuthRequired);
newConfig.setProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION, claimSSLClientAuthRequired);
}
/***
* UNCOMMENT IF INTEGRITY/CONFIDENTIALITY APPLY FROM CSIV2 CONFIG
* String claimSSLIntegritySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegritySupported"); String
* claimSSLConfidentialitySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialitySupported");
*
* boolean integrity = false; boolean confidentiality = false; if
* (claimSSLIntegritySupported != null &&
* claimSSLIntegritySupported.equals(Constants.TRUE)) integrity =
* true; if (claimSSLConfidentialitySupported != null &&
* claimSSLConfidentialitySupported.equals(Constants.TRUE))
* confidentiality = true;
*
* String claimSSLIntegrityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegrityRequired"); String
* claimSSLConfidentialityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialityRequired");
*
* if (claimSSLIntegrityRequired != null &&
* claimSSLIntegrityRequired.equals(Constants.TRUE)) integrity = true;
* if (claimSSLConfidentialityRequired != null &&
* claimSSLConfidentialityRequired.equals(Constants.TRUE))
* confidentiality = true;
*
* String securityLevel = Constants.SECURITY_LEVEL_HIGH; if (integrity
* && confidentiality) securityLevel = Constants.SECURITY_LEVEL_HIGH;
* else if (integrity || confidentiality) securityLevel =
* Constants.SECURITY_LEVEL_MEDIUM; else securityLevel =
* Constants.SECURITY_LEVEL_LOW;
*
* if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
* Tr.debug(tc,"Setting security level: " + securityLevel);
* newConfig.setProperty(Constants.SSLPROP_SECURITY_LEVEL,
* securityLevel);
***/
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.exit(tc, "determineIfCSIv2SettingsApply (settings applied)");
return newConfig;
}
} else if (Constants.ENDPOINT_IIOP.equals(endPointName) && Constants.DIRECTION_OUTBOUND.equals(direction)) {
String sslAlias = globalConfigProperties.getProperty("com.ibm.ssl.csi.outbound.alias");
if (sslAlias != null && sslAlias.length() > 0) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Getting outbound SSL config with alias: " + sslAlias);
newConfig = getProperties(sslAlias);
}
if (newConfig != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning CSIv2 alias reference configuration.");
newConfig = (Properties) newConfig.clone();
} else {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning JSSEHelper configuration.");
newConfig = (Properties) config.clone();
}
if (newConfig != null) {
/***
* UNCOMMENT IF INTEGRITY/CONFIDENTIALITY APPLY FROM CSIV2 CONFIG
* String claimSSLIntegritySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegritySupported"); String
* claimSSLConfidentialitySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialitySupported");
*
* boolean integrity = false; boolean confidentiality = false; if
* (claimSSLIntegritySupported != null &&
* claimSSLIntegritySupported.equals(Constants.TRUE)) integrity =
* true; if (claimSSLConfidentialitySupported != null &&
* claimSSLConfidentialitySupported.equals(Constants.TRUE))
* confidentiality = true;
*
* String claimSSLIntegrityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegrityRequired"); String
* claimSSLConfidentialityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialityRequired");
*
* if (claimSSLIntegrityRequired != null &&
* claimSSLIntegrityRequired.equals(Constants.TRUE)) integrity = true;
* if (claimSSLConfidentialityRequired != null &&
* claimSSLConfidentialityRequired.equals(Constants.TRUE))
* confidentiality = true;
*
* String securityLevel = Constants.SECURITY_LEVEL_HIGH; if (integrity
* && confidentiality) securityLevel = Constants.SECURITY_LEVEL_HIGH;
* else if (integrity || confidentiality) securityLevel =
* Constants.SECURITY_LEVEL_MEDIUM; else securityLevel =
* Constants.SECURITY_LEVEL_LOW;
*
* if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
* Tr.debug(tc,"Setting security level: " + securityLevel);
* newConfig.setProperty(Constants.SSLPROP_SECURITY_LEVEL,
* securityLevel);
***/
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.exit(tc, "determineIfCSIv2SettingsApply (settings applied)");
return newConfig;
}
}
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.exit(tc, "determineIfCSIv2SettingsApply (original settings)");
return config;
} }
|
public class class_name {
public synchronized Properties determineIfCSIv2SettingsApply(Properties config, Map<String, Object> connectionInfo) throws SSLException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "determineIfCSIv2SettingsApply", new Object[] { connectionInfo });
Properties newConfig = null;
if (connectionInfo != null) {
String endPointName = (String) connectionInfo.get(Constants.CONNECTION_INFO_ENDPOINT_NAME);
String direction = (String) connectionInfo.get(Constants.CONNECTION_INFO_DIRECTION);
if (endPointName != null
&& (endPointName.equals(Constants.ENDPOINT_ORB_SSL_LISTENER_ADDRESS) || endPointName.equals(Constants.ENDPOINT_CSIV2_SERVERAUTH)
|| endPointName.equals(Constants.ENDPOINT_CSIV2_MUTUALAUTH))
&& direction != null && direction.equals(Constants.DIRECTION_INBOUND)) {
String sslAlias = globalConfigProperties.getProperty("com.ibm.ssl.csi.inbound.alias");
if (sslAlias != null && sslAlias.length() > 0) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Getting inbound SSL config with alias: " + sslAlias);
newConfig = getProperties(sslAlias); // depends on control dependency: [if], data = [(sslAlias]
}
if (newConfig != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning CSIv2 alias reference configuration.");
newConfig = (Properties) newConfig.clone(); // depends on control dependency: [if], data = [none]
} else {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning JSSEHelper configuration.");
newConfig = (Properties) config.clone(); // depends on control dependency: [if], data = [none]
}
if (newConfig != null) {
String claimSSLClientAuthSupported = globalConfigProperties.getProperty("com.ibm.CSI.claimTLClientAuthenticationSupported");
String claimSSLClientAuthRequired = globalConfigProperties.getProperty("com.ibm.CSI.claimTLClientAuthenticationRequired");
if (claimSSLClientAuthSupported != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Setting client auth supported: " + claimSSLClientAuthSupported);
newConfig.setProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION_SUPPORTED, claimSSLClientAuthSupported); // depends on control dependency: [if], data = [none]
}
if (claimSSLClientAuthRequired != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Setting client auth required: " + claimSSLClientAuthRequired);
newConfig.setProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION, claimSSLClientAuthRequired); // depends on control dependency: [if], data = [none]
}
/***
* UNCOMMENT IF INTEGRITY/CONFIDENTIALITY APPLY FROM CSIV2 CONFIG
* String claimSSLIntegritySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegritySupported"); String
* claimSSLConfidentialitySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialitySupported");
*
* boolean integrity = false; boolean confidentiality = false; if
* (claimSSLIntegritySupported != null &&
* claimSSLIntegritySupported.equals(Constants.TRUE)) integrity =
* true; if (claimSSLConfidentialitySupported != null &&
* claimSSLConfidentialitySupported.equals(Constants.TRUE))
* confidentiality = true;
*
* String claimSSLIntegrityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegrityRequired"); String
* claimSSLConfidentialityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialityRequired");
*
* if (claimSSLIntegrityRequired != null &&
* claimSSLIntegrityRequired.equals(Constants.TRUE)) integrity = true;
* if (claimSSLConfidentialityRequired != null &&
* claimSSLConfidentialityRequired.equals(Constants.TRUE))
* confidentiality = true;
*
* String securityLevel = Constants.SECURITY_LEVEL_HIGH; if (integrity
* && confidentiality) securityLevel = Constants.SECURITY_LEVEL_HIGH;
* else if (integrity || confidentiality) securityLevel =
* Constants.SECURITY_LEVEL_MEDIUM; else securityLevel =
* Constants.SECURITY_LEVEL_LOW;
*
* if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
* Tr.debug(tc,"Setting security level: " + securityLevel);
* newConfig.setProperty(Constants.SSLPROP_SECURITY_LEVEL,
* securityLevel);
***/
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.exit(tc, "determineIfCSIv2SettingsApply (settings applied)");
return newConfig; // depends on control dependency: [if], data = [none]
}
} else if (Constants.ENDPOINT_IIOP.equals(endPointName) && Constants.DIRECTION_OUTBOUND.equals(direction)) {
String sslAlias = globalConfigProperties.getProperty("com.ibm.ssl.csi.outbound.alias");
if (sslAlias != null && sslAlias.length() > 0) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Getting outbound SSL config with alias: " + sslAlias);
newConfig = getProperties(sslAlias); // depends on control dependency: [if], data = [(sslAlias]
}
if (newConfig != null) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning CSIv2 alias reference configuration.");
newConfig = (Properties) newConfig.clone(); // depends on control dependency: [if], data = [none]
} else {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "Cloning JSSEHelper configuration.");
newConfig = (Properties) config.clone(); // depends on control dependency: [if], data = [none]
}
if (newConfig != null) {
/***
* UNCOMMENT IF INTEGRITY/CONFIDENTIALITY APPLY FROM CSIV2 CONFIG
* String claimSSLIntegritySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegritySupported"); String
* claimSSLConfidentialitySupported =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialitySupported");
*
* boolean integrity = false; boolean confidentiality = false; if
* (claimSSLIntegritySupported != null &&
* claimSSLIntegritySupported.equals(Constants.TRUE)) integrity =
* true; if (claimSSLConfidentialitySupported != null &&
* claimSSLConfidentialitySupported.equals(Constants.TRUE))
* confidentiality = true;
*
* String claimSSLIntegrityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageIntegrityRequired"); String
* claimSSLConfidentialityRequired =
* globalConfigProperties.getProperty
* ("com.ibm.CSI.claimMessageConfidentialityRequired");
*
* if (claimSSLIntegrityRequired != null &&
* claimSSLIntegrityRequired.equals(Constants.TRUE)) integrity = true;
* if (claimSSLConfidentialityRequired != null &&
* claimSSLConfidentialityRequired.equals(Constants.TRUE))
* confidentiality = true;
*
* String securityLevel = Constants.SECURITY_LEVEL_HIGH; if (integrity
* && confidentiality) securityLevel = Constants.SECURITY_LEVEL_HIGH;
* else if (integrity || confidentiality) securityLevel =
* Constants.SECURITY_LEVEL_MEDIUM; else securityLevel =
* Constants.SECURITY_LEVEL_LOW;
*
* if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
* Tr.debug(tc,"Setting security level: " + securityLevel);
* newConfig.setProperty(Constants.SSLPROP_SECURITY_LEVEL,
* securityLevel);
***/
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.exit(tc, "determineIfCSIv2SettingsApply (settings applied)");
return newConfig; // depends on control dependency: [if], data = [none]
}
}
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.exit(tc, "determineIfCSIv2SettingsApply (original settings)");
return config;
} }
|
public class class_name {
public void marshall(DeleteVirtualServiceRequest deleteVirtualServiceRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteVirtualServiceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deleteVirtualServiceRequest.getMeshName(), MESHNAME_BINDING);
protocolMarshaller.marshall(deleteVirtualServiceRequest.getVirtualServiceName(), VIRTUALSERVICENAME_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
} }
|
public class class_name {
public void marshall(DeleteVirtualServiceRequest deleteVirtualServiceRequest, ProtocolMarshaller protocolMarshaller) {
if (deleteVirtualServiceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(deleteVirtualServiceRequest.getMeshName(), MESHNAME_BINDING); // depends on control dependency: [try], data = [none]
protocolMarshaller.marshall(deleteVirtualServiceRequest.getVirtualServiceName(), VIRTUALSERVICENAME_BINDING); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
protected String htmlTitle() {
boolean showTitle = isShowTitle();
Iterator<I_CmsListAction> itIndepActions = getMetadata().getIndependentActions().iterator();
while (!showTitle && itIndepActions.hasNext()) {
I_CmsListAction indepAction = itIndepActions.next();
showTitle = showTitle || indepAction.isVisible();
}
Iterator<CmsListItemDetails> itItemDetails = getMetadata().getItemDetailDefinitions().iterator();
while (!showTitle && itItemDetails.hasNext()) {
CmsListItemDetails itemDetail = itItemDetails.next();
showTitle = showTitle || itemDetail.getAction().isVisible();
}
if (!showTitle) {
// prevent empty table if there is nothing to display
return "";
}
StringBuffer html = new StringBuffer(512);
CmsMessages messages = Messages.get().getBundle(getWp().getLocale());
html.append("<table width='100%' cellspacing='0'>");
html.append("\t<tr>\n");
if (isShowTitle()) {
html.append("\t\t<td align='left'>\n");
html.append("\t\t\t");
boolean isNotSearching = true;
if (getMetadata().isSearchable()) {
isNotSearching = CmsStringUtil.isEmptyOrWhitespaceOnly(m_searchFilter);
}
if (getTotalNumberOfPages() > 1) {
if (isNotSearching) {
html.append(messages.key(
Messages.GUI_LIST_TITLE_TEXT_4,
new Object[] {
m_name.key(getWp().getLocale()),
new Integer(displayedFrom()),
new Integer(displayedTo()),
new Integer(getTotalSize())}));
} else {
html.append(messages.key(
Messages.GUI_LIST_TITLE_FILTERED_TEXT_5,
new Object[] {
m_name.key(getWp().getLocale()),
new Integer(displayedFrom()),
new Integer(displayedTo()),
new Integer(getSize()),
new Integer(getTotalSize())}));
}
} else {
if (isNotSearching) {
html.append(messages.key(
Messages.GUI_LIST_SINGLE_TITLE_TEXT_2,
new Object[] {m_name.key(getWp().getLocale()), new Integer(getTotalSize())}));
} else {
html.append(messages.key(
Messages.GUI_LIST_SINGLE_TITLE_FILTERED_TEXT_3,
new Object[] {
m_name.key(getWp().getLocale()),
new Integer(getSize()),
new Integer(getTotalSize())}));
}
}
html.append("\n");
html.append("\t\t</td>\n\t\t");
}
html.append(getMetadata().htmlActionBar());
html.append("\n\t</tr>\n");
html.append("</table>\n");
return html.toString();
} }
|
public class class_name {
protected String htmlTitle() {
boolean showTitle = isShowTitle();
Iterator<I_CmsListAction> itIndepActions = getMetadata().getIndependentActions().iterator();
while (!showTitle && itIndepActions.hasNext()) {
I_CmsListAction indepAction = itIndepActions.next();
showTitle = showTitle || indepAction.isVisible(); // depends on control dependency: [while], data = [none]
}
Iterator<CmsListItemDetails> itItemDetails = getMetadata().getItemDetailDefinitions().iterator();
while (!showTitle && itItemDetails.hasNext()) {
CmsListItemDetails itemDetail = itItemDetails.next();
showTitle = showTitle || itemDetail.getAction().isVisible(); // depends on control dependency: [while], data = [none]
}
if (!showTitle) {
// prevent empty table if there is nothing to display
return ""; // depends on control dependency: [if], data = [none]
}
StringBuffer html = new StringBuffer(512);
CmsMessages messages = Messages.get().getBundle(getWp().getLocale());
html.append("<table width='100%' cellspacing='0'>");
html.append("\t<tr>\n");
if (isShowTitle()) {
html.append("\t\t<td align='left'>\n"); // depends on control dependency: [if], data = [none]
html.append("\t\t\t"); // depends on control dependency: [if], data = [none]
boolean isNotSearching = true;
if (getMetadata().isSearchable()) {
isNotSearching = CmsStringUtil.isEmptyOrWhitespaceOnly(m_searchFilter); // depends on control dependency: [if], data = [none]
}
if (getTotalNumberOfPages() > 1) {
if (isNotSearching) {
html.append(messages.key(
Messages.GUI_LIST_TITLE_TEXT_4,
new Object[] {
m_name.key(getWp().getLocale()),
new Integer(displayedFrom()),
new Integer(displayedTo()),
new Integer(getTotalSize())})); // depends on control dependency: [if], data = [none]
} else {
html.append(messages.key(
Messages.GUI_LIST_TITLE_FILTERED_TEXT_5,
new Object[] {
m_name.key(getWp().getLocale()),
new Integer(displayedFrom()),
new Integer(displayedTo()),
new Integer(getSize()),
new Integer(getTotalSize())})); // depends on control dependency: [if], data = [none]
}
} else {
if (isNotSearching) {
html.append(messages.key(
Messages.GUI_LIST_SINGLE_TITLE_TEXT_2,
new Object[] {m_name.key(getWp().getLocale()), new Integer(getTotalSize())})); // depends on control dependency: [if], data = [none]
} else {
html.append(messages.key(
Messages.GUI_LIST_SINGLE_TITLE_FILTERED_TEXT_3,
new Object[] {
m_name.key(getWp().getLocale()),
new Integer(getSize()),
new Integer(getTotalSize())})); // depends on control dependency: [if], data = [none]
}
}
html.append("\n"); // depends on control dependency: [if], data = [none]
html.append("\t\t</td>\n\t\t"); // depends on control dependency: [if], data = [none]
}
html.append(getMetadata().htmlActionBar());
html.append("\n\t</tr>\n");
html.append("</table>\n");
return html.toString();
} }
|
public class class_name {
public Long indexOf(File f, byte[] searchBytes, long fromPosition) {
final List<Long> result;
if (USE_NIO) {
result = searchPartiallyUsingNIO(f, searchBytes, fromPosition, -1, new BinFileProgressListener() {
@Override
public void onProgress(List<Long> pointerList, float progress, float currentPosition, float startPosition, long maxSizeToRead) {
if (bigFileProgressListener != null) {
bigFileProgressListener.onProgress(pointerList, progress, currentPosition, startPosition, maxSizeToRead);
}
if (pointerList.size() > 0) {
BinFileSearcher.this.stop();
}
}
});
} else {
result = searchPartiallyUsingLegacy(f, searchBytes, fromPosition, -1, new BinFileProgressListener() {
@Override
public void onProgress(List<Long> pointerList, float progress, float currentPosition, float startPosition, long maxSizeToRead) {
if (bigFileProgressListener != null) {
bigFileProgressListener.onProgress(pointerList, progress, currentPosition, startPosition, maxSizeToRead);
}
if (pointerList.size() > 0) {
BinFileSearcher.this.stop();
}
}
});
}
if (result.size() > 0) {
return result.get(0);
} else {
return -1L;
}
} }
|
public class class_name {
public Long indexOf(File f, byte[] searchBytes, long fromPosition) {
final List<Long> result;
if (USE_NIO) {
result = searchPartiallyUsingNIO(f, searchBytes, fromPosition, -1, new BinFileProgressListener() {
@Override
public void onProgress(List<Long> pointerList, float progress, float currentPosition, float startPosition, long maxSizeToRead) {
if (bigFileProgressListener != null) {
bigFileProgressListener.onProgress(pointerList, progress, currentPosition, startPosition, maxSizeToRead); // depends on control dependency: [if], data = [none]
}
if (pointerList.size() > 0) {
BinFileSearcher.this.stop(); // depends on control dependency: [if], data = [none]
}
}
}); // depends on control dependency: [if], data = [none]
} else {
result = searchPartiallyUsingLegacy(f, searchBytes, fromPosition, -1, new BinFileProgressListener() {
@Override
public void onProgress(List<Long> pointerList, float progress, float currentPosition, float startPosition, long maxSizeToRead) {
if (bigFileProgressListener != null) {
bigFileProgressListener.onProgress(pointerList, progress, currentPosition, startPosition, maxSizeToRead); // depends on control dependency: [if], data = [none]
}
if (pointerList.size() > 0) {
BinFileSearcher.this.stop(); // depends on control dependency: [if], data = [none]
}
}
}); // depends on control dependency: [if], data = [none]
}
if (result.size() > 0) {
return result.get(0); // depends on control dependency: [if], data = [0)]
} else {
return -1L; // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
public static void tag(Object key, Object value)
{
Thread currentThread = Thread.currentThread();
if (currentThread instanceof TaggableThread)
{
TaggableThread taggableThread = (TaggableThread) currentThread;
taggableThread.tagMe(key, value);
}
} }
|
public class class_name {
public static void tag(Object key, Object value)
{
Thread currentThread = Thread.currentThread();
if (currentThread instanceof TaggableThread)
{
TaggableThread taggableThread = (TaggableThread) currentThread;
taggableThread.tagMe(key, value);
// depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
private void sawSwitch(int pc) {
int[] offsets = getSwitchOffsets();
List<Integer> targets = new ArrayList<>(offsets.length);
for (int offset : offsets) {
targets.add(Integer.valueOf(offset + pc));
}
Integer defOffset = Integer.valueOf(getDefaultSwitchOffset() + pc);
if (!targets.contains(defOffset)) {
targets.add(defOffset);
}
Collections.sort(targets);
Integer lastTarget = targets.get(0);
for (int i = 1; i < targets.size(); i++) {
Integer nextTarget = targets.get(i);
ScopeBlock sb = new ScopeBlock(lastTarget.intValue(), nextTarget.intValue());
sb.setCase();
rootScopeBlock.addChild(sb);
lastTarget = nextTarget;
}
for (Integer target : targets) {
switchTargets.set(target.intValue());
}
} }
|
public class class_name {
private void sawSwitch(int pc) {
int[] offsets = getSwitchOffsets();
List<Integer> targets = new ArrayList<>(offsets.length);
for (int offset : offsets) {
targets.add(Integer.valueOf(offset + pc)); // depends on control dependency: [for], data = [offset]
}
Integer defOffset = Integer.valueOf(getDefaultSwitchOffset() + pc);
if (!targets.contains(defOffset)) {
targets.add(defOffset); // depends on control dependency: [if], data = [none]
}
Collections.sort(targets);
Integer lastTarget = targets.get(0);
for (int i = 1; i < targets.size(); i++) {
Integer nextTarget = targets.get(i);
ScopeBlock sb = new ScopeBlock(lastTarget.intValue(), nextTarget.intValue());
sb.setCase(); // depends on control dependency: [for], data = [none]
rootScopeBlock.addChild(sb); // depends on control dependency: [for], data = [none]
lastTarget = nextTarget; // depends on control dependency: [for], data = [none]
}
for (Integer target : targets) {
switchTargets.set(target.intValue()); // depends on control dependency: [for], data = [target]
}
} }
|
public class class_name {
public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// if we're not in byDigits mode, we can just use the inherited
// doParse()
if (!byDigits) {
return super.doParse(text, parsePosition, baseValue, 0, lenientParse);
}
else {
// if we ARE in byDigits mode, parse the text one digit at a time
// using this substitution's owning rule set (we do this by setting
// upperBound to 10 when calling doParse() ) until we reach
// nonmatching text
String workText = text;
ParsePosition workPos = new ParsePosition(1);
double result;
int digit;
DigitList dl = new DigitList();
while (workText.length() > 0 && workPos.getIndex() != 0) {
workPos.setIndex(0);
digit = ruleSet.parse(workText, workPos, 10).intValue();
if (lenientParse && workPos.getIndex() == 0) {
Number n = ruleSet.owner.getDecimalFormat().parse(workText, workPos);
if (n != null) {
digit = n.intValue();
}
}
if (workPos.getIndex() != 0) {
dl.append('0'+digit);
parsePosition.setIndex(parsePosition.getIndex() + workPos.getIndex());
workText = workText.substring(workPos.getIndex());
while (workText.length() > 0 && workText.charAt(0) == ' ') {
workText = workText.substring(1);
parsePosition.setIndex(parsePosition.getIndex() + 1);
}
}
}
result = dl.count == 0 ? 0 : dl.getDouble();
result = composeRuleValue(result, baseValue);
return new Double(result);
}
} }
|
public class class_name {
public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// if we're not in byDigits mode, we can just use the inherited
// doParse()
if (!byDigits) {
return super.doParse(text, parsePosition, baseValue, 0, lenientParse); // depends on control dependency: [if], data = [none]
}
else {
// if we ARE in byDigits mode, parse the text one digit at a time
// using this substitution's owning rule set (we do this by setting
// upperBound to 10 when calling doParse() ) until we reach
// nonmatching text
String workText = text;
ParsePosition workPos = new ParsePosition(1);
double result;
int digit;
DigitList dl = new DigitList();
while (workText.length() > 0 && workPos.getIndex() != 0) {
workPos.setIndex(0); // depends on control dependency: [while], data = [0)]
digit = ruleSet.parse(workText, workPos, 10).intValue(); // depends on control dependency: [while], data = [0)]
if (lenientParse && workPos.getIndex() == 0) {
Number n = ruleSet.owner.getDecimalFormat().parse(workText, workPos);
if (n != null) {
digit = n.intValue(); // depends on control dependency: [if], data = [none]
}
}
if (workPos.getIndex() != 0) {
dl.append('0'+digit); // depends on control dependency: [if], data = [none]
parsePosition.setIndex(parsePosition.getIndex() + workPos.getIndex()); // depends on control dependency: [if], data = [none]
workText = workText.substring(workPos.getIndex()); // depends on control dependency: [if], data = [(workPos.getIndex()]
while (workText.length() > 0 && workText.charAt(0) == ' ') {
workText = workText.substring(1); // depends on control dependency: [while], data = [none]
parsePosition.setIndex(parsePosition.getIndex() + 1); // depends on control dependency: [while], data = [none]
}
}
}
result = dl.count == 0 ? 0 : dl.getDouble(); // depends on control dependency: [if], data = [none]
result = composeRuleValue(result, baseValue); // depends on control dependency: [if], data = [none]
return new Double(result); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getTableTest());
jScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
}
return jScrollPane;
} }
|
public class class_name {
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
// depends on control dependency: [if], data = [none]
jScrollPane.setViewportView(getTableTest());
// depends on control dependency: [if], data = [none]
jScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
// depends on control dependency: [if], data = [none]
}
return jScrollPane;
} }
|
public class class_name {
@Override
public final synchronized void removePropertyChangeListener(
String propertyName,
PropertyChangeListener listener) {
if (listener == null || changeSupport == null) {
return;
}
changeSupport.removePropertyChangeListener(propertyName, listener);
} }
|
public class class_name {
@Override
public final synchronized void removePropertyChangeListener(
String propertyName,
PropertyChangeListener listener) {
if (listener == null || changeSupport == null) {
return; // depends on control dependency: [if], data = [none]
}
changeSupport.removePropertyChangeListener(propertyName, listener);
} }
|
public class class_name {
private List<List<String>> processAcceptLanguage(String acceptLanguage) {
StringTokenizer languageTokenizer = new StringTokenizer(acceptLanguage, ",");
TreeMap<Double, List<String>> map = new TreeMap<Double, List<String>>(Collections.reverseOrder());
List<String> list;
while (languageTokenizer.hasMoreTokens()) {
String language = languageTokenizer.nextToken().trim();
if (language.length() == 0) {
continue;
}
int semicolonIndex = language.indexOf(';');
Double qValue = Double.valueOf(1);
if (semicolonIndex > -1) {
int qIndex = language.indexOf("q=");
String qValueStr = language.substring(qIndex + 2);
try {
qValue = Double.valueOf(qValueStr.trim());
} catch (NumberFormatException nfe) {
FFDCFilter.processException(nfe,
"EncodingUtils.processAcceptLanguage", "215");
}
language = language.substring(0, semicolonIndex);
}
if (language.length() > 0) {
if ((qValue.doubleValue() > 0) && (language.charAt(0) != '*')) {
list = map.get(qValue);
if (null == list) {
list = new ArrayList<String>(1);
}
list.add(language);
map.put(qValue, list);
}
}
}
List<List<String>> rc = null;
if (!map.isEmpty()) {
rc = new ArrayList<List<String>>(map.values());
}
return rc;
} }
|
public class class_name {
private List<List<String>> processAcceptLanguage(String acceptLanguage) {
StringTokenizer languageTokenizer = new StringTokenizer(acceptLanguage, ",");
TreeMap<Double, List<String>> map = new TreeMap<Double, List<String>>(Collections.reverseOrder());
List<String> list;
while (languageTokenizer.hasMoreTokens()) {
String language = languageTokenizer.nextToken().trim();
if (language.length() == 0) {
continue;
}
int semicolonIndex = language.indexOf(';');
Double qValue = Double.valueOf(1);
if (semicolonIndex > -1) {
int qIndex = language.indexOf("q=");
String qValueStr = language.substring(qIndex + 2);
try {
qValue = Double.valueOf(qValueStr.trim()); // depends on control dependency: [try], data = [none]
} catch (NumberFormatException nfe) {
FFDCFilter.processException(nfe,
"EncodingUtils.processAcceptLanguage", "215");
} // depends on control dependency: [catch], data = [none]
language = language.substring(0, semicolonIndex); // depends on control dependency: [if], data = [none]
}
if (language.length() > 0) {
if ((qValue.doubleValue() > 0) && (language.charAt(0) != '*')) {
list = map.get(qValue); // depends on control dependency: [if], data = [none]
if (null == list) {
list = new ArrayList<String>(1); // depends on control dependency: [if], data = [none]
}
list.add(language); // depends on control dependency: [if], data = [none]
map.put(qValue, list); // depends on control dependency: [if], data = [none]
}
}
}
List<List<String>> rc = null;
if (!map.isEmpty()) {
rc = new ArrayList<List<String>>(map.values()); // depends on control dependency: [if], data = [none]
}
return rc;
} }
|
public class class_name {
public void initTransfer(Properties properties)
{
super.initTransfer(properties);
String strPathname = properties.getProperty(ZIPOUT_PATHNAME_PARAM);
if ((strPathname != null)
&& (strPathname.length() > 0)
&& (strPathname.lastIndexOf(System.getProperties().getProperty("file.separator")) == strPathname.length() - 1)
&& (strPathname.lastIndexOf('/') == strPathname.length() - 1))
strPathname += System.getProperties().getProperty("file.separator");
m_strZipFilename = properties.getProperty(ZIPOUT_FILENAME_PARAM);
if ((m_strZipFilename == null)
|| (m_strZipFilename.length() == 0)
|| (m_strZipFilename.equals("[automatic]")))
m_strZipFilename = this.getBackupFilename();
if (strPathname != null)
m_strZipFilename = strPathname + m_strZipFilename;
String strMaxSize = properties.getProperty(MAX_SIZE_PARAM);
m_lMaxZipFileSize = 0;
try {
if (strMaxSize != null)
m_lMaxZipFileSize = Long.parseLong(strMaxSize);
} catch (NumberFormatException ex) {
m_lMaxZipFileSize = 0;
}
m_lCurrentLength = 0;
m_iFileNumber = 0;
try {
FileOutputStream outStream = new FileOutputStream(m_strZipFilename);
m_outZip = new ZipOutputStream(outStream);
} catch (IOException ex) {
ex.printStackTrace();
}
} }
|
public class class_name {
public void initTransfer(Properties properties)
{
super.initTransfer(properties);
String strPathname = properties.getProperty(ZIPOUT_PATHNAME_PARAM);
if ((strPathname != null)
&& (strPathname.length() > 0)
&& (strPathname.lastIndexOf(System.getProperties().getProperty("file.separator")) == strPathname.length() - 1)
&& (strPathname.lastIndexOf('/') == strPathname.length() - 1))
strPathname += System.getProperties().getProperty("file.separator");
m_strZipFilename = properties.getProperty(ZIPOUT_FILENAME_PARAM);
if ((m_strZipFilename == null)
|| (m_strZipFilename.length() == 0)
|| (m_strZipFilename.equals("[automatic]")))
m_strZipFilename = this.getBackupFilename();
if (strPathname != null)
m_strZipFilename = strPathname + m_strZipFilename;
String strMaxSize = properties.getProperty(MAX_SIZE_PARAM);
m_lMaxZipFileSize = 0;
try {
if (strMaxSize != null)
m_lMaxZipFileSize = Long.parseLong(strMaxSize);
} catch (NumberFormatException ex) {
m_lMaxZipFileSize = 0;
} // depends on control dependency: [catch], data = [none]
m_lCurrentLength = 0;
m_iFileNumber = 0;
try {
FileOutputStream outStream = new FileOutputStream(m_strZipFilename);
m_outZip = new ZipOutputStream(outStream); // depends on control dependency: [try], data = [none]
} catch (IOException ex) {
ex.printStackTrace();
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
private static boolean onlyRemoteExceptions(Method method)
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d576626
Class<?>[] exceptions = method.getExceptionTypes();
for (Class<?> exception : exceptions)
{
if (!(RemoteException.class).isAssignableFrom(exception))
{
if (isTraceOn && tc.isDebugEnabled())
Tr.debug(tc, INDENT + method.getName() +
" throws non-Remote exception " + exception.getName());
return false;
}
}
return true;
} }
|
public class class_name {
private static boolean onlyRemoteExceptions(Method method)
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d576626
Class<?>[] exceptions = method.getExceptionTypes();
for (Class<?> exception : exceptions)
{
if (!(RemoteException.class).isAssignableFrom(exception))
{
if (isTraceOn && tc.isDebugEnabled())
Tr.debug(tc, INDENT + method.getName() +
" throws non-Remote exception " + exception.getName());
return false; // depends on control dependency: [if], data = [none]
}
}
return true;
} }
|
public class class_name {
@Override
public void closeSession(Throwable e) throws SIConnectionLostException, SIResourceException, SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "closeSession", e);
if (e == null)
{
//try and build an appropriate exception
if (_consumerKey.isClosedDueToDelete())
{
e = new SISessionDroppedException(
nls.getFormattedMessage(
"DESTINATION_DELETED_ERROR_CWSIP00221",
new Object[] {
_consumerDispatcher.getDestination().getName(),
_messageProcessor.getMessagingEngineName() },
null));
}
else if (_consumerKey.isClosedDueToReceiveExclusive())
{
e = new SISessionDroppedException(
nls.getFormattedMessage(
"DESTINATION_EXCLUSIVE_ERROR_CWSIP00222",
new Object[] {
_consumerDispatcher.getDestination().getName(),
_messageProcessor.getMessagingEngineName() },
null));
}
}
//and close the session
_consumerSession.close();
if (e != null)
notifyException(e);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "closeSession", e);
} }
|
public class class_name {
@Override
public void closeSession(Throwable e) throws SIConnectionLostException, SIResourceException, SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "closeSession", e);
if (e == null)
{
//try and build an appropriate exception
if (_consumerKey.isClosedDueToDelete())
{
e = new SISessionDroppedException(
nls.getFormattedMessage(
"DESTINATION_DELETED_ERROR_CWSIP00221",
new Object[] {
_consumerDispatcher.getDestination().getName(),
_messageProcessor.getMessagingEngineName() },
null)); // depends on control dependency: [if], data = [none]
}
else if (_consumerKey.isClosedDueToReceiveExclusive())
{
e = new SISessionDroppedException(
nls.getFormattedMessage(
"DESTINATION_EXCLUSIVE_ERROR_CWSIP00222",
new Object[] {
_consumerDispatcher.getDestination().getName(),
_messageProcessor.getMessagingEngineName() },
null)); // depends on control dependency: [if], data = [none]
}
}
//and close the session
_consumerSession.close();
if (e != null)
notifyException(e);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "closeSession", e);
} }
|
public class class_name {
public ByteBuffer getElement(ByteBuffer serializedList, int index)
{
try
{
ByteBuffer input = serializedList.duplicate();
int n = readCollectionSize(input, Server.VERSION_3);
if (n <= index)
return null;
for (int i = 0; i < index; i++)
{
int length = input.getInt();
input.position(input.position() + length);
}
return readValue(input, Server.VERSION_3);
}
catch (BufferUnderflowException e)
{
throw new MarshalException("Not enough bytes to read a list");
}
} }
|
public class class_name {
public ByteBuffer getElement(ByteBuffer serializedList, int index)
{
try
{
ByteBuffer input = serializedList.duplicate();
int n = readCollectionSize(input, Server.VERSION_3);
if (n <= index)
return null;
for (int i = 0; i < index; i++)
{
int length = input.getInt();
input.position(input.position() + length); // depends on control dependency: [for], data = [none]
}
return readValue(input, Server.VERSION_3); // depends on control dependency: [try], data = [none]
}
catch (BufferUnderflowException e)
{
throw new MarshalException("Not enough bytes to read a list");
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
private void endCurrentBasicBlockWithNoSuccessor() {
if (compute == COMPUTE_ALL_FRAMES) {
Label nextBasicBlock = new Label();
nextBasicBlock.frame = new Frame(nextBasicBlock);
nextBasicBlock.resolve(code.data, code.length);
lastBasicBlock.nextBasicBlock = nextBasicBlock;
lastBasicBlock = nextBasicBlock;
currentBasicBlock = null;
} else if (compute == COMPUTE_MAX_STACK_AND_LOCAL) {
currentBasicBlock.outputStackMax = (short) maxRelativeStackSize;
currentBasicBlock = null;
}
} }
|
public class class_name {
private void endCurrentBasicBlockWithNoSuccessor() {
if (compute == COMPUTE_ALL_FRAMES) {
Label nextBasicBlock = new Label();
nextBasicBlock.frame = new Frame(nextBasicBlock); // depends on control dependency: [if], data = [none]
nextBasicBlock.resolve(code.data, code.length); // depends on control dependency: [if], data = [none]
lastBasicBlock.nextBasicBlock = nextBasicBlock; // depends on control dependency: [if], data = [none]
lastBasicBlock = nextBasicBlock; // depends on control dependency: [if], data = [none]
currentBasicBlock = null; // depends on control dependency: [if], data = [none]
} else if (compute == COMPUTE_MAX_STACK_AND_LOCAL) {
currentBasicBlock.outputStackMax = (short) maxRelativeStackSize; // depends on control dependency: [if], data = [none]
currentBasicBlock = null; // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
static void updateOverlayColorRounding(
DrawableParent parent,
@Nullable RoundingParams roundingParams) {
Drawable child = parent.getDrawable();
if (roundingParams != null &&
roundingParams.getRoundingMethod() == RoundingParams.RoundingMethod.OVERLAY_COLOR) {
// Overlay rounding requested - either update the overlay params or add a new
// drawable that will do the requested rounding.
if (child instanceof RoundedCornersDrawable) {
RoundedCornersDrawable roundedCornersDrawable = (RoundedCornersDrawable) child;
applyRoundingParams(roundedCornersDrawable, roundingParams);
roundedCornersDrawable.setOverlayColor(roundingParams.getOverlayColor());
} else {
// Important: remove the child before wrapping it with a new parent!
child = parent.setDrawable(sEmptyDrawable);
child = maybeWrapWithRoundedOverlayColor(child, roundingParams);
parent.setDrawable(child);
}
} else if (child instanceof RoundedCornersDrawable) {
// Overlay rounding no longer required so remove drawable that was doing the rounding.
RoundedCornersDrawable roundedCornersDrawable = (RoundedCornersDrawable) child;
// Important: remove the child before wrapping it with a new parent!
child = roundedCornersDrawable.setCurrent(sEmptyDrawable);
parent.setDrawable(child);
// roundedCornersDrawable is removed and will get garbage collected, clear the child callback
sEmptyDrawable.setCallback(null);
}
} }
|
public class class_name {
static void updateOverlayColorRounding(
DrawableParent parent,
@Nullable RoundingParams roundingParams) {
Drawable child = parent.getDrawable();
if (roundingParams != null &&
roundingParams.getRoundingMethod() == RoundingParams.RoundingMethod.OVERLAY_COLOR) {
// Overlay rounding requested - either update the overlay params or add a new
// drawable that will do the requested rounding.
if (child instanceof RoundedCornersDrawable) {
RoundedCornersDrawable roundedCornersDrawable = (RoundedCornersDrawable) child;
applyRoundingParams(roundedCornersDrawable, roundingParams); // depends on control dependency: [if], data = [none]
roundedCornersDrawable.setOverlayColor(roundingParams.getOverlayColor()); // depends on control dependency: [if], data = [none]
} else {
// Important: remove the child before wrapping it with a new parent!
child = parent.setDrawable(sEmptyDrawable); // depends on control dependency: [if], data = [none]
child = maybeWrapWithRoundedOverlayColor(child, roundingParams); // depends on control dependency: [if], data = [none]
parent.setDrawable(child); // depends on control dependency: [if], data = [none]
}
} else if (child instanceof RoundedCornersDrawable) {
// Overlay rounding no longer required so remove drawable that was doing the rounding.
RoundedCornersDrawable roundedCornersDrawable = (RoundedCornersDrawable) child;
// Important: remove the child before wrapping it with a new parent!
child = roundedCornersDrawable.setCurrent(sEmptyDrawable); // depends on control dependency: [if], data = [none]
parent.setDrawable(child); // depends on control dependency: [if], data = [none]
// roundedCornersDrawable is removed and will get garbage collected, clear the child callback
sEmptyDrawable.setCallback(null); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
public void marshall(PublicWorkforceTaskPrice publicWorkforceTaskPrice, ProtocolMarshaller protocolMarshaller) {
if (publicWorkforceTaskPrice == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(publicWorkforceTaskPrice.getAmountInUsd(), AMOUNTINUSD_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
} }
|
public class class_name {
public void marshall(PublicWorkforceTaskPrice publicWorkforceTaskPrice, ProtocolMarshaller protocolMarshaller) {
if (publicWorkforceTaskPrice == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(publicWorkforceTaskPrice.getAmountInUsd(), AMOUNTINUSD_BINDING); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
public static void premain(String args, Instrumentation inst) {
GagTransformer transformer = new GagTransformer();
if (args == null || args.length() == 0) {
transformer.addAllGenerators();
} else {
for (String key : args.split(",")) {
transformer.addGeneratorForKey(key);
}
}
inst.addTransformer(transformer);
} }
|
public class class_name {
public static void premain(String args, Instrumentation inst) {
GagTransformer transformer = new GagTransformer();
if (args == null || args.length() == 0) {
transformer.addAllGenerators();
// depends on control dependency: [if], data = [none]
} else {
for (String key : args.split(",")) {
transformer.addGeneratorForKey(key);
// depends on control dependency: [for], data = [key]
}
}
inst.addTransformer(transformer);
} }
|
public class class_name {
public static <T, U extends T> int safeWrite(ArrayWritable<U> aw, T[] array) {
int num = aw.size();
if (num <= 0) {
return 0;
}
if (num > array.length) {
num = array.length;
}
aw.writeToArray(0, array, 0, num);
return num;
} }
|
public class class_name {
public static <T, U extends T> int safeWrite(ArrayWritable<U> aw, T[] array) {
int num = aw.size();
if (num <= 0) {
return 0; // depends on control dependency: [if], data = [none]
}
if (num > array.length) {
num = array.length; // depends on control dependency: [if], data = [none]
}
aw.writeToArray(0, array, 0, num);
return num;
} }
|
public class class_name {
@Deprecated
private static ArrayList<FrequencyTableEntry> hashToFreqEntries(
HashMap<String, ArrayList<Integer>> hash) {
ArrayList<FrequencyTableEntry> res = new ArrayList<FrequencyTableEntry>();
for (Entry<String, ArrayList<Integer>> e : hash.entrySet()) {
char[] payload = e.getKey().toCharArray();
int frequency = e.getValue().size();
for (Integer i : e.getValue()) {
res.add(new FrequencyTableEntry(i, payload.clone(), frequency));
}
}
return res;
} }
|
public class class_name {
@Deprecated
private static ArrayList<FrequencyTableEntry> hashToFreqEntries(
HashMap<String, ArrayList<Integer>> hash) {
ArrayList<FrequencyTableEntry> res = new ArrayList<FrequencyTableEntry>();
for (Entry<String, ArrayList<Integer>> e : hash.entrySet()) {
char[] payload = e.getKey().toCharArray();
int frequency = e.getValue().size();
for (Integer i : e.getValue()) {
res.add(new FrequencyTableEntry(i, payload.clone(), frequency)); // depends on control dependency: [for], data = [i]
}
}
return res;
} }
|
public class class_name {
private static int getChunkSizeFromInputStream(final InputStream in)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// States: 0=normal, 1=\r was scanned, 2=inside quoted string, -1=end
int state = 0;
while (state != -1) {
int b = in.read();
if (b == -1) {
throw new IOException("chunked stream ended unexpectedly");
}
switch (state) {
case 0:
switch (b) {
case '\r':
state = 1;
break;
case '\"':
state = 2;
/* fall through */
default:
baos.write(b);
}
break;
case 1:
if (b == '\n') {
state = -1;
} else {
// this was not CRLF
throw new IOException("Protocol violation: Unexpected"
+ " single newline character in chunk size");
}
break;
case 2:
switch (b) {
case '\\':
b = in.read();
baos.write(b);
break;
case '\"':
state = 0;
/* fall through */
default:
baos.write(b);
}
break;
default: throw new RuntimeException("assertion failed");
}
}
//parse data
String dataString = new String(baos.toByteArray(), StandardCharsets.US_ASCII);
int separator = dataString.indexOf(';');
dataString = (separator > 0)
? dataString.substring(0, separator).trim()
: dataString.trim();
int result;
try {
result = Integer.parseInt(dataString.trim(), 16);
} catch (NumberFormatException e) {
throw new IOException ("Bad chunk size: " + dataString);
}
return result;
} }
|
public class class_name {
private static int getChunkSizeFromInputStream(final InputStream in)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// States: 0=normal, 1=\r was scanned, 2=inside quoted string, -1=end
int state = 0;
while (state != -1) {
int b = in.read();
if (b == -1) {
throw new IOException("chunked stream ended unexpectedly");
}
switch (state) {
case 0:
switch (b) {
case '\r':
state = 1;
break;
case '\"':
state = 2;
/* fall through */
default:
baos.write(b);
}
break;
case 1:
if (b == '\n') {
state = -1; // depends on control dependency: [if], data = [none]
} else {
// this was not CRLF
throw new IOException("Protocol violation: Unexpected"
+ " single newline character in chunk size");
}
break;
case 2:
switch (b) {
case '\\':
b = in.read();
baos.write(b);
break;
case '\"':
state = 0;
/* fall through */
default:
baos.write(b);
}
break;
default: throw new RuntimeException("assertion failed");
}
}
//parse data
String dataString = new String(baos.toByteArray(), StandardCharsets.US_ASCII);
int separator = dataString.indexOf(';');
dataString = (separator > 0)
? dataString.substring(0, separator).trim()
: dataString.trim();
int result;
try {
result = Integer.parseInt(dataString.trim(), 16);
} catch (NumberFormatException e) {
throw new IOException ("Bad chunk size: " + dataString);
}
return result;
} }
|
public class class_name {
public Result execute(@NonNull Search search) throws Exception {
if (search.getOffset() >= search.getMaxNotes()) {
throw new IllegalArgumentException("offset must be less than max notes");
}
Result result = new Result(search.getScopes());
for (Scope scope : search.getScopes()) {
switch (scope) {
case PERSONAL_NOTES:
try {
result.setPersonalResults(findPersonalNotes(search));
} catch (Exception e) {
maybeRethrow(search, e);
}
break;
case LINKED_NOTEBOOKS:
List<LinkedNotebook> linkedNotebooks = getLinkedNotebooks(search, false);
for (LinkedNotebook linkedNotebook : linkedNotebooks) {
try {
result.addLinkedNotebookResult(linkedNotebook, findNotesInLinkedNotebook(search, linkedNotebook));
} catch (Exception e) {
maybeRethrow(search, e);
}
}
break;
case BUSINESS:
linkedNotebooks = getLinkedNotebooks(search, true);
for (LinkedNotebook linkedNotebook : linkedNotebooks) {
try {
result.addBusinessResult(linkedNotebook, findNotesInBusinessNotebook(search, linkedNotebook));
} catch (Exception e) {
maybeRethrow(search, e);
}
}
break;
}
}
return result;
} }
|
public class class_name {
public Result execute(@NonNull Search search) throws Exception {
if (search.getOffset() >= search.getMaxNotes()) {
throw new IllegalArgumentException("offset must be less than max notes");
}
Result result = new Result(search.getScopes());
for (Scope scope : search.getScopes()) {
switch (scope) {
case PERSONAL_NOTES:
try {
result.setPersonalResults(findPersonalNotes(search)); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
maybeRethrow(search, e);
} // depends on control dependency: [catch], data = [none]
break;
case LINKED_NOTEBOOKS:
List<LinkedNotebook> linkedNotebooks = getLinkedNotebooks(search, false);
for (LinkedNotebook linkedNotebook : linkedNotebooks) {
try {
result.addLinkedNotebookResult(linkedNotebook, findNotesInLinkedNotebook(search, linkedNotebook)); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
maybeRethrow(search, e);
} // depends on control dependency: [catch], data = [none]
}
break;
case BUSINESS:
linkedNotebooks = getLinkedNotebooks(search, true);
for (LinkedNotebook linkedNotebook : linkedNotebooks) {
try {
result.addBusinessResult(linkedNotebook, findNotesInBusinessNotebook(search, linkedNotebook)); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
maybeRethrow(search, e);
} // depends on control dependency: [catch], data = [none]
}
break;
}
}
return result;
} }
|
public class class_name {
protected Map<String,Object> prepareEnv(Map<String, String> pTargetConfig) {
if (pTargetConfig == null || pTargetConfig.size() == 0) {
return null;
}
Map<String,Object> ret = new HashMap<String, Object>(pTargetConfig);
String user = (String) ret.remove("user");
String password = (String) ret.remove("password");
if (user != null && password != null) {
ret.put(Context.SECURITY_PRINCIPAL, user);
ret.put(Context.SECURITY_CREDENTIALS, password);
ret.put("jmx.remote.credentials",new String[] { user, password });
}
return ret;
} }
|
public class class_name {
protected Map<String,Object> prepareEnv(Map<String, String> pTargetConfig) {
if (pTargetConfig == null || pTargetConfig.size() == 0) {
return null; // depends on control dependency: [if], data = [none]
}
Map<String,Object> ret = new HashMap<String, Object>(pTargetConfig);
String user = (String) ret.remove("user");
String password = (String) ret.remove("password");
if (user != null && password != null) {
ret.put(Context.SECURITY_PRINCIPAL, user); // depends on control dependency: [if], data = [none]
ret.put(Context.SECURITY_CREDENTIALS, password); // depends on control dependency: [if], data = [none]
ret.put("jmx.remote.credentials",new String[] { user, password }); // depends on control dependency: [if], data = [none]
}
return ret;
} }
|
public class class_name {
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
int result = -1;
if (!controller.hasPreinitialized()) {
throw new IllegalStateException("Controller has not been initialized.");
}
int patternCode = controller.getUriMatcher().match(uri);
MatcherPattern pattern = controller.findMatcherPattern(patternCode);
if (pattern == null) {
throw new IllegalArgumentException("unknown uri : " + uri.toString());
}
Parameter parameter = new Parameter(uri, values, selection, selectionArgs);
SQLiteDatabase db = this.getHelper().getWritableDatabase();
result = onUpdate(this.getHelper(), db, pattern, parameter);
if (result >= 0) {
this.onUpdateCompleted(result, uri, pattern, parameter);
}
return result;
} }
|
public class class_name {
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
int result = -1;
if (!controller.hasPreinitialized()) {
throw new IllegalStateException("Controller has not been initialized.");
}
int patternCode = controller.getUriMatcher().match(uri);
MatcherPattern pattern = controller.findMatcherPattern(patternCode);
if (pattern == null) {
throw new IllegalArgumentException("unknown uri : " + uri.toString());
}
Parameter parameter = new Parameter(uri, values, selection, selectionArgs);
SQLiteDatabase db = this.getHelper().getWritableDatabase();
result = onUpdate(this.getHelper(), db, pattern, parameter);
if (result >= 0) {
this.onUpdateCompleted(result, uri, pattern, parameter); // depends on control dependency: [if], data = [(result]
}
return result;
} }
|
public class class_name {
public java.util.List<NotificationConfiguration> getNotificationConfigurations() {
if (notificationConfigurations == null) {
notificationConfigurations = new com.amazonaws.internal.SdkInternalList<NotificationConfiguration>();
}
return notificationConfigurations;
} }
|
public class class_name {
public java.util.List<NotificationConfiguration> getNotificationConfigurations() {
if (notificationConfigurations == null) {
notificationConfigurations = new com.amazonaws.internal.SdkInternalList<NotificationConfiguration>(); // depends on control dependency: [if], data = [none]
}
return notificationConfigurations;
} }
|
public class class_name {
public SDVariable[] generateOutputVariableForOp(DifferentialFunction function, String baseName) {
//xyz ops only have 1 output
//if there is already a base name defined, use that
if (baseName == null || baseName.isEmpty() && getBaseNameForFunction(function) != null)
baseName = getBaseNameForFunction(function);
if (baseName == null)
baseName = function.opName();
val outputShape = function.calculateOutputShape();
if (outputShape == null || outputShape.isEmpty()) {
if (function instanceof CustomOp) {
CustomOp customOp = (CustomOp) function;
val descriptor = customOp.getDescriptor();
//can't guess number of outputs, variable
if (descriptor == null || descriptor.getNumOutputs() <= 0) {
throw new ND4JIllegalStateException("No output variables found!");
} else {
char ordering = 'c';
if (function.args()[0].getArr() != null) {
ordering = function.args()[0].getArr().ordering();
}
SDVariable[] ret = new SDVariable[descriptor.getNumOutputs()];
//dynamic shapes
for (int i = 0; i < ret.length; i++) {
SDVariable checkGet = getVariable(baseName);
if (checkGet == null) {
checkGet = var(generateNewVarName(baseName, i), null, new ZeroInitScheme(ordering));
} else if (i > 0 && !importedVarName.contains(baseName)) {
//need to find a new name
String newName = generateNewVarName(baseName, i);
checkGet = getVariable(newName);
}
if (checkGet == null) {
String newName = generateNewVarName(baseName, i);
checkGet = var(newName, null, new ZeroInitScheme(ordering));
}
ret[i] = checkGet;
}
return ret;
}
}
//this is for unresolved shapes, we know xyz is always 1 output
else if (function instanceof BaseOp && outputShape.isEmpty()) {
SDVariable[] ret = new SDVariable[1];
SDVariable checkGet = getVariable(baseName);
char ordering = 'c';
if (function.args()[0].getArr() != null) {
ordering = function.args()[0].getArr().ordering();
}
if (checkGet == null) {
checkGet = var(baseName, null, new ZeroInitScheme(ordering));
} else if (!importedVarName.contains(baseName)) {
//need to find a new name
String newName = generateNewVarName(baseName, 0);
checkGet = var(newName, null, new ZeroInitScheme(ordering));
}
if (checkGet == null) {
checkGet = var(baseName, null, new ZeroInitScheme(ordering));
}
ret[0] = checkGet;
return ret;
}
}
char ordering = 'c';
if (function.args()[0].getArr() != null) {
ordering = function.args()[0].getArr().ordering();
}
SDVariable[] ret = new SDVariable[outputShape.size()];
// ownName/baseName will be used to get variables names
val ownName = function.getOwnName();
val rootName = baseName;
for (int i = 0; i < ret.length; i++) {
val shape = outputShape.get(i);
// it should be: rootName:index. i.e.: split:1, split:2, split:3, split:4 etc
baseName = rootName + (i > 0 ? ":" + i : "");
SDVariable checkGet = getVariable(baseName);
if (checkGet == null) {
// obviously - there's no such var, just add it
checkGet = var(baseName, shape, new ZeroInitScheme(ordering));
} else if (shape != null && !shapeAlreadyExistsForVarName(checkGet.getVarName())) {
// var exists, let's update its shape
putShapeForVarName(checkGet.getVarName(), shape);
} else if (shape != null && shapeAlreadyExistsForVarName(checkGet.getVarName())) {
// no-op.
// TODO: maybe we should check shapes equality here?
// it's either var that already exist, or something bad happening
} else if (!importedVarName.contains(baseName)) {
// FIXME: dead end. it's impossible to get here with null as shape
//need to find a new name
int count = 1;
String name = baseName + "_" + count + (i > 0 ? ":" + i : "");
while (getVariable(name) != null) {
count++;
name = baseName + "_" + count + (i > 0 ? ":" + i : "");
}
if (getVariable(name) != null) {
throw new ND4JIllegalStateException("Converged on already generated variable!");
}
checkGet = var(name, shape, new ZeroInitScheme(ordering));
}
if (checkGet == null) {
checkGet = var(baseName + (i > 0 ? ":" + i : ""), shape, new ZeroInitScheme(ordering));
}
ret[i] = checkGet;
}
return ret;
} }
|
public class class_name {
public SDVariable[] generateOutputVariableForOp(DifferentialFunction function, String baseName) {
//xyz ops only have 1 output
//if there is already a base name defined, use that
if (baseName == null || baseName.isEmpty() && getBaseNameForFunction(function) != null)
baseName = getBaseNameForFunction(function);
if (baseName == null)
baseName = function.opName();
val outputShape = function.calculateOutputShape();
if (outputShape == null || outputShape.isEmpty()) {
if (function instanceof CustomOp) {
CustomOp customOp = (CustomOp) function;
val descriptor = customOp.getDescriptor();
//can't guess number of outputs, variable
if (descriptor == null || descriptor.getNumOutputs() <= 0) {
throw new ND4JIllegalStateException("No output variables found!");
} else {
char ordering = 'c';
if (function.args()[0].getArr() != null) {
ordering = function.args()[0].getArr().ordering(); // depends on control dependency: [if], data = [none]
}
SDVariable[] ret = new SDVariable[descriptor.getNumOutputs()];
//dynamic shapes
for (int i = 0; i < ret.length; i++) {
SDVariable checkGet = getVariable(baseName);
if (checkGet == null) {
checkGet = var(generateNewVarName(baseName, i), null, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
} else if (i > 0 && !importedVarName.contains(baseName)) {
//need to find a new name
String newName = generateNewVarName(baseName, i);
checkGet = getVariable(newName); // depends on control dependency: [if], data = [none]
}
if (checkGet == null) {
String newName = generateNewVarName(baseName, i);
checkGet = var(newName, null, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
}
ret[i] = checkGet; // depends on control dependency: [for], data = [i]
}
return ret; // depends on control dependency: [if], data = [none]
}
}
//this is for unresolved shapes, we know xyz is always 1 output
else if (function instanceof BaseOp && outputShape.isEmpty()) {
SDVariable[] ret = new SDVariable[1];
SDVariable checkGet = getVariable(baseName);
char ordering = 'c';
if (function.args()[0].getArr() != null) {
ordering = function.args()[0].getArr().ordering(); // depends on control dependency: [if], data = [none]
}
if (checkGet == null) {
checkGet = var(baseName, null, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
} else if (!importedVarName.contains(baseName)) {
//need to find a new name
String newName = generateNewVarName(baseName, 0);
checkGet = var(newName, null, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
}
if (checkGet == null) {
checkGet = var(baseName, null, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
}
ret[0] = checkGet; // depends on control dependency: [if], data = [none]
return ret; // depends on control dependency: [if], data = [none]
}
}
char ordering = 'c';
if (function.args()[0].getArr() != null) {
ordering = function.args()[0].getArr().ordering(); // depends on control dependency: [if], data = [none]
}
SDVariable[] ret = new SDVariable[outputShape.size()];
// ownName/baseName will be used to get variables names
val ownName = function.getOwnName();
val rootName = baseName;
for (int i = 0; i < ret.length; i++) {
val shape = outputShape.get(i);
// it should be: rootName:index. i.e.: split:1, split:2, split:3, split:4 etc
baseName = rootName + (i > 0 ? ":" + i : ""); // depends on control dependency: [for], data = [i]
SDVariable checkGet = getVariable(baseName);
if (checkGet == null) {
// obviously - there's no such var, just add it
checkGet = var(baseName, shape, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
} else if (shape != null && !shapeAlreadyExistsForVarName(checkGet.getVarName())) {
// var exists, let's update its shape
putShapeForVarName(checkGet.getVarName(), shape); // depends on control dependency: [if], data = [none]
} else if (shape != null && shapeAlreadyExistsForVarName(checkGet.getVarName())) {
// no-op.
// TODO: maybe we should check shapes equality here?
// it's either var that already exist, or something bad happening
} else if (!importedVarName.contains(baseName)) {
// FIXME: dead end. it's impossible to get here with null as shape
//need to find a new name
int count = 1;
String name = baseName + "_" + count + (i > 0 ? ":" + i : "");
while (getVariable(name) != null) {
count++; // depends on control dependency: [while], data = [none]
name = baseName + "_" + count + (i > 0 ? ":" + i : ""); // depends on control dependency: [while], data = [none]
}
if (getVariable(name) != null) {
throw new ND4JIllegalStateException("Converged on already generated variable!");
}
checkGet = var(name, shape, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
}
if (checkGet == null) {
checkGet = var(baseName + (i > 0 ? ":" + i : ""), shape, new ZeroInitScheme(ordering)); // depends on control dependency: [if], data = [none]
}
ret[i] = checkGet; // depends on control dependency: [for], data = [i]
}
return ret;
} }
|
public class class_name {
public void visitObjects (ObjectVisitor visitor, boolean interestingOnly)
{
for (Iterator<Section> iter = getSections(); iter.hasNext(); ) {
Section sect = iter.next();
for (ObjectInfo oinfo : sect.objectInfo) {
visitor.visit(oinfo);
}
if (!interestingOnly) {
for (int oo = 0; oo < sect.objectTileIds.length; oo++) {
ObjectInfo info = new ObjectInfo();
info.tileId = sect.objectTileIds[oo];
info.x = sect.objectXs[oo];
info.y = sect.objectYs[oo];
visitor.visit(info);
}
}
}
} }
|
public class class_name {
public void visitObjects (ObjectVisitor visitor, boolean interestingOnly)
{
for (Iterator<Section> iter = getSections(); iter.hasNext(); ) {
Section sect = iter.next();
for (ObjectInfo oinfo : sect.objectInfo) {
visitor.visit(oinfo); // depends on control dependency: [for], data = [oinfo]
}
if (!interestingOnly) {
for (int oo = 0; oo < sect.objectTileIds.length; oo++) {
ObjectInfo info = new ObjectInfo();
info.tileId = sect.objectTileIds[oo]; // depends on control dependency: [for], data = [oo]
info.x = sect.objectXs[oo]; // depends on control dependency: [for], data = [oo]
info.y = sect.objectYs[oo]; // depends on control dependency: [for], data = [oo]
visitor.visit(info); // depends on control dependency: [for], data = [none]
}
}
}
} }
|
public class class_name {
public Observable<ServiceResponse<ContainerExecResponseInner>> executeCommandWithServiceResponseAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (containerGroupName == null) {
throw new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.");
}
if (containerName == null) {
throw new IllegalArgumentException("Parameter containerName is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
if (containerExecRequest == null) {
throw new IllegalArgumentException("Parameter containerExecRequest is required and cannot be null.");
}
Validator.validate(containerExecRequest);
return service.executeCommand(this.client.subscriptionId(), resourceGroupName, containerGroupName, containerName, this.client.apiVersion(), containerExecRequest, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ContainerExecResponseInner>>>() {
@Override
public Observable<ServiceResponse<ContainerExecResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ContainerExecResponseInner> clientResponse = executeCommandDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} }
|
public class class_name {
public Observable<ServiceResponse<ContainerExecResponseInner>> executeCommandWithServiceResponseAsync(String resourceGroupName, String containerGroupName, String containerName, ContainerExecRequest containerExecRequest) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (containerGroupName == null) {
throw new IllegalArgumentException("Parameter containerGroupName is required and cannot be null.");
}
if (containerName == null) {
throw new IllegalArgumentException("Parameter containerName is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
if (containerExecRequest == null) {
throw new IllegalArgumentException("Parameter containerExecRequest is required and cannot be null.");
}
Validator.validate(containerExecRequest);
return service.executeCommand(this.client.subscriptionId(), resourceGroupName, containerGroupName, containerName, this.client.apiVersion(), containerExecRequest, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ContainerExecResponseInner>>>() {
@Override
public Observable<ServiceResponse<ContainerExecResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<ContainerExecResponseInner> clientResponse = executeCommandDelegate(response);
return Observable.just(clientResponse); // depends on control dependency: [try], data = [none]
} catch (Throwable t) {
return Observable.error(t);
} // depends on control dependency: [catch], data = [none]
}
});
} }
|
public class class_name {
private void addIssuerNameInternal(Object name, X500Principal principal) {
if (issuerNames == null) {
issuerNames = new HashSet<Object>();
}
if (issuerX500Principals == null) {
issuerX500Principals = new HashSet<X500Principal>();
}
issuerNames.add(name);
issuerX500Principals.add(principal);
} }
|
public class class_name {
private void addIssuerNameInternal(Object name, X500Principal principal) {
if (issuerNames == null) {
issuerNames = new HashSet<Object>(); // depends on control dependency: [if], data = [none]
}
if (issuerX500Principals == null) {
issuerX500Principals = new HashSet<X500Principal>(); // depends on control dependency: [if], data = [none]
}
issuerNames.add(name);
issuerX500Principals.add(principal);
} }
|
public class class_name {
private void processInternalListener(Class<?> listenerClass) {
InternalListenerMetadata listenerMetadata = InternalListenerIntrospector
.introspect(listenerClass);
Map<CallbackType, Method> callbacks = listenerMetadata.getCallbacks();
if (callbacks != null) {
for (Map.Entry<CallbackType, Method> entry : callbacks.entrySet()) {
CallbackType callbackType = entry.getKey();
Method callbackMethod = entry.getValue();
CallbackMetadata callbackMetadata = new CallbackMetadata(EntityListenerType.INTERNAL,
callbackType, callbackMethod);
metadata.put(callbackType, callbackMetadata);
}
}
} }
|
public class class_name {
private void processInternalListener(Class<?> listenerClass) {
InternalListenerMetadata listenerMetadata = InternalListenerIntrospector
.introspect(listenerClass);
Map<CallbackType, Method> callbacks = listenerMetadata.getCallbacks();
if (callbacks != null) {
for (Map.Entry<CallbackType, Method> entry : callbacks.entrySet()) {
CallbackType callbackType = entry.getKey();
Method callbackMethod = entry.getValue();
CallbackMetadata callbackMetadata = new CallbackMetadata(EntityListenerType.INTERNAL,
callbackType, callbackMethod);
metadata.put(callbackType, callbackMetadata); // depends on control dependency: [for], data = [none]
}
}
} }
|
public class class_name {
public final T single() {
Iterator<T> it = iterator();
if (it.hasNext()) {
T v = it.next();
if (it.hasNext()) {
throw new IndexOutOfBoundsException("The source has more than one element.");
}
return v;
}
throw new NoSuchElementException("The source is empty.");
} }
|
public class class_name {
public final T single() {
Iterator<T> it = iterator();
if (it.hasNext()) {
T v = it.next();
if (it.hasNext()) {
throw new IndexOutOfBoundsException("The source has more than one element.");
}
return v; // depends on control dependency: [if], data = [none]
}
throw new NoSuchElementException("The source is empty.");
} }
|
public class class_name {
public static void addTray(final Image image, final String name,
final PopupMenu popup)
{
final Class[] trayIconArgTypes = new Class[] {
java.awt.Image.class,
java.lang.String.class,
java.awt.PopupMenu.class
};
try
{
final Class trayIconClass = Class.forName("java.awt.TrayIcon");
final Constructor trayIconConstructor =
trayIconClass.getConstructor(trayIconArgTypes);
final Object trayIcon =
trayIconConstructor.newInstance(image, name, popup);
final Class trayClass = Class.forName("java.awt.SystemTray");
final Object obj =
trayClass.getDeclaredMethod("getSystemTray").invoke(null);
final Class[] trayAddArgTypes = new Class[] {
trayIconClass
};
trayClass.getDeclaredMethod("add", trayAddArgTypes).invoke(obj, trayIcon);
}
catch (final Exception e)
{
LOG.warn("Reflection error", e);
}
} }
|
public class class_name {
public static void addTray(final Image image, final String name,
final PopupMenu popup)
{
final Class[] trayIconArgTypes = new Class[] {
java.awt.Image.class,
java.lang.String.class,
java.awt.PopupMenu.class
};
try
{
final Class trayIconClass = Class.forName("java.awt.TrayIcon");
final Constructor trayIconConstructor =
trayIconClass.getConstructor(trayIconArgTypes);
final Object trayIcon =
trayIconConstructor.newInstance(image, name, popup);
final Class trayClass = Class.forName("java.awt.SystemTray");
final Object obj =
trayClass.getDeclaredMethod("getSystemTray").invoke(null);
final Class[] trayAddArgTypes = new Class[] {
trayIconClass
};
// depends on control dependency: [try], data = [none]
trayClass.getDeclaredMethod("add", trayAddArgTypes).invoke(obj, trayIcon);
// depends on control dependency: [try], data = [none]
}
catch (final Exception e)
{
LOG.warn("Reflection error", e);
}
// depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
public void insertAll(List<E> entries) {
if(!initialized && !entries.isEmpty()) {
initialize(entries.get(0));
}
for(E entry : entries) {
insert(entry, false);
}
} }
|
public class class_name {
public void insertAll(List<E> entries) {
if(!initialized && !entries.isEmpty()) {
initialize(entries.get(0)); // depends on control dependency: [if], data = [none]
}
for(E entry : entries) {
insert(entry, false); // depends on control dependency: [for], data = [entry]
}
} }
|
public class class_name {
static Map<Point, Object> addHighlights(JTextComponent textComponent,
Iterable<? extends Point> appearances, Color color)
{
Highlighter.HighlightPainter painter =
new DefaultHighlighter.DefaultHighlightPainter(color);
Highlighter highlighter = textComponent.getHighlighter();
Map<Point, Object> highlights = new LinkedHashMap<Point, Object>();
for (Point appearance : appearances)
{
try
{
Object highlight = highlighter.addHighlight(
appearance.x, appearance.y, painter);
highlights.put(appearance, highlight);
}
catch (BadLocationException e)
{
// Should never happen
logger.severe(e.toString());
}
}
return highlights;
} }
|
public class class_name {
static Map<Point, Object> addHighlights(JTextComponent textComponent,
Iterable<? extends Point> appearances, Color color)
{
Highlighter.HighlightPainter painter =
new DefaultHighlighter.DefaultHighlightPainter(color);
Highlighter highlighter = textComponent.getHighlighter();
Map<Point, Object> highlights = new LinkedHashMap<Point, Object>();
for (Point appearance : appearances)
{
try
{
Object highlight = highlighter.addHighlight(
appearance.x, appearance.y, painter);
highlights.put(appearance, highlight);
// depends on control dependency: [try], data = [none]
}
catch (BadLocationException e)
{
// Should never happen
logger.severe(e.toString());
}
// depends on control dependency: [catch], data = [none]
}
return highlights;
} }
|
public class class_name {
@Override
public EClass getIfcPreDefinedTextFont() {
if (ifcPreDefinedTextFontEClass == null) {
ifcPreDefinedTextFontEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(445);
}
return ifcPreDefinedTextFontEClass;
} }
|
public class class_name {
@Override
public EClass getIfcPreDefinedTextFont() {
if (ifcPreDefinedTextFontEClass == null) {
ifcPreDefinedTextFontEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(445);
// depends on control dependency: [if], data = [none]
}
return ifcPreDefinedTextFontEClass;
} }
|
public class class_name {
@TargetApi(11)
public void setNavigationBarAlpha(float alpha) {
if (mNavBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mNavBarTintView.setAlpha(alpha);
}
} }
|
public class class_name {
@TargetApi(11)
public void setNavigationBarAlpha(float alpha) {
if (mNavBarAvailable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mNavBarTintView.setAlpha(alpha); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
public Node[] toArray() {
// logger.info("count " + count);
Node[] array = new Node[count];
int i = 0;
// System.out.print("node:");
Iterator it = iterator();
while (it.hasNext()) {
Entry e = (Entry) it.next();
// System.out.print(" " + e.getIndex());
array[i] = new Node();
array[i].index = e.getIndex();
array[i].value = e.getValue();
i++;
}
// System.out.print("\n");
return array;
} }
|
public class class_name {
public Node[] toArray() {
// logger.info("count " + count);
Node[] array = new Node[count];
int i = 0;
// System.out.print("node:");
Iterator it = iterator();
while (it.hasNext()) {
Entry e = (Entry) it.next();
// System.out.print(" " + e.getIndex());
array[i] = new Node(); // depends on control dependency: [while], data = [none]
array[i].index = e.getIndex(); // depends on control dependency: [while], data = [none]
array[i].value = e.getValue(); // depends on control dependency: [while], data = [none]
i++; // depends on control dependency: [while], data = [none]
}
// System.out.print("\n");
return array;
} }
|
public class class_name {
public void setName(String name) {
this.name = name;
List<Token> tokens = Tokenizer.tokenize(name, true);
int tokenCount = 0;
for (Token t : tokens) {
if (t.getType() != TokenType.TEXT) {
tokenCount++;
}
}
if (tokenCount > 0) {
this.nameTokens = tokens.toArray(new Token[0]);
} else {
this.nameTokens = null;
}
} }
|
public class class_name {
public void setName(String name) {
this.name = name;
List<Token> tokens = Tokenizer.tokenize(name, true);
int tokenCount = 0;
for (Token t : tokens) {
if (t.getType() != TokenType.TEXT) {
tokenCount++; // depends on control dependency: [if], data = [none]
}
}
if (tokenCount > 0) {
this.nameTokens = tokens.toArray(new Token[0]); // depends on control dependency: [if], data = [none]
} else {
this.nameTokens = null; // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
@Override
public synchronized void delete(Context context, AuthProviderType type) {
SharedPreferences prefs = context.getSharedPreferences(PREFERENCES, Context.MODE_PRIVATE);
String authData = prefs.getString(USER_AUTH_DATA, null);
Editor editor = prefs.edit();
if(!StringUtils.isEmpty(authData)) {
UserProviderCredentialsMap map = jsonUtils.fromJSON(authData, UserProviderCredentialsMap.class);
map.remove(type);
editor.putString(USER_AUTH_DATA, jsonUtils.toJSON(map));
}
else {
editor.putString(USER_AUTH_DATA, jsonUtils.toJSON(makeDefaultUserProviderCredentials()));
}
editor.commit();
} }
|
public class class_name {
@Override
public synchronized void delete(Context context, AuthProviderType type) {
SharedPreferences prefs = context.getSharedPreferences(PREFERENCES, Context.MODE_PRIVATE);
String authData = prefs.getString(USER_AUTH_DATA, null);
Editor editor = prefs.edit();
if(!StringUtils.isEmpty(authData)) {
UserProviderCredentialsMap map = jsonUtils.fromJSON(authData, UserProviderCredentialsMap.class);
map.remove(type); // depends on control dependency: [if], data = [none]
editor.putString(USER_AUTH_DATA, jsonUtils.toJSON(map)); // depends on control dependency: [if], data = [none]
}
else {
editor.putString(USER_AUTH_DATA, jsonUtils.toJSON(makeDefaultUserProviderCredentials())); // depends on control dependency: [if], data = [none]
}
editor.commit();
} }
|
public class class_name {
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
ActivityServiceInterface activityService =
adManagerServices.get(session, ActivityServiceInterface.class);
// Create a statement to select activities.
StatementBuilder statementBuilder = new StatementBuilder()
.where("status = :status")
.orderBy("id ASC")
.limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
.withBindVariableValue("status", ActivityStatus.ACTIVE.toString());
// Retrieve a small amount of activities at a time, paging through
// until all activities have been retrieved.
int totalResultSetSize = 0;
do {
ActivityPage page =
activityService.getActivitiesByStatement(statementBuilder.toStatement());
if (page.getResults() != null) {
// Print out some information for each activity.
totalResultSetSize = page.getTotalResultSetSize();
int i = page.getStartIndex();
for (Activity activity : page.getResults()) {
System.out.printf(
"%d) Activity with ID %d, name '%s', and type '%s' was found.%n",
i++,
activity.getId(),
activity.getName(),
activity.getType()
);
}
}
statementBuilder.increaseOffsetBy(StatementBuilder.SUGGESTED_PAGE_LIMIT);
} while (statementBuilder.getOffset() < totalResultSetSize);
System.out.printf("Number of results found: %d%n", totalResultSetSize);
} }
|
public class class_name {
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
ActivityServiceInterface activityService =
adManagerServices.get(session, ActivityServiceInterface.class);
// Create a statement to select activities.
StatementBuilder statementBuilder = new StatementBuilder()
.where("status = :status")
.orderBy("id ASC")
.limit(StatementBuilder.SUGGESTED_PAGE_LIMIT)
.withBindVariableValue("status", ActivityStatus.ACTIVE.toString());
// Retrieve a small amount of activities at a time, paging through
// until all activities have been retrieved.
int totalResultSetSize = 0;
do {
ActivityPage page =
activityService.getActivitiesByStatement(statementBuilder.toStatement());
if (page.getResults() != null) {
// Print out some information for each activity.
totalResultSetSize = page.getTotalResultSetSize(); // depends on control dependency: [if], data = [none]
int i = page.getStartIndex();
for (Activity activity : page.getResults()) {
System.out.printf(
"%d) Activity with ID %d, name '%s', and type '%s' was found.%n", // depends on control dependency: [for], data = [none]
i++,
activity.getId(),
activity.getName(),
activity.getType()
); // depends on control dependency: [for], data = [none]
}
}
statementBuilder.increaseOffsetBy(StatementBuilder.SUGGESTED_PAGE_LIMIT);
} while (statementBuilder.getOffset() < totalResultSetSize);
System.out.printf("Number of results found: %d%n", totalResultSetSize);
} }
|
public class class_name {
@Override
public String getValue(URI uri, String url, String fieldId, String defaultValue, List<String> definedValues, Map<String, String> envAttributes, Map<String, String> fieldAttributes) {
//If there is a default value provided, return it
if (!defaultValue.isEmpty()){
return defaultValue;
}
if (fieldAttributes.get("Control Type").equalsIgnoreCase(FormControlType.TEXT.toString())) {
// Converted FormControlType to String to allow for case insensitive comparison
// If the control type was reduced to a TEXT type by the Jericho library, check the
// HTML5 type and use proper values
String type = fieldAttributes.get(ATTR_TYPE);
if (type == null || type.equalsIgnoreCase("text")) {
return DEFAULT_TEXT_VALUE;
}
if (type.equalsIgnoreCase("number") || type.equalsIgnoreCase("range")) {
String min = fieldAttributes.get("min");
if (min != null) {
return min;
}
String max = fieldAttributes.get("max");
if (max != null) {
return max;
}
return DEFAULT_NUMBER_VALUE;
}
if (type.equalsIgnoreCase("url")) {
return "http://www.example.com";
}
if (type.equalsIgnoreCase("email")) {
return "foo-bar@example.com";
}
if (type.equalsIgnoreCase("color")) {
return "#ffffff";
}
if (type.equalsIgnoreCase("tel")) {
return "9999999999";
}
if (type.equalsIgnoreCase("datetime")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
return format.format(getDefaultDate());
}
if (type.equalsIgnoreCase("datetime-local")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
return format.format(getDefaultDate());
}
if (type.equalsIgnoreCase("date")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
return format.format(getDefaultDate());
}
if (type.equalsIgnoreCase("time")) {
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
return format.format(getDefaultDate());
}
if (type.equalsIgnoreCase("month")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM");
return format.format(getDefaultDate());
}
if (type.equalsIgnoreCase("week")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-'W'ww");
return format.format(getDefaultDate());
}
} else if (fieldAttributes.get("Control Type").equalsIgnoreCase(FormControlType.PASSWORD.toString())) {
return DEFAULT_PASS_VALUE;
} else if (fieldAttributes.get("Control Type").equalsIgnoreCase(FormControlType.FILE.toString())) {
return DEFAULT_FILE_VALUE;
}
return DEFAULT_EMPTY_VALUE;
} }
|
public class class_name {
@Override
public String getValue(URI uri, String url, String fieldId, String defaultValue, List<String> definedValues, Map<String, String> envAttributes, Map<String, String> fieldAttributes) {
//If there is a default value provided, return it
if (!defaultValue.isEmpty()){
return defaultValue;
// depends on control dependency: [if], data = [none]
}
if (fieldAttributes.get("Control Type").equalsIgnoreCase(FormControlType.TEXT.toString())) {
// Converted FormControlType to String to allow for case insensitive comparison
// If the control type was reduced to a TEXT type by the Jericho library, check the
// HTML5 type and use proper values
String type = fieldAttributes.get(ATTR_TYPE);
if (type == null || type.equalsIgnoreCase("text")) {
return DEFAULT_TEXT_VALUE;
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("number") || type.equalsIgnoreCase("range")) {
String min = fieldAttributes.get("min");
if (min != null) {
return min;
// depends on control dependency: [if], data = [none]
}
String max = fieldAttributes.get("max");
if (max != null) {
return max;
// depends on control dependency: [if], data = [none]
}
return DEFAULT_NUMBER_VALUE;
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("url")) {
return "http://www.example.com";
}
if (type.equalsIgnoreCase("email")) {
return "foo-bar@example.com";
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("color")) {
return "#ffffff";
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("tel")) {
return "9999999999";
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("datetime")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
return format.format(getDefaultDate());
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("datetime-local")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
return format.format(getDefaultDate());
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("date")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
return format.format(getDefaultDate());
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("time")) {
SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
return format.format(getDefaultDate());
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("month")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM");
return format.format(getDefaultDate());
// depends on control dependency: [if], data = [none]
}
if (type.equalsIgnoreCase("week")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-'W'ww");
return format.format(getDefaultDate());
// depends on control dependency: [if], data = [none]
}
} else if (fieldAttributes.get("Control Type").equalsIgnoreCase(FormControlType.PASSWORD.toString())) {
return DEFAULT_PASS_VALUE;
// depends on control dependency: [if], data = [none]
} else if (fieldAttributes.get("Control Type").equalsIgnoreCase(FormControlType.FILE.toString())) {
return DEFAULT_FILE_VALUE;
// depends on control dependency: [if], data = [none]
}
return DEFAULT_EMPTY_VALUE;
} }
|
public class class_name {
private static void initLookAndFeelIntern(final String className) {
try {
UIManager.setLookAndFeel(className);
} catch (final Exception e) {
throw new RuntimeException("Error initializing the Look And Feel!", e);
}
} }
|
public class class_name {
private static void initLookAndFeelIntern(final String className) {
try {
UIManager.setLookAndFeel(className);
// depends on control dependency: [try], data = [none]
} catch (final Exception e) {
throw new RuntimeException("Error initializing the Look And Feel!", e);
}
// depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
@Override
public int unregisterTopicSession(String topic, Session session) {
if (isInconsistenceContext(topic, session)) {
return 0;
}
logger.debug("'{}' unsubscribe to '{}'", session.getId(), topic);
if (Constants.Topic.ALL.equals(topic)) {
for (Map.Entry<String, Collection<Session>> entry : map.entrySet()) {
Collection<Session> sessions = entry.getValue();
removeSessionToSessions(session, sessions);
if (sessions.isEmpty()) {
map.remove(entry.getKey());
}
}
} else {
Collection<Session> sessions = map.get(topic);
removeSessionToSessions(session, sessions);
if (sessions==null || sessions.isEmpty()) {
map.remove(topic);
}
}
return getNumberSubscribers(topic);
} }
|
public class class_name {
@Override
public int unregisterTopicSession(String topic, Session session) {
if (isInconsistenceContext(topic, session)) {
return 0;
// depends on control dependency: [if], data = [none]
}
logger.debug("'{}' unsubscribe to '{}'", session.getId(), topic);
if (Constants.Topic.ALL.equals(topic)) {
for (Map.Entry<String, Collection<Session>> entry : map.entrySet()) {
Collection<Session> sessions = entry.getValue();
removeSessionToSessions(session, sessions);
// depends on control dependency: [for], data = [none]
if (sessions.isEmpty()) {
map.remove(entry.getKey());
// depends on control dependency: [if], data = [none]
}
}
} else {
Collection<Session> sessions = map.get(topic);
removeSessionToSessions(session, sessions);
// depends on control dependency: [if], data = [none]
if (sessions==null || sessions.isEmpty()) {
map.remove(topic);
// depends on control dependency: [if], data = [none]
}
}
return getNumberSubscribers(topic);
} }
|
public class class_name {
public static Object getRealTarget(Object target) {
if (target instanceof ProxyTarget) {
return ((ProxyTarget) target).getTarget();
}
return target;
} }
|
public class class_name {
public static Object getRealTarget(Object target) {
if (target instanceof ProxyTarget) {
return ((ProxyTarget) target).getTarget(); // depends on control dependency: [if], data = [none]
}
return target;
} }
|
public class class_name {
public String convertArrayClassName(String className,
int bracketIndex) {
String dimensions = "";
String brackets = className.substring(bracketIndex).trim();
char[] chars = brackets.toCharArray();
for (int i = 0; i < chars.length; i++) {
if (chars[i] == '[') {
dimensions = dimensions + '[';
}
}
String arrayType = className.substring(0, bracketIndex).trim();
char prefixChar = 'L';
Class<?> clazz = cPrimativeClasses.get(arrayType);
if (clazz != null) {
arrayType = "";
if (clazz == boolean.class) {
prefixChar = 'Z';
}
else if (clazz == char.class) {
prefixChar = 'C';
}
else if (clazz == byte.class) {
prefixChar = 'B';
}
else if (clazz == short.class) {
prefixChar = 'S';
}
else if (clazz == int.class) {
prefixChar = 'I';
}
else if (clazz == float.class) {
prefixChar = 'F';
}
else if (clazz == double.class) {
prefixChar = 'D';
}
else if (clazz == long.class) {
prefixChar = 'J';
}
else if (clazz == void.class) {
return null;
}
}
else {
arrayType = arrayType + ';';
}
return dimensions + prefixChar + arrayType;
} }
|
public class class_name {
public String convertArrayClassName(String className,
int bracketIndex) {
String dimensions = "";
String brackets = className.substring(bracketIndex).trim();
char[] chars = brackets.toCharArray();
for (int i = 0; i < chars.length; i++) {
if (chars[i] == '[') {
dimensions = dimensions + '['; // depends on control dependency: [if], data = [none]
}
}
String arrayType = className.substring(0, bracketIndex).trim();
char prefixChar = 'L';
Class<?> clazz = cPrimativeClasses.get(arrayType);
if (clazz != null) {
arrayType = ""; // depends on control dependency: [if], data = [none]
if (clazz == boolean.class) {
prefixChar = 'Z'; // depends on control dependency: [if], data = [none]
}
else if (clazz == char.class) {
prefixChar = 'C'; // depends on control dependency: [if], data = [none]
}
else if (clazz == byte.class) {
prefixChar = 'B'; // depends on control dependency: [if], data = [none]
}
else if (clazz == short.class) {
prefixChar = 'S'; // depends on control dependency: [if], data = [none]
}
else if (clazz == int.class) {
prefixChar = 'I'; // depends on control dependency: [if], data = [none]
}
else if (clazz == float.class) {
prefixChar = 'F'; // depends on control dependency: [if], data = [none]
}
else if (clazz == double.class) {
prefixChar = 'D'; // depends on control dependency: [if], data = [none]
}
else if (clazz == long.class) {
prefixChar = 'J'; // depends on control dependency: [if], data = [none]
}
else if (clazz == void.class) {
return null; // depends on control dependency: [if], data = [none]
}
}
else {
arrayType = arrayType + ';'; // depends on control dependency: [if], data = [none]
}
return dimensions + prefixChar + arrayType;
} }
|
public class class_name {
public java.util.List<String> getTaskDefinitionArns() {
if (taskDefinitionArns == null) {
taskDefinitionArns = new com.amazonaws.internal.SdkInternalList<String>();
}
return taskDefinitionArns;
} }
|
public class class_name {
public java.util.List<String> getTaskDefinitionArns() {
if (taskDefinitionArns == null) {
taskDefinitionArns = new com.amazonaws.internal.SdkInternalList<String>(); // depends on control dependency: [if], data = [none]
}
return taskDefinitionArns;
} }
|
public class class_name {
public static RuntimeFieldFactory<?> getFieldFactory(Class<?> clazz,
IdStrategy strategy)
{
if (strategy.isDelegateRegistered(clazz))
return DELEGATE;
final RuntimeFieldFactory<?> inline = __inlineValues.get(clazz
.getName());
if (inline != null)
return inline;
if (Message.class.isAssignableFrom(clazz))
return POJO;
if (clazz.isEnum())
return ENUM;
// Of all the scalar (inline) fields, java.lang.Number is the only
// abstract
// super type, hence we can filter it here
// Note that it has 10 built-in subtypes
if (clazz.isArray() || Object.class == clazz || Number.class == clazz
|| Class.class == clazz || Enum.class == clazz
|| Throwable.class.isAssignableFrom(clazz))
{
return OBJECT;
}
if (strategy.isRegistered(clazz))
return clazz.isInterface() ? POJO : POLYMORPHIC_POJO;
if (Map.class.isAssignableFrom(clazz))
return RuntimeMapFieldFactory.MAP;
if (Collection.class.isAssignableFrom(clazz))
{
// repeated fields.
return COLLECTION;
}
// Enums or boxed types of primitives do implement interfaces.
// Although serializing polymorphic pojos declared as interfaces will be
// a
// little bit slower than before, this is more correct.
//
// In versions prior to 1.0.5, it would serialize a field declared as
// java.lang.Serializable like a polymorphic pojo even though it
// gets assigned enum/string/number types.
//
// If you have declared fields as serializable, it wont be compatible
if (clazz.isInterface())
return OBJECT;
// checks delegated to POLYMORPHIC_POJO
return POLYMORPHIC_POJO;
} }
|
public class class_name {
public static RuntimeFieldFactory<?> getFieldFactory(Class<?> clazz,
IdStrategy strategy)
{
if (strategy.isDelegateRegistered(clazz))
return DELEGATE;
final RuntimeFieldFactory<?> inline = __inlineValues.get(clazz
.getName());
if (inline != null)
return inline;
if (Message.class.isAssignableFrom(clazz))
return POJO;
if (clazz.isEnum())
return ENUM;
// Of all the scalar (inline) fields, java.lang.Number is the only
// abstract
// super type, hence we can filter it here
// Note that it has 10 built-in subtypes
if (clazz.isArray() || Object.class == clazz || Number.class == clazz
|| Class.class == clazz || Enum.class == clazz
|| Throwable.class.isAssignableFrom(clazz))
{
return OBJECT;
// depends on control dependency: [if], data = [none]
}
if (strategy.isRegistered(clazz))
return clazz.isInterface() ? POJO : POLYMORPHIC_POJO;
if (Map.class.isAssignableFrom(clazz))
return RuntimeMapFieldFactory.MAP;
if (Collection.class.isAssignableFrom(clazz))
{
// repeated fields.
return COLLECTION;
// depends on control dependency: [if], data = [none]
}
// Enums or boxed types of primitives do implement interfaces.
// Although serializing polymorphic pojos declared as interfaces will be
// a
// little bit slower than before, this is more correct.
//
// In versions prior to 1.0.5, it would serialize a field declared as
// java.lang.Serializable like a polymorphic pojo even though it
// gets assigned enum/string/number types.
//
// If you have declared fields as serializable, it wont be compatible
if (clazz.isInterface())
return OBJECT;
// checks delegated to POLYMORPHIC_POJO
return POLYMORPHIC_POJO;
} }
|
public class class_name {
public <T extends View> boolean waitForView(final Class<T> viewClass, final int index, boolean sleep, boolean scroll){
Set<T> uniqueViews = new HashSet<T>();
boolean foundMatchingView;
while(true){
if(sleep)
sleeper.sleep();
foundMatchingView = searcher.searchFor(uniqueViews, viewClass, index);
if(foundMatchingView)
return true;
if(scroll && !scroller.scrollDown())
return false;
if(!scroll)
return false;
}
} }
|
public class class_name {
public <T extends View> boolean waitForView(final Class<T> viewClass, final int index, boolean sleep, boolean scroll){
Set<T> uniqueViews = new HashSet<T>();
boolean foundMatchingView;
while(true){
if(sleep)
sleeper.sleep();
foundMatchingView = searcher.searchFor(uniqueViews, viewClass, index); // depends on control dependency: [while], data = [none]
if(foundMatchingView)
return true;
if(scroll && !scroller.scrollDown())
return false;
if(!scroll)
return false;
}
} }
|
public class class_name {
public ListMetricsRequest withDimensions(DimensionFilter... dimensions) {
if (this.dimensions == null) {
setDimensions(new com.amazonaws.internal.SdkInternalList<DimensionFilter>(dimensions.length));
}
for (DimensionFilter ele : dimensions) {
this.dimensions.add(ele);
}
return this;
} }
|
public class class_name {
public ListMetricsRequest withDimensions(DimensionFilter... dimensions) {
if (this.dimensions == null) {
setDimensions(new com.amazonaws.internal.SdkInternalList<DimensionFilter>(dimensions.length)); // depends on control dependency: [if], data = [none]
}
for (DimensionFilter ele : dimensions) {
this.dimensions.add(ele); // depends on control dependency: [for], data = [ele]
}
return this;
} }
|
public class class_name {
public void initializeSitemapTab() {
String siteRoot = m_controller.getPreselectOption(
m_controller.getStartSiteRoot(),
m_controller.getSitemapSiteSelectorOptions());
getTab().setSortSelectBoxValue(siteRoot, true);
m_controller.getDefaultScope();
if (siteRoot == null) {
siteRoot = m_controller.getDefaultSitemapTabSiteRoot();
}
m_siteRoot = siteRoot;
getSubEntries(siteRoot, true, new I_CmsSimpleCallback<List<CmsSitemapEntryBean>>() {
public void execute(List<CmsSitemapEntryBean> result) {
getTab().fillDefault(result);
getTab().onContentChange();
}
});
} }
|
public class class_name {
public void initializeSitemapTab() {
String siteRoot = m_controller.getPreselectOption(
m_controller.getStartSiteRoot(),
m_controller.getSitemapSiteSelectorOptions());
getTab().setSortSelectBoxValue(siteRoot, true);
m_controller.getDefaultScope();
if (siteRoot == null) {
siteRoot = m_controller.getDefaultSitemapTabSiteRoot();
// depends on control dependency: [if], data = [none]
}
m_siteRoot = siteRoot;
getSubEntries(siteRoot, true, new I_CmsSimpleCallback<List<CmsSitemapEntryBean>>() {
public void execute(List<CmsSitemapEntryBean> result) {
getTab().fillDefault(result);
getTab().onContentChange();
}
});
} }
|
public class class_name {
ModelNode toModelNode() {
ModelNode result = null;
if (map != null) {
result = new ModelNode();
for (Map.Entry<PathAddress, ResourceData> entry : map.entrySet()) {
ModelNode item = new ModelNode();
PathAddress pa = entry.getKey();
item.get(ABSOLUTE_ADDRESS).set(pa.toModelNode());
ResourceData rd = entry.getValue();
item.get(RELATIVE_ADDRESS).set(pa.subAddress(baseAddressLength).toModelNode());
ModelNode attrs = new ModelNode().setEmptyList();
if (rd.attributes != null) {
for (String attr : rd.attributes) {
attrs.add(attr);
}
}
if (attrs.asInt() > 0) {
item.get(FILTERED_ATTRIBUTES).set(attrs);
}
ModelNode children = new ModelNode().setEmptyList();
if (rd.children != null) {
for (PathElement pe : rd.children) {
children.add(new Property(pe.getKey(), new ModelNode(pe.getValue())));
}
}
if (children.asInt() > 0) {
item.get(UNREADABLE_CHILDREN).set(children);
}
ModelNode childTypes = new ModelNode().setEmptyList();
if (rd.childTypes != null) {
Set<String> added = new HashSet<String>();
for (PathElement pe : rd.childTypes) {
if (added.add(pe.getKey())) {
childTypes.add(pe.getKey());
}
}
}
if (childTypes.asInt() > 0) {
item.get(FILTERED_CHILDREN_TYPES).set(childTypes);
}
result.add(item);
}
}
return result;
} }
|
public class class_name {
ModelNode toModelNode() {
ModelNode result = null;
if (map != null) {
result = new ModelNode(); // depends on control dependency: [if], data = [none]
for (Map.Entry<PathAddress, ResourceData> entry : map.entrySet()) {
ModelNode item = new ModelNode();
PathAddress pa = entry.getKey();
item.get(ABSOLUTE_ADDRESS).set(pa.toModelNode()); // depends on control dependency: [for], data = [none]
ResourceData rd = entry.getValue();
item.get(RELATIVE_ADDRESS).set(pa.subAddress(baseAddressLength).toModelNode()); // depends on control dependency: [for], data = [none]
ModelNode attrs = new ModelNode().setEmptyList();
if (rd.attributes != null) {
for (String attr : rd.attributes) {
attrs.add(attr); // depends on control dependency: [for], data = [attr]
}
}
if (attrs.asInt() > 0) {
item.get(FILTERED_ATTRIBUTES).set(attrs); // depends on control dependency: [if], data = [none]
}
ModelNode children = new ModelNode().setEmptyList();
if (rd.children != null) {
for (PathElement pe : rd.children) {
children.add(new Property(pe.getKey(), new ModelNode(pe.getValue()))); // depends on control dependency: [for], data = [pe]
}
}
if (children.asInt() > 0) {
item.get(UNREADABLE_CHILDREN).set(children); // depends on control dependency: [if], data = [none]
}
ModelNode childTypes = new ModelNode().setEmptyList();
if (rd.childTypes != null) {
Set<String> added = new HashSet<String>();
for (PathElement pe : rd.childTypes) {
if (added.add(pe.getKey())) {
childTypes.add(pe.getKey()); // depends on control dependency: [if], data = [none]
}
}
}
if (childTypes.asInt() > 0) {
item.get(FILTERED_CHILDREN_TYPES).set(childTypes); // depends on control dependency: [if], data = [none]
}
result.add(item); // depends on control dependency: [for], data = [none]
}
}
return result;
} }
|
public class class_name {
public SeleniumAssert hasAtLeast(Integer size) {
if (actual instanceof List) {
Integers.instance().assertGreaterThan(info, ((List<WebElement>) actual).size(), size);
} else if (actual instanceof PreviousWebElements) {
Integers.instance().assertGreaterThan(info, ((PreviousWebElements) actual).getPreviousWebElements().size(), size);
}
return this;
} }
|
public class class_name {
public SeleniumAssert hasAtLeast(Integer size) {
if (actual instanceof List) {
Integers.instance().assertGreaterThan(info, ((List<WebElement>) actual).size(), size); // depends on control dependency: [if], data = [none]
} else if (actual instanceof PreviousWebElements) {
Integers.instance().assertGreaterThan(info, ((PreviousWebElements) actual).getPreviousWebElements().size(), size); // depends on control dependency: [if], data = [none]
}
return this;
} }
|
public class class_name {
public void init() {
String fileName = null;
try {
fileName = System.getProperty(SYSTEM_PROPERTY);
if (fileName == null) {
LOG.info("User file configuration not provided, reading default file.");
readConfiguration(getClass().getResourceAsStream(DEFAULT_FILE_NAME));
} else {
try {
FileInputStream stream = new FileInputStream(fileName);
LOG.info("Reading configuration file: " + fileName);
readConfiguration(stream);
} catch (FileNotFoundException fnfe) {
LOG.info("Error using user provided configuration file, reading default file.");
readConfiguration(getClass().getResourceAsStream(DEFAULT_FILE_NAME));
}
}
} catch (IOException ioe) {
LOG.error("Error reading provided " + fileName + " file");
}
} }
|
public class class_name {
public void init() {
String fileName = null;
try {
fileName = System.getProperty(SYSTEM_PROPERTY); // depends on control dependency: [try], data = [none]
if (fileName == null) {
LOG.info("User file configuration not provided, reading default file."); // depends on control dependency: [if], data = [none]
readConfiguration(getClass().getResourceAsStream(DEFAULT_FILE_NAME)); // depends on control dependency: [if], data = [none]
} else {
try {
FileInputStream stream = new FileInputStream(fileName);
LOG.info("Reading configuration file: " + fileName); // depends on control dependency: [try], data = [none]
readConfiguration(stream); // depends on control dependency: [try], data = [none]
} catch (FileNotFoundException fnfe) {
LOG.info("Error using user provided configuration file, reading default file.");
readConfiguration(getClass().getResourceAsStream(DEFAULT_FILE_NAME));
} // depends on control dependency: [catch], data = [none]
}
} catch (IOException ioe) {
LOG.error("Error reading provided " + fileName + " file");
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
public void setInitialClusters(List<? extends Cluster<? extends MeanModel>> initialMeans) {
double[][] vecs = new double[initialMeans.size()][];
for(int i = 0; i < vecs.length; i++) {
vecs[i] = initialMeans.get(i).getModel().getMean();
}
this.initialMeans = vecs;
} }
|
public class class_name {
public void setInitialClusters(List<? extends Cluster<? extends MeanModel>> initialMeans) {
double[][] vecs = new double[initialMeans.size()][];
for(int i = 0; i < vecs.length; i++) {
vecs[i] = initialMeans.get(i).getModel().getMean(); // depends on control dependency: [for], data = [i]
}
this.initialMeans = vecs;
} }
|
public class class_name {
public Assignments cluster(Matrix matrix, int numClusters,
Method clusterMethod,
Criterion criterionMethod) {
try {
String clmethod = clusterMethod.getClutoName();
String crtmethod = criterionMethod.getClutoName();
return ClutoWrapper.cluster(matrix, clmethod,
crtmethod, numClusters);
} catch (IOException ioe) {
throw new IOError(ioe);
}
} }
|
public class class_name {
public Assignments cluster(Matrix matrix, int numClusters,
Method clusterMethod,
Criterion criterionMethod) {
try {
String clmethod = clusterMethod.getClutoName();
String crtmethod = criterionMethod.getClutoName();
return ClutoWrapper.cluster(matrix, clmethod,
crtmethod, numClusters); // depends on control dependency: [try], data = [none]
} catch (IOException ioe) {
throw new IOError(ioe);
} // depends on control dependency: [catch], data = [none]
} }
|
public class class_name {
public static IMolecularFormula getMaxOccurrenceElements(IMolecularFormulaSet mfSet) {
IMolecularFormula molecularFormula = mfSet.getBuilder().newInstance(IMolecularFormula.class);
for (IMolecularFormula mf : mfSet.molecularFormulas()) {
for (IIsotope isotope : mf.isotopes()) {
IElement element = mfSet.getBuilder().newInstance(IElement.class, isotope);
int occur_new = MolecularFormulaManipulator.getElementCount(mf, element);
if (!MolecularFormulaManipulator.containsElement(molecularFormula, element)) {
molecularFormula.addIsotope(mfSet.getBuilder().newInstance(IIsotope.class, element), occur_new);
} else {
int occur_old = MolecularFormulaManipulator.getElementCount(molecularFormula, element);
if (occur_new > occur_old) {
MolecularFormulaManipulator.removeElement(molecularFormula, element);
molecularFormula.addIsotope(mfSet.getBuilder().newInstance(IIsotope.class, element), occur_new);
}
}
}
}
return molecularFormula;
} }
|
public class class_name {
public static IMolecularFormula getMaxOccurrenceElements(IMolecularFormulaSet mfSet) {
IMolecularFormula molecularFormula = mfSet.getBuilder().newInstance(IMolecularFormula.class);
for (IMolecularFormula mf : mfSet.molecularFormulas()) {
for (IIsotope isotope : mf.isotopes()) {
IElement element = mfSet.getBuilder().newInstance(IElement.class, isotope);
int occur_new = MolecularFormulaManipulator.getElementCount(mf, element);
if (!MolecularFormulaManipulator.containsElement(molecularFormula, element)) {
molecularFormula.addIsotope(mfSet.getBuilder().newInstance(IIsotope.class, element), occur_new); // depends on control dependency: [if], data = [none]
} else {
int occur_old = MolecularFormulaManipulator.getElementCount(molecularFormula, element);
if (occur_new > occur_old) {
MolecularFormulaManipulator.removeElement(molecularFormula, element); // depends on control dependency: [if], data = [none]
molecularFormula.addIsotope(mfSet.getBuilder().newInstance(IIsotope.class, element), occur_new); // depends on control dependency: [if], data = [none]
}
}
}
}
return molecularFormula;
} }
|
public class class_name {
@Override
public MutableCapabilities merge(Capabilities extraCapabilities) {
if (extraCapabilities == null) {
return this;
}
extraCapabilities.asMap().forEach(this::setCapability);
return this;
} }
|
public class class_name {
@Override
public MutableCapabilities merge(Capabilities extraCapabilities) {
if (extraCapabilities == null) {
return this; // depends on control dependency: [if], data = [none]
}
extraCapabilities.asMap().forEach(this::setCapability);
return this;
} }
|
public class class_name {
private I_CmsListDateRestriction parseFromToday(CmsXmlContentValueLocation dateRestriction) {
CmsXmlContentValueLocation location = dateRestriction.getSubValue(N_FROM_TODAY);
if (location == null) {
return null;
}
CmsXmlContentValueLocation countLoc = location.getSubValue(N_COUNT);
CmsXmlContentValueLocation unitLoc = location.getSubValue(N_UNIT);
CmsXmlContentValueLocation directionLoc = location.getSubValue(N_DIRECTION);
TimeDirection direction = parseDirection(directionLoc);
Integer count = parsePositiveNumber(countLoc);
TimeUnit unit = parseUnit(unitLoc);
if (count == null) {
return null;
}
return new CmsListDateFromTodayRestriction(count.intValue(), unit, direction);
} }
|
public class class_name {
private I_CmsListDateRestriction parseFromToday(CmsXmlContentValueLocation dateRestriction) {
CmsXmlContentValueLocation location = dateRestriction.getSubValue(N_FROM_TODAY);
if (location == null) {
return null; // depends on control dependency: [if], data = [none]
}
CmsXmlContentValueLocation countLoc = location.getSubValue(N_COUNT);
CmsXmlContentValueLocation unitLoc = location.getSubValue(N_UNIT);
CmsXmlContentValueLocation directionLoc = location.getSubValue(N_DIRECTION);
TimeDirection direction = parseDirection(directionLoc);
Integer count = parsePositiveNumber(countLoc);
TimeUnit unit = parseUnit(unitLoc);
if (count == null) {
return null; // depends on control dependency: [if], data = [none]
}
return new CmsListDateFromTodayRestriction(count.intValue(), unit, direction);
} }
|
public class class_name {
public static boolean contains(Pattern pattern, CharSequence content) {
if (null == pattern || null == content) {
return false;
}
return pattern.matcher(content).find();
} }
|
public class class_name {
public static boolean contains(Pattern pattern, CharSequence content) {
if (null == pattern || null == content) {
return false;
// depends on control dependency: [if], data = [none]
}
return pattern.matcher(content).find();
} }
|
public class class_name {
public boolean isResult() {
if (StringUtils.isNotBlank(serverResponse)) {
try {
return fromJson.castTo(Result.class) != null;
} catch (Exception e) {
log.warn("isResult: exception occurred - {}", e);
}
}
return false;
} }
|
public class class_name {
public boolean isResult() {
if (StringUtils.isNotBlank(serverResponse)) {
try {
return fromJson.castTo(Result.class) != null; // depends on control dependency: [try], data = [none]
} catch (Exception e) {
log.warn("isResult: exception occurred - {}", e);
} // depends on control dependency: [catch], data = [none]
}
return false;
} }
|
public class class_name {
private void updateBounds()
{
if (npoints >= MIN_POINTS)
{
double boundsMinX = Double.MAX_VALUE;
double boundsMinY = Double.MAX_VALUE;
double boundsMaxX = -Double.MAX_VALUE;
double boundsMaxY = -Double.MAX_VALUE;
for (int i = 0; i < npoints; i++)
{
final double x = xpoints[i];
boundsMinX = Math.min(boundsMinX, x);
boundsMaxX = Math.max(boundsMaxX, x);
final double y = ypoints[i];
boundsMinY = Math.min(boundsMinY, y);
boundsMaxY = Math.max(boundsMaxY, y);
}
bounds.set(boundsMinX, boundsMinY, boundsMaxX - boundsMinX, boundsMaxY - boundsMinY);
}
} }
|
public class class_name {
private void updateBounds()
{
if (npoints >= MIN_POINTS)
{
double boundsMinX = Double.MAX_VALUE;
double boundsMinY = Double.MAX_VALUE;
double boundsMaxX = -Double.MAX_VALUE;
double boundsMaxY = -Double.MAX_VALUE;
for (int i = 0; i < npoints; i++)
{
final double x = xpoints[i];
boundsMinX = Math.min(boundsMinX, x);
// depends on control dependency: [for], data = [none]
boundsMaxX = Math.max(boundsMaxX, x);
// depends on control dependency: [for], data = [none]
final double y = ypoints[i];
boundsMinY = Math.min(boundsMinY, y);
// depends on control dependency: [for], data = [none]
boundsMaxY = Math.max(boundsMaxY, y);
// depends on control dependency: [for], data = [none]
}
bounds.set(boundsMinX, boundsMinY, boundsMaxX - boundsMinX, boundsMaxY - boundsMinY);
// depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
private void addCommands() {
boolean dividerRequired = false;
if (creationEnabled) {
boolean newGroupEnabled = isNewGroupEnabled();
if (newGroupEnabled) {
this.addCommand(view.i18nNewItem(getGroupLiteral()), this::newGroup);
dividerRequired = true;
}
boolean newDividerEnabled = isNewDividerEnabled();
if (newDividerEnabled) {
this.addCommand(view.i18nNewItem(getDividerLiteral()), this::newDivider);
dividerRequired = true;
}
boolean newPerspectiveEnabled = isNewPerspectiveEnabled();
if (newPerspectiveEnabled) {
this.addCommand(view.i18nNewItem(getPerspectiveLiteral()), this::newPerspective);
dividerRequired = true;
}
}
if (moveUpEnabled || moveDownEnabled) {
if (dividerRequired) {
view.addCommandDivider();
}
dividerRequired = true;
if (moveUpEnabled) {
this.addCommand(view.i18nMoveFirst(), this::moveFirstCommand);
this.addCommand(view.i18nMoveUp(), this::moveUpCommand);
}
if (moveDownEnabled) {
this.addCommand(view.i18nMoveDown(), this::moveDownCommand);
this.addCommand(view.i18nMoveLast(), this::moveLastCommand);
}
}
if (isGotoPerspectiveEnabled()) {
if (dividerRequired) {
view.addCommandDivider();
}
dividerRequired = true;
this.addCommand(view.i18nGotoItem(getPerspectiveLiteral()), this::gotoPerspectiveCommand);
}
} }
|
public class class_name {
private void addCommands() {
boolean dividerRequired = false;
if (creationEnabled) {
boolean newGroupEnabled = isNewGroupEnabled();
if (newGroupEnabled) {
this.addCommand(view.i18nNewItem(getGroupLiteral()), this::newGroup); // depends on control dependency: [if], data = [none]
dividerRequired = true; // depends on control dependency: [if], data = [none]
}
boolean newDividerEnabled = isNewDividerEnabled();
if (newDividerEnabled) {
this.addCommand(view.i18nNewItem(getDividerLiteral()), this::newDivider); // depends on control dependency: [if], data = [none]
dividerRequired = true; // depends on control dependency: [if], data = [none]
}
boolean newPerspectiveEnabled = isNewPerspectiveEnabled();
if (newPerspectiveEnabled) {
this.addCommand(view.i18nNewItem(getPerspectiveLiteral()), this::newPerspective); // depends on control dependency: [if], data = [none]
dividerRequired = true; // depends on control dependency: [if], data = [none]
}
}
if (moveUpEnabled || moveDownEnabled) {
if (dividerRequired) {
view.addCommandDivider(); // depends on control dependency: [if], data = [none]
}
dividerRequired = true; // depends on control dependency: [if], data = [none]
if (moveUpEnabled) {
this.addCommand(view.i18nMoveFirst(), this::moveFirstCommand); // depends on control dependency: [if], data = [none]
this.addCommand(view.i18nMoveUp(), this::moveUpCommand); // depends on control dependency: [if], data = [none]
}
if (moveDownEnabled) {
this.addCommand(view.i18nMoveDown(), this::moveDownCommand); // depends on control dependency: [if], data = [none]
this.addCommand(view.i18nMoveLast(), this::moveLastCommand); // depends on control dependency: [if], data = [none]
}
}
if (isGotoPerspectiveEnabled()) {
if (dividerRequired) {
view.addCommandDivider(); // depends on control dependency: [if], data = [none]
}
dividerRequired = true; // depends on control dependency: [if], data = [none]
this.addCommand(view.i18nGotoItem(getPerspectiveLiteral()), this::gotoPerspectiveCommand); // depends on control dependency: [if], data = [none]
}
} }
|
public class class_name {
private static String getUsername(String url) {
int atIndex = url.lastIndexOf(USERNAME_INDICATOR);
if (atIndex < 0) {
return null;
}
String username = url.substring(0, atIndex + 1);
int slashIndex = username.lastIndexOf('/');
if (slashIndex > 0) {
username = username.substring(slashIndex + 1);
}
return username;
} }
|
public class class_name {
private static String getUsername(String url) {
int atIndex = url.lastIndexOf(USERNAME_INDICATOR);
if (atIndex < 0) {
return null; // depends on control dependency: [if], data = [none]
}
String username = url.substring(0, atIndex + 1);
int slashIndex = username.lastIndexOf('/');
if (slashIndex > 0) {
username = username.substring(slashIndex + 1); // depends on control dependency: [if], data = [(slashIndex]
}
return username;
} }
|
public class class_name {
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack();
nameOfThisClass = SignatureUtils.getNonAnonymousPortion(classContext.getJavaClass().getClassName());
formatterLoggers = new HashSet<>();
super.visitClassContext(classContext);
} finally {
formatterLoggers = null;
stack = null;
}
} }
|
public class class_name {
@Override
public void visitClassContext(ClassContext classContext) {
try {
stack = new OpcodeStack(); // depends on control dependency: [try], data = [none]
nameOfThisClass = SignatureUtils.getNonAnonymousPortion(classContext.getJavaClass().getClassName()); // depends on control dependency: [try], data = [none]
formatterLoggers = new HashSet<>(); // depends on control dependency: [try], data = [none]
super.visitClassContext(classContext); // depends on control dependency: [try], data = [none]
} finally {
formatterLoggers = null;
stack = null;
}
} }
|
public class class_name {
private static int[] compressedSizes(List formSpecs,
int totalSize, int totalMinSize, int totalPrefSize,
int[] minSizes, int[] prefSizes) {
// If we have less space than the total min size, answer the min sizes.
if (totalSize < totalMinSize) {
return minSizes;
}
// If we have more space than the total pref size, answer the pref sizes.
if (totalSize >= totalPrefSize) {
return prefSizes;
}
int count = formSpecs.size();
int[] sizes = new int[count];
double totalCompressionSpace = totalPrefSize - totalSize;
double maxCompressionSpace = totalPrefSize - totalMinSize;
double compressionFactor = totalCompressionSpace / maxCompressionSpace;
// System.out.println("Total compression space=" + totalCompressionSpace);
// System.out.println("Max compression space =" + maxCompressionSpace);
// System.out.println("Compression factor =" + compressionFactor);
for (int i = 0; i < count; i++) {
FormSpec formSpec = (FormSpec) formSpecs.get(i);
sizes[i] = prefSizes[i];
if (formSpec.getSize().compressible()) {
sizes[i] -= (int) Math.round((prefSizes[i] - minSizes[i])
* compressionFactor);
}
}
return sizes;
} }
|
public class class_name {
private static int[] compressedSizes(List formSpecs,
int totalSize, int totalMinSize, int totalPrefSize,
int[] minSizes, int[] prefSizes) {
// If we have less space than the total min size, answer the min sizes.
if (totalSize < totalMinSize) {
return minSizes; // depends on control dependency: [if], data = [none]
}
// If we have more space than the total pref size, answer the pref sizes.
if (totalSize >= totalPrefSize) {
return prefSizes; // depends on control dependency: [if], data = [none]
}
int count = formSpecs.size();
int[] sizes = new int[count];
double totalCompressionSpace = totalPrefSize - totalSize;
double maxCompressionSpace = totalPrefSize - totalMinSize;
double compressionFactor = totalCompressionSpace / maxCompressionSpace;
// System.out.println("Total compression space=" + totalCompressionSpace);
// System.out.println("Max compression space =" + maxCompressionSpace);
// System.out.println("Compression factor =" + compressionFactor);
for (int i = 0; i < count; i++) {
FormSpec formSpec = (FormSpec) formSpecs.get(i);
sizes[i] = prefSizes[i]; // depends on control dependency: [for], data = [i]
if (formSpec.getSize().compressible()) {
sizes[i] -= (int) Math.round((prefSizes[i] - minSizes[i])
* compressionFactor); // depends on control dependency: [if], data = [none]
}
}
return sizes;
} }
|
public class class_name {
public final Mono<T> timeout(Duration timeout, @Nullable Mono<? extends T> fallback,
Scheduler timer) {
final Mono<Long> _timer = Mono.delay(timeout, timer).onErrorReturn(0L);
if(fallback == null) {
return onAssembly(new MonoTimeout<>(this, _timer, timeout.toMillis() + "ms"));
}
return onAssembly(new MonoTimeout<>(this, _timer, fallback));
} }
|
public class class_name {
public final Mono<T> timeout(Duration timeout, @Nullable Mono<? extends T> fallback,
Scheduler timer) {
final Mono<Long> _timer = Mono.delay(timeout, timer).onErrorReturn(0L);
if(fallback == null) {
return onAssembly(new MonoTimeout<>(this, _timer, timeout.toMillis() + "ms")); // depends on control dependency: [if], data = [none]
}
return onAssembly(new MonoTimeout<>(this, _timer, fallback));
} }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.