code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
public static void logReadTaskOutOfMemoryError(final Logger logger,
final Task<Diff> task, final OutOfMemoryError e)
{
if (task != null) {
logger.logError(Level.WARN, "Error while reading a task: "
+ task.toString(), e);
}
else {
logger.logError(Level.WARN,
"Error w... | public class class_name {
public static void logReadTaskOutOfMemoryError(final Logger logger,
final Task<Diff> task, final OutOfMemoryError e)
{
if (task != null) {
logger.logError(Level.WARN, "Error while reading a task: "
+ task.toString(), e); // depends on control dependency: [if], data = [none]
}... |
public class class_name {
protected final void initializeSystemConfiguration() {
try {
attemptSystemConfiguration();
} catch (IOException e) {
// Can't recover from this
final String err = SYSCFG_READ_FAILURE;
throw new BELRuntimeException(err, ExitCode.U... | public class class_name {
protected final void initializeSystemConfiguration() {
try {
attemptSystemConfiguration(); // depends on control dependency: [try], data = [none]
} catch (IOException e) {
// Can't recover from this
final String err = SYSCFG_READ_FAILURE;
... |
public class class_name {
public void configureLabel(JLabel label) {
Assert.notNull(label, "label");
label.setText(this.text);
label.setDisplayedMnemonic(getMnemonic());
if (getMnemonicIndex() >= -1) {
label.setDisplayedMnemonicIndex(getMnemonicIndex());
}
} ... | public class class_name {
public void configureLabel(JLabel label) {
Assert.notNull(label, "label");
label.setText(this.text);
label.setDisplayedMnemonic(getMnemonic());
if (getMnemonicIndex() >= -1) {
label.setDisplayedMnemonicIndex(getMnemonicIndex()); // depends on con... |
public class class_name {
protected void prepareForLoginPage(final RequestContext context) {
val currentService = WebUtils.getService(context);
val service = authenticationRequestServiceSelectionStrategies.resolveService(currentService, WebApplicationService.class);
val request = WebUtils.getH... | public class class_name {
protected void prepareForLoginPage(final RequestContext context) {
val currentService = WebUtils.getService(context);
val service = authenticationRequestServiceSelectionStrategies.resolveService(currentService, WebApplicationService.class);
val request = WebUtils.getH... |
public class class_name {
private long doMemoryManagementAndPerFrameCallbacks() {
long currentTime = GVRTime.getCurrentTime();
mFrameTime = (currentTime - mPreviousTimeNanos) / 1e9f;
mPreviousTimeNanos = currentTime;
/*
* Without the sensor data, can't draw a scene properly.
... | public class class_name {
private long doMemoryManagementAndPerFrameCallbacks() {
long currentTime = GVRTime.getCurrentTime();
mFrameTime = (currentTime - mPreviousTimeNanos) / 1e9f;
mPreviousTimeNanos = currentTime;
/*
* Without the sensor data, can't draw a scene properly.
... |
public class class_name {
public final EObject ruleXTypeLiteral() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_2=null;
Token otherlv_5=null;
AntlrDatatypeRuleToken lv_arrayDimensions_4_0 = null;
enterRule();
try ... | public class class_name {
public final EObject ruleXTypeLiteral() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_2=null;
Token otherlv_5=null;
AntlrDatatypeRuleToken lv_arrayDimensions_4_0 = null;
enterRule();
try ... |
public class class_name {
public static void createToken(Controller controller, String tokenName, int secondsOfTimeOut) {
if (tokenCache == null) {
String tokenId = String.valueOf(random.nextLong());
controller.setAttr(tokenName, tokenId);
controller.setSessionAttr(tokenName, tokenId);
createTokenHi... | public class class_name {
public static void createToken(Controller controller, String tokenName, int secondsOfTimeOut) {
if (tokenCache == null) {
String tokenId = String.valueOf(random.nextLong());
controller.setAttr(tokenName, tokenId);
// depends on control dependency: [if], data = [none]
controller... |
public class class_name {
public void setAlbum(String newAlbum)
{
if (newAlbum.length() > ALBUM_SIZE)
{
album = newAlbum.substring(0, ALBUM_SIZE);
}
else
{
album = newAlbum;
}
} } | public class class_name {
public void setAlbum(String newAlbum)
{
if (newAlbum.length() > ALBUM_SIZE)
{
album = newAlbum.substring(0, ALBUM_SIZE); // depends on control dependency: [if], data = [ALBUM_SIZE)]
}
else
{
album = newAlbum; // depends on control dependency: [if], data = [none]
}
} } |
public class class_name {
public Optional<Server> chooseRandomlyAfterFiltering(List<Server> servers) {
List<Server> eligible = getEligibleServers(servers);
if (eligible.size() == 0) {
return Optional.absent();
}
return Optional.of(eligible.get(random.nextInt(eligible.size())... | public class class_name {
public Optional<Server> chooseRandomlyAfterFiltering(List<Server> servers) {
List<Server> eligible = getEligibleServers(servers);
if (eligible.size() == 0) {
return Optional.absent(); // depends on control dependency: [if], data = [none]
}
return Op... |
public class class_name {
public static List<String> getServiceUrlsFromDNS(EurekaClientConfig clientConfig, String instanceZone, boolean preferSameZone, ServiceUrlRandomizer randomizer) {
String region = getRegion(clientConfig);
// Get zone-specific DNS names for the given region so that we can get a
... | public class class_name {
public static List<String> getServiceUrlsFromDNS(EurekaClientConfig clientConfig, String instanceZone, boolean preferSameZone, ServiceUrlRandomizer randomizer) {
String region = getRegion(clientConfig);
// Get zone-specific DNS names for the given region so that we can get a
... |
public class class_name {
public static void main(final String[] args) {
CowsayCli.addCowthinkOption();
String cowsay = say(args);
if (cowsay != null && cowsay.length() > 0) {
System.out.println(cowsay);
}
} } | public class class_name {
public static void main(final String[] args) {
CowsayCli.addCowthinkOption();
String cowsay = say(args);
if (cowsay != null && cowsay.length() > 0) {
System.out.println(cowsay); // depends on control dependency: [if], data = [(cowsay]
}
} } |
public class class_name {
public void setPreferences(OperaPreferences newPreferences) {
if (!(newPreferences instanceof OperaFilePreferences)) {
OperaFilePreferences convertedPreferences = new OperaFilePreferences(preferenceFile);
convertedPreferences.merge(newPreferences);
preferences = converte... | public class class_name {
public void setPreferences(OperaPreferences newPreferences) {
if (!(newPreferences instanceof OperaFilePreferences)) {
OperaFilePreferences convertedPreferences = new OperaFilePreferences(preferenceFile);
convertedPreferences.merge(newPreferences); // depends on control depend... |
public class class_name {
public int count(final String word) {
if (word == null) {
throw new NullPointerException("the word parameter was null.");
} else if (word.length() == 0) {
return 0;
} else if (word.length() == 1) {
return 1;
}
final ... | public class class_name {
public int count(final String word) {
if (word == null) {
throw new NullPointerException("the word parameter was null.");
} else if (word.length() == 0) {
return 0; // depends on control dependency: [if], data = [none]
} else if (word.length() =... |
public class class_name {
private String writeEmulatorStartScriptWindows() throws MojoExecutionException
{
String filename = SCRIPT_FOLDER + "\\android-maven-plugin-emulator-start.vbs";
File file = new File( filename );
PrintWriter writer = null;
try
{
writer =... | public class class_name {
private String writeEmulatorStartScriptWindows() throws MojoExecutionException
{
String filename = SCRIPT_FOLDER + "\\android-maven-plugin-emulator-start.vbs";
File file = new File( filename );
PrintWriter writer = null;
try
{
writer =... |
public class class_name {
public CalendarWeek minus(Weeks weeks) {
if (weeks.isEmpty()) {
return this;
}
PlainDate date = this.start.getTemporal().minus(weeks.getAmount(), CalendarUnit.WEEKS);
int y = date.getInt(YEAR_OF_WEEKDATE);
int w = date.getInt(WEEK_OF_YEAR)... | public class class_name {
public CalendarWeek minus(Weeks weeks) {
if (weeks.isEmpty()) {
return this; // depends on control dependency: [if], data = [none]
}
PlainDate date = this.start.getTemporal().minus(weeks.getAmount(), CalendarUnit.WEEKS);
int y = date.getInt(YEAR_O... |
public class class_name {
private CompletableFuture<Void> establishConnection(PravegaNodeUri location, FlowHandler handler) {
final Bootstrap b = getNettyBootstrap().handler(getChannelInitializer(location, handler));
// Initiate Connection.
final CompletableFuture<Void> connectionComplete = n... | public class class_name {
private CompletableFuture<Void> establishConnection(PravegaNodeUri location, FlowHandler handler) {
final Bootstrap b = getNettyBootstrap().handler(getChannelInitializer(location, handler));
// Initiate Connection.
final CompletableFuture<Void> connectionComplete = n... |
public class class_name {
public void unlock() {
for (Locale l : m_lockedBundleFiles.keySet()) {
LockedFile f = m_lockedBundleFiles.get(l);
f.tryUnlock();
}
if (null != m_descFile) {
m_descFile.tryUnlock();
}
} } | public class class_name {
public void unlock() {
for (Locale l : m_lockedBundleFiles.keySet()) {
LockedFile f = m_lockedBundleFiles.get(l);
f.tryUnlock(); // depends on control dependency: [for], data = [l]
}
if (null != m_descFile) {
m_descFile.tryUnlock();... |
public class class_name {
public void pullUpTo(Phase phase)
{
// get
if (!phase.contains(GET))
{
return;
}
T targetValue = target.getValue();
// validate-post-get
if (!phase.contains(VALIDATE_POST_GET))
{
return;
}
Collection<V> oldViolations = new ArrayList<V>(violations);
... | public class class_name {
public void pullUpTo(Phase phase)
{
// get
if (!phase.contains(GET))
{
return; // depends on control dependency: [if], data = [none]
}
T targetValue = target.getValue();
// validate-post-get
if (!phase.contains(VALIDATE_POST_GET))
{
return; // depends on con... |
public class class_name {
public void serve() throws IOException {
ServerSocket serverSocket = new ServerSocket(port);
while (true) {
try {
final Socket socket = serverSocket.accept();
Thread thread = new Thread("EnvServerSocketHandler") {
... | public class class_name {
public void serve() throws IOException {
ServerSocket serverSocket = new ServerSocket(port);
while (true) {
try {
final Socket socket = serverSocket.accept();
Thread thread = new Thread("EnvServerSocketHandler") {
... |
public class class_name {
public String getStringArgument(String argument) {
if (line != null && line.hasOption(argument)) {
return line.getOptionValue(argument);
}
return null;
} } | public class class_name {
public String getStringArgument(String argument) {
if (line != null && line.hasOption(argument)) {
return line.getOptionValue(argument); // depends on control dependency: [if], data = [none]
}
return null;
} } |
public class class_name {
protected void addSlideItem(final VBox vbox, final SlideItem item) {
Node node = null;
if (item.isLink()) {
final Hyperlink link = HyperlinkBuilder.create()
.opacity(1.0)
... | public class class_name {
protected void addSlideItem(final VBox vbox, final SlideItem item) {
Node node = null;
if (item.isLink()) {
final Hyperlink link = HyperlinkBuilder.create()
.opacity(1.0)
... |
public class class_name {
public void showAlertEditDialog(Alert alert) {
if (dialogAlertAdd == null || !dialogAlertAdd.isVisible()) {
dialogAlertAdd = new AlertAddDialog(getView().getMainFrame(), false);
dialogAlertAdd.setVisible(true);
dialogAlertAdd.setAlert(alert);
... | public class class_name {
public void showAlertEditDialog(Alert alert) {
if (dialogAlertAdd == null || !dialogAlertAdd.isVisible()) {
dialogAlertAdd = new AlertAddDialog(getView().getMainFrame(), false);
// depends on control dependency: [if], data = [none]
dialogAlertAdd.setVisible(... |
public class class_name {
private void postcheckMappingConditions(MtasParserObject object,
List<Map<String, String>> mappingConditions,
Map<String, List<MtasParserObject>> currentList)
throws MtasParserException {
precheckMappingConditions(object, mappingConditions, currentList);
for (Map<Str... | public class class_name {
private void postcheckMappingConditions(MtasParserObject object,
List<Map<String, String>> mappingConditions,
Map<String, List<MtasParserObject>> currentList)
throws MtasParserException {
precheckMappingConditions(object, mappingConditions, currentList);
for (Map<Str... |
public class class_name {
@Override
public Object getDisplayValue(final String object)
{
final String splitString = "=>";
final String[] splittedValue = object.split(splitString);
final StringBuilder sb = new StringBuilder();
if (splittedValue.length == 1)
{
final IModel<String> resourceModel = ... | public class class_name {
@Override
public Object getDisplayValue(final String object)
{
final String splitString = "=>";
final String[] splittedValue = object.split(splitString);
final StringBuilder sb = new StringBuilder();
if (splittedValue.length == 1)
{
final IModel<String> resourceModel = ... |
public class class_name {
@Override
public DataBuffer getVectorCoordinates() {
int idx;
if (isRowVector()) {
idx = 1;
} else if (isColumnVector()) {
idx = 0;
} else {
throw new UnsupportedOperationException();
}
// FIXME: int cast... | public class class_name {
@Override
public DataBuffer getVectorCoordinates() {
int idx;
if (isRowVector()) {
idx = 1; // depends on control dependency: [if], data = [none]
} else if (isColumnVector()) {
idx = 0; // depends on control dependency: [if], data = [none]
... |
public class class_name {
private void updateDts() {
double dt = 0.1;
ArrayList<Double> u = new ArrayList<Double>();
ArrayList<Double> s = new ArrayList<Double>();
//u = u + a * dt;
//s = s + u * dt;
s.add(0.0);
u.add(0.0);
double totDistance = 0.0;
for (int i = 1; i < dts.length; i++) {
Coordinat... | public class class_name {
private void updateDts() {
double dt = 0.1;
ArrayList<Double> u = new ArrayList<Double>();
ArrayList<Double> s = new ArrayList<Double>();
//u = u + a * dt;
//s = s + u * dt;
s.add(0.0);
u.add(0.0);
double totDistance = 0.0;
for (int i = 1; i < dts.length; i++) {
Coordinat... |
public class class_name {
private static <T> T coerceObject(String value) {
T result;
//try boolean first
if ("true".equals(value) || "false".equals(value)) {
result = (T) (Boolean) Boolean.parseBoolean(value);
}
//then float numbers
else if (floatPattern.mat... | public class class_name {
private static <T> T coerceObject(String value) {
T result;
//try boolean first
if ("true".equals(value) || "false".equals(value)) {
result = (T) (Boolean) Boolean.parseBoolean(value); // depends on control dependency: [if], data = [none]
}
... |
public class class_name {
protected static String urlEncode(String value, boolean path) {
try {
value = URLEncoder.encode(value, DEFAULT_ENCODING);
} catch (Exception e) {
throw wrap(e);
}
value = replaceAll(value, plusPtn, "%20");
value = replaceAll(valu... | public class class_name {
protected static String urlEncode(String value, boolean path) {
try {
value = URLEncoder.encode(value, DEFAULT_ENCODING); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
throw wrap(e);
} // depends on control depen... |
public class class_name {
public ListSubscribedWorkteamsResult withSubscribedWorkteams(SubscribedWorkteam... subscribedWorkteams) {
if (this.subscribedWorkteams == null) {
setSubscribedWorkteams(new java.util.ArrayList<SubscribedWorkteam>(subscribedWorkteams.length));
}
for (Subscri... | public class class_name {
public ListSubscribedWorkteamsResult withSubscribedWorkteams(SubscribedWorkteam... subscribedWorkteams) {
if (this.subscribedWorkteams == null) {
setSubscribedWorkteams(new java.util.ArrayList<SubscribedWorkteam>(subscribedWorkteams.length)); // depends on control dependen... |
public class class_name {
public boolean removeLastOccurrence(Object o) {
Objects.requireNonNull(o);
for (Node<E> p = last(); p != null; p = pred(p)) {
final E item;
if ((item = p.item) != null
&& o.equals(item)
&& ITEM.compareAndSet(p, item, null... | public class class_name {
public boolean removeLastOccurrence(Object o) {
Objects.requireNonNull(o);
for (Node<E> p = last(); p != null; p = pred(p)) {
final E item;
if ((item = p.item) != null
&& o.equals(item)
&& ITEM.compareAndSet(p, item, null... |
public class class_name {
@Override
public <D, F, P> Promise<D, F, P> when(Promise<D, F, P> promise) {
if (promise instanceof AndroidDeferredObject) {
return promise;
}
return new AndroidDeferredObject<D, F, P>(promise).promise();
} } | public class class_name {
@Override
public <D, F, P> Promise<D, F, P> when(Promise<D, F, P> promise) {
if (promise instanceof AndroidDeferredObject) {
return promise; // depends on control dependency: [if], data = [none]
}
return new AndroidDeferredObject<D, F, P>(promise).promise();
} } |
public class class_name {
public NamespaceNotification getNamespaceNotification()
throws IOException {
FSEditLogOp op = null;
NamespaceNotification notification = null;
// Keep looping until we reach an operation that can be
// considered a notification.
while (true) {
if (LOG.isDe... | public class class_name {
public NamespaceNotification getNamespaceNotification()
throws IOException {
FSEditLogOp op = null;
NamespaceNotification notification = null;
// Keep looping until we reach an operation that can be
// considered a notification.
while (true) {
if (LOG.isDe... |
public class class_name {
public static @Nonnull Logger getLogger(@Nonnull Class type) {
if (ENABLE_CLASS_LOADER_LOGGING) {
return LoggerFactory.getLogger(type);
} else {
return NOPLogger.NOP_LOGGER;
}
} } | public class class_name {
public static @Nonnull Logger getLogger(@Nonnull Class type) {
if (ENABLE_CLASS_LOADER_LOGGING) {
return LoggerFactory.getLogger(type); // depends on control dependency: [if], data = [none]
} else {
return NOPLogger.NOP_LOGGER; // depends on control dep... |
public class class_name {
public void setProcessors(java.util.Collection<Processor> processors) {
if (processors == null) {
this.processors = null;
return;
}
this.processors = new java.util.ArrayList<Processor>(processors);
} } | public class class_name {
public void setProcessors(java.util.Collection<Processor> processors) {
if (processors == null) {
this.processors = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
}
this... |
public class class_name {
public static ITextProcessor wrap(final ITextProcessor processor, final IProcessorDialect dialect) {
Validate.notNull(dialect, "Dialect cannot be null");
if (processor == null) {
return null;
}
return new TextProcessorWrapper(processor, dialect);
... | public class class_name {
public static ITextProcessor wrap(final ITextProcessor processor, final IProcessorDialect dialect) {
Validate.notNull(dialect, "Dialect cannot be null");
if (processor == null) {
return null; // depends on control dependency: [if], data = [none]
}
r... |
public class class_name {
public IPersonAttributesGroupDefinition getPagsDefinitionByName(IPerson person, String name) {
IPersonAttributesGroupDefinition rslt = getPagsGroupDefByName(name);
if (rslt == null) {
// Better to produce exception? I'm thinking not, but open-minded.
r... | public class class_name {
public IPersonAttributesGroupDefinition getPagsDefinitionByName(IPerson person, String name) {
IPersonAttributesGroupDefinition rslt = getPagsGroupDefByName(name);
if (rslt == null) {
// Better to produce exception? I'm thinking not, but open-minded.
r... |
public class class_name {
protected final ByteBuf copyAndCompose(ByteBufAllocator alloc, ByteBuf cumulation, ByteBuf next) {
ByteBuf newCumulation = alloc.ioBuffer(cumulation.readableBytes() + next.readableBytes());
try {
newCumulation.writeBytes(cumulation).writeBytes(next);
} catc... | public class class_name {
protected final ByteBuf copyAndCompose(ByteBufAllocator alloc, ByteBuf cumulation, ByteBuf next) {
ByteBuf newCumulation = alloc.ioBuffer(cumulation.readableBytes() + next.readableBytes());
try {
newCumulation.writeBytes(cumulation).writeBytes(next); // depends on ... |
public class class_name {
private void unloadSpectraConditionally(NavigableMap<Integer, IScan> scansInSubsetByNumber,
LCMSDataSubset subset, Set<LCMSDataSubset> exlude) {
boolean isOkToUnload;
for (IScan scan : scansInSubsetByNumber.values()) {
if (subset.isInSubset(scan)) {
isOkToUnload = ... | public class class_name {
private void unloadSpectraConditionally(NavigableMap<Integer, IScan> scansInSubsetByNumber,
LCMSDataSubset subset, Set<LCMSDataSubset> exlude) {
boolean isOkToUnload;
for (IScan scan : scansInSubsetByNumber.values()) {
if (subset.isInSubset(scan)) {
isOkToUnload = ... |
public class class_name {
void section(int nclusters)
{
if (size() < nclusters)
return;
sectioned_clusters_ = new ArrayList<Cluster<K>>(nclusters);
List<Document> centroids = new ArrayList<Document>(nclusters);
// choose_randomly(nclusters, centroids);
choose_sm... | public class class_name {
void section(int nclusters)
{
if (size() < nclusters)
return;
sectioned_clusters_ = new ArrayList<Cluster<K>>(nclusters);
List<Document> centroids = new ArrayList<Document>(nclusters);
// choose_randomly(nclusters, centroids);
choose_sm... |
public class class_name {
public static void main(String[] args) throws InterruptedException {
StringBuilder errbuf = new StringBuilder();
try {
PcapIf pcapIf = pcapIf(errbuf);
Pcap.Builder builder = new Pcap.Builder()
.source(pcapIf.getName())
... | public class class_name {
public static void main(String[] args) throws InterruptedException {
StringBuilder errbuf = new StringBuilder();
try {
PcapIf pcapIf = pcapIf(errbuf);
Pcap.Builder builder = new Pcap.Builder()
.source(pcapIf.getName())
... |
public class class_name {
private int inOrderAnalyse(StructuralNode node) {
int subtreeNodes = 0;
if (isStop) {
return 0;
}
if (node == null) {
return 0;
}
// analyse entity if not root and not leaf.
// Leaf is not analysed ... | public class class_name {
private int inOrderAnalyse(StructuralNode node) {
int subtreeNodes = 0;
if (isStop) {
return 0;
// depends on control dependency: [if], data = [none]
}
if (node == null) {
return 0;
// depends on control dependency: [if], data... |
public class class_name {
private ParseTree parseMemberExpressionNoNew() {
SourcePosition start = getTreeStartLocation();
ParseTree operand;
if (peekAsyncFunctionStart()) {
operand = parseAsyncFunctionExpression();
} else if (peekFunction()) {
operand = parseFunctionExpression();
} else... | public class class_name {
private ParseTree parseMemberExpressionNoNew() {
SourcePosition start = getTreeStartLocation();
ParseTree operand;
if (peekAsyncFunctionStart()) {
operand = parseAsyncFunctionExpression(); // depends on control dependency: [if], data = [none]
} else if (peekFunction()) {... |
public class class_name {
@Override
public INDArray linspace(int lower, int upper, int num) {
double[] data = new double[num];
for (int i = 0; i < num; i++) {
double t = (double) i / (num - 1);
data[i] = lower * (1 - t) + t * upper;
}
//edge case for scalar... | public class class_name {
@Override
public INDArray linspace(int lower, int upper, int num) {
double[] data = new double[num];
for (int i = 0; i < num; i++) {
double t = (double) i / (num - 1);
data[i] = lower * (1 - t) + t * upper; // depends on control dependency: [for], d... |
public class class_name {
private void ensureBuiltInDefaultQPContainsRules(DbSession dbSession) {
Map<String, RulesProfileDto> rulesProfilesByLanguage = dbClient.qualityProfileDao().selectBuiltInRuleProfilesWithActiveRules(dbSession).stream()
.collect(toMap(RulesProfileDto::getLanguage, Function.identity(), ... | public class class_name {
private void ensureBuiltInDefaultQPContainsRules(DbSession dbSession) {
Map<String, RulesProfileDto> rulesProfilesByLanguage = dbClient.qualityProfileDao().selectBuiltInRuleProfilesWithActiveRules(dbSession).stream()
.collect(toMap(RulesProfileDto::getLanguage, Function.identity(), ... |
public class class_name {
private void removePropertyStrings(Service s) {
String type = s.getType();
String algorithm = s.getAlgorithm();
// use super() to avoid permission check and other processing
super.remove(type + "." + algorithm);
for (String alias : s.getAliases()) {
... | public class class_name {
private void removePropertyStrings(Service s) {
String type = s.getType();
String algorithm = s.getAlgorithm();
// use super() to avoid permission check and other processing
super.remove(type + "." + algorithm);
for (String alias : s.getAliases()) {
... |
public class class_name {
@Controller(next = "askWhetherToRepeat")
public void askTimeForMeeting(WebSocketSession session, Event event) {
if (event.getText().contains("yes")) {
reply(session, event, "Okay. Would you like me to set a reminder for you?");
nextConversation(event); /... | public class class_name {
@Controller(next = "askWhetherToRepeat")
public void askTimeForMeeting(WebSocketSession session, Event event) {
if (event.getText().contains("yes")) {
reply(session, event, "Okay. Would you like me to set a reminder for you?"); // depends on control dependency: [if], d... |
public class class_name {
public EasyJaSubDictionaryEntry getEntry(String word) {
if (word == null || word.length() == 0) {
throw new RuntimeException("Invalid word");
}
EasyJaSubTrie.Value<EasyJaSubDictionaryEntry> value = trie
.get(new CharacterIterator(word));
if (value == null) {
return null;
}... | public class class_name {
public EasyJaSubDictionaryEntry getEntry(String word) {
if (word == null || word.length() == 0) {
throw new RuntimeException("Invalid word");
}
EasyJaSubTrie.Value<EasyJaSubDictionaryEntry> value = trie
.get(new CharacterIterator(word));
if (value == null) {
return null; // ... |
public class class_name {
public static <T> void bindExtras(T target, Intent intent) {
@SuppressWarnings("unchecked")
IntentBinding<T> binding = (IntentBinding<T>) getIntentBinding(target.getClass().getClassLoader(), target.getClass());
if (binding != null) {
binding.bindExtras(targ... | public class class_name {
public static <T> void bindExtras(T target, Intent intent) {
@SuppressWarnings("unchecked")
IntentBinding<T> binding = (IntentBinding<T>) getIntentBinding(target.getClass().getClassLoader(), target.getClass());
if (binding != null) {
binding.bindExtras(targ... |
public class class_name {
private int readTypeAnnotationTarget(final Context context, final int typeAnnotationOffset) {
int currentOffset = typeAnnotationOffset;
// Parse and store the target_type structure.
int targetType = readInt(typeAnnotationOffset);
switch (targetType >>> 24) {
case TypeRef... | public class class_name {
private int readTypeAnnotationTarget(final Context context, final int typeAnnotationOffset) {
int currentOffset = typeAnnotationOffset;
// Parse and store the target_type structure.
int targetType = readInt(typeAnnotationOffset);
switch (targetType >>> 24) {
case TypeRef... |
public class class_name {
private <T> ImmutableList<Case<T>> compactCases(ImmutableList<Case<T>> cases, T defaultCaseSpec) {
// Determine the fallback/other case value.
ImmutableList<SoyMsgPart> defaultValue = null;
for (Case<T> caseAndValue : cases) {
if (Objects.equals(caseAndValue.spec(), defaultC... | public class class_name {
private <T> ImmutableList<Case<T>> compactCases(ImmutableList<Case<T>> cases, T defaultCaseSpec) {
// Determine the fallback/other case value.
ImmutableList<SoyMsgPart> defaultValue = null;
for (Case<T> caseAndValue : cases) {
if (Objects.equals(caseAndValue.spec(), defaultC... |
public class class_name {
public static void createNewFile(@NonNull final File file, final boolean overwrite)
throws IOException {
Condition.INSTANCE.ensureNotNull(file, "The file may not be null");
boolean result = file.createNewFile();
if (!result) {
if (overwrite) {
... | public class class_name {
public static void createNewFile(@NonNull final File file, final boolean overwrite)
throws IOException {
Condition.INSTANCE.ensureNotNull(file, "The file may not be null");
boolean result = file.createNewFile();
if (!result) {
if (overwrite) {
... |
public class class_name {
public static void downloadFile(URL url, File destination) throws IOException {
int count = 0;
int maxTries = 10;
int timeout = 60000; //60 sec
File tempFile = File.createTempFile(getFilePrefix(destination), "." + getFileExtension(destination));
// Took following recipe from stack... | public class class_name {
public static void downloadFile(URL url, File destination) throws IOException {
int count = 0;
int maxTries = 10;
int timeout = 60000; //60 sec
File tempFile = File.createTempFile(getFilePrefix(destination), "." + getFileExtension(destination));
// Took following recipe from stack... |
public class class_name {
public int compare(Alternative ab) {
if (production != ab.production) {
throw new IllegalArgumentException();
}
// TODO: compare two ups
if (resultOfs != -1 || ab.resultOfs != -1) {
return NE;
}
if (argsOfs.size() == 0 &&... | public class class_name {
public int compare(Alternative ab) {
if (production != ab.production) {
throw new IllegalArgumentException();
}
// TODO: compare two ups
if (resultOfs != -1 || ab.resultOfs != -1) {
return NE; // depends on control dependency: [if], data... |
public class class_name {
private void markPendingInitialization(JvmDeclaredTypeImplCustom type) {
type.setPendingInitialization(true);
for (JvmMember member : type.basicGetMembers()) {
if (member instanceof JvmDeclaredTypeImplCustom) {
markPendingInitialization((JvmDeclaredTypeImplCustom) member);
}
}... | public class class_name {
private void markPendingInitialization(JvmDeclaredTypeImplCustom type) {
type.setPendingInitialization(true);
for (JvmMember member : type.basicGetMembers()) {
if (member instanceof JvmDeclaredTypeImplCustom) {
markPendingInitialization((JvmDeclaredTypeImplCustom) member); // depen... |
public class class_name {
protected void updateClassnames(HashMap<String,List<String>> list, String superclass, List<String> names) {
if (!list.containsKey(superclass)) {
list.put(superclass, names);
}
else {
for (String name: names) {
if (!list.get(superclass).contains(name))
... | public class class_name {
protected void updateClassnames(HashMap<String,List<String>> list, String superclass, List<String> names) {
if (!list.containsKey(superclass)) {
list.put(superclass, names); // depends on control dependency: [if], data = [none]
}
else {
for (String name: names) {
... |
public class class_name {
public static MeterValue valueOf(String value) {
if (isNumber(value)) {
return new MeterValue(Long.parseLong(value));
}
return new MeterValue(durationConverter.convert(value));
} } | public class class_name {
public static MeterValue valueOf(String value) {
if (isNumber(value)) {
return new MeterValue(Long.parseLong(value)); // depends on control dependency: [if], data = [none]
}
return new MeterValue(durationConverter.convert(value));
} } |
public class class_name {
@InterfaceAudience.Public
public boolean isDeleted() {
try {
return getCurrentRevision() == null && getLeafRevisions().size() > 0;
} catch (CouchbaseLiteException e) {
throw new RuntimeException(e);
}
} } | public class class_name {
@InterfaceAudience.Public
public boolean isDeleted() {
try {
return getCurrentRevision() == null && getLeafRevisions().size() > 0; // depends on control dependency: [try], data = [none]
} catch (CouchbaseLiteException e) {
throw new RuntimeException... |
public class class_name {
public static int getNCNameSuffixIndex(CharSequence s) {
// identify bnode labels and do not try to split them
if (s.length() > 1 && s.charAt(0) == '_' && s.charAt(1) == ':') {
return -1;
}
int index = -1;
for (int i = s.length() - 1; i > -1... | public class class_name {
public static int getNCNameSuffixIndex(CharSequence s) {
// identify bnode labels and do not try to split them
if (s.length() > 1 && s.charAt(0) == '_' && s.charAt(1) == ':') {
return -1; // depends on control dependency: [if], data = [none]
}
int i... |
public class class_name {
public void marshall(SetCognitoEventsRequest setCognitoEventsRequest, ProtocolMarshaller protocolMarshaller) {
if (setCognitoEventsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... | public class class_name {
public void marshall(SetCognitoEventsRequest setCognitoEventsRequest, ProtocolMarshaller protocolMarshaller) {
if (setCognitoEventsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... |
public class class_name {
public java.util.List<LoadBalancerDescription> getLoadBalancerDescriptions() {
if (loadBalancerDescriptions == null) {
loadBalancerDescriptions = new com.amazonaws.internal.SdkInternalList<LoadBalancerDescription>();
}
return loadBalancerDescriptions;
}... | public class class_name {
public java.util.List<LoadBalancerDescription> getLoadBalancerDescriptions() {
if (loadBalancerDescriptions == null) {
loadBalancerDescriptions = new com.amazonaws.internal.SdkInternalList<LoadBalancerDescription>(); // depends on control dependency: [if], data = [none]
... |
public class class_name {
public static <T> T getValueOfCertainColumnOfCertainRecord(String sql, Object... arg) {
List<T> list = DBUtils.getValueOfCertainColumnOfAllRecord(sql, arg);
if (list.isEmpty()) {
return null;
}
return list.get(0);
} } | public class class_name {
public static <T> T getValueOfCertainColumnOfCertainRecord(String sql, Object... arg) {
List<T> list = DBUtils.getValueOfCertainColumnOfAllRecord(sql, arg);
if (list.isEmpty()) {
return null; // depends on control dependency: [if], data = [none]
}
r... |
public class class_name {
static BaseDoubleColumnValueSelector makeColumnValueSelectorWithDoubleDefault(
final ColumnSelectorFactory metricFactory,
final ExprMacroTable macroTable,
@Nullable final String fieldName,
@Nullable final String fieldExpression,
final double nullValue
)
{
... | public class class_name {
static BaseDoubleColumnValueSelector makeColumnValueSelectorWithDoubleDefault(
final ColumnSelectorFactory metricFactory,
final ExprMacroTable macroTable,
@Nullable final String fieldName,
@Nullable final String fieldExpression,
final double nullValue
)
{
... |
public class class_name {
public void switchToFrameAccordingToAnnotationParams(Method annotatedMethod) {
RequireSwitchingToFrame annotation = getAnnotationData(annotatedMethod);
int frameIndex = annotation.index();
LocatorType locatorType = annotation.locatorType();
String locatorValue... | public class class_name {
public void switchToFrameAccordingToAnnotationParams(Method annotatedMethod) {
RequireSwitchingToFrame annotation = getAnnotationData(annotatedMethod);
int frameIndex = annotation.index();
LocatorType locatorType = annotation.locatorType();
String locatorValue... |
public class class_name {
public Record openHeaderRecord()
{
if (m_recHeader == null)
{
Record record = this.getMainRecord();
try {
m_recHeader = (Record)record.clone(); // Do not add to screen's list - will mix with other file
} catch (CloneNot... | public class class_name {
public Record openHeaderRecord()
{
if (m_recHeader == null)
{
Record record = this.getMainRecord();
try {
m_recHeader = (Record)record.clone(); // Do not add to screen's list - will mix with other file // depends on control depende... |
public class class_name {
public synchronized void notifySSLConfigChangeListener(String alias, String state) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "notifySSLConfigChangeListener", new Object[] { alias, state });
if (alias != null) {
Lis... | public class class_name {
public synchronized void notifySSLConfigChangeListener(String alias, String state) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "notifySSLConfigChangeListener", new Object[] { alias, state });
if (alias != null) {
Lis... |
public class class_name {
@Override
public void writeVectorObject(Vector<Object> vector) {
log.debug("writeVectorObject: {}", vector);
buf.put(AMF3.TYPE_VECTOR_OBJECT);
if (hasReference(vector)) {
putInteger(getReferenceId(vector) << 1);
return;
}
... | public class class_name {
@Override
public void writeVectorObject(Vector<Object> vector) {
log.debug("writeVectorObject: {}", vector);
buf.put(AMF3.TYPE_VECTOR_OBJECT);
if (hasReference(vector)) {
putInteger(getReferenceId(vector) << 1);
// depends on control dependency: [... |
public class class_name {
private Text parseText(Node el, Map<String, Scope> scopes) {
Text text;
if (nodeAttribute(el, TAG_VAR_ATTR_INHERIT, DEFAULT_INHERIT_VALUE)) {
text = new Text(
nodeAttribute(el, TAG_VAR_ATTR_NAME, Variable.DEFAULT_NAME),
null,... | public class class_name {
private Text parseText(Node el, Map<String, Scope> scopes) {
Text text;
if (nodeAttribute(el, TAG_VAR_ATTR_INHERIT, DEFAULT_INHERIT_VALUE)) {
text = new Text(
nodeAttribute(el, TAG_VAR_ATTR_NAME, Variable.DEFAULT_NAME),
null,... |
public class class_name {
String createDeletePreparedSQLStatement() {
final Set<String> primaryKeyColumnNameSet = getPrimaryColumnNames();
final StringGrabber sgSQL = new StringGrabber();
// Get the table name
final DBTable table = mModelClazz.getAnnotation(DBTable.class);
... | public class class_name {
String createDeletePreparedSQLStatement() {
final Set<String> primaryKeyColumnNameSet = getPrimaryColumnNames();
final StringGrabber sgSQL = new StringGrabber();
// Get the table name
final DBTable table = mModelClazz.getAnnotation(DBTable.class);
... |
public class class_name {
public void marshall(Resource resource, ProtocolMarshaller protocolMarshaller) {
if (resource == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(resource.getId(), ID_BINDING... | public class class_name {
public void marshall(Resource resource, ProtocolMarshaller protocolMarshaller) {
if (resource == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(resource.getId(), ID_BINDING... |
public class class_name {
public static PlanVersionSummaryBean unmarshallPlanVersionSummary(Map<String, Object> source) {
if (source == null) {
return null;
}
PlanVersionSummaryBean bean = new PlanVersionSummaryBean();
bean.setDescription(asString(source.get("planDescription... | public class class_name {
public static PlanVersionSummaryBean unmarshallPlanVersionSummary(Map<String, Object> source) {
if (source == null) {
return null; // depends on control dependency: [if], data = [none]
}
PlanVersionSummaryBean bean = new PlanVersionSummaryBean();
be... |
public class class_name {
@Override
public void dispose(final Session session) {
if (session != null && session.isConnected()) {
logger.trace("Disposing of hibernate session.");
session.close();
}
} } | public class class_name {
@Override
public void dispose(final Session session) {
if (session != null && session.isConnected()) {
logger.trace("Disposing of hibernate session."); // depends on control dependency: [if], data = [none]
session.close(); // depends on control dependency: ... |
public class class_name {
public static void displayVersion(final PrintWriter writer) {
for (String line : new VersionProvider().getVersion()) {
writer.println(line);
}
} } | public class class_name {
public static void displayVersion(final PrintWriter writer) {
for (String line : new VersionProvider().getVersion()) {
writer.println(line); // depends on control dependency: [for], data = [line]
}
} } |
public class class_name {
void precomputeAngles(D image) {
int savecIndex = 0;
for (int y = 0; y < image.height; y++) {
int pixelIndex = y*image.stride + image.startIndex;
for (int x = 0; x < image.width; x++, pixelIndex++, savecIndex++ ) {
float spacialDX = imageDerivX.getF(pixelIndex);
float spaci... | public class class_name {
void precomputeAngles(D image) {
int savecIndex = 0;
for (int y = 0; y < image.height; y++) {
int pixelIndex = y*image.stride + image.startIndex;
for (int x = 0; x < image.width; x++, pixelIndex++, savecIndex++ ) {
float spacialDX = imageDerivX.getF(pixelIndex);
float spaci... |
public class class_name {
@Nonnull
public final UnifiedResponse disableCaching ()
{
// Remove any eventually set headers
removeCaching ();
if (m_eHttpVersion.is10 ())
{
// Set to expire far in the past for HTTP/1.0.
m_aResponseHeaderMap.setHeader (CHttpHeader.EXPIRES, ResponseHelperSet... | public class class_name {
@Nonnull
public final UnifiedResponse disableCaching ()
{
// Remove any eventually set headers
removeCaching ();
if (m_eHttpVersion.is10 ())
{
// Set to expire far in the past for HTTP/1.0.
m_aResponseHeaderMap.setHeader (CHttpHeader.EXPIRES, ResponseHelperSet... |
public class class_name {
public <T> T[] notEmpty(final T[] array, final String message) {
if (array == null) {
failNull(message);
}
if (array.length == 0) {
fail(message);
}
return array;
} } | public class class_name {
public <T> T[] notEmpty(final T[] array, final String message) {
if (array == null) {
failNull(message); // depends on control dependency: [if], data = [none]
}
if (array.length == 0) {
fail(message); // depends on control dependency: [if], data... |
public class class_name {
public BoxComment.Info reply(String message) {
JsonObject itemJSON = new JsonObject();
itemJSON.add("type", "comment");
itemJSON.add("id", this.getID());
JsonObject requestJSON = new JsonObject();
requestJSON.add("item", itemJSON);
if (BoxComme... | public class class_name {
public BoxComment.Info reply(String message) {
JsonObject itemJSON = new JsonObject();
itemJSON.add("type", "comment");
itemJSON.add("id", this.getID());
JsonObject requestJSON = new JsonObject();
requestJSON.add("item", itemJSON);
if (BoxComme... |
public class class_name {
@Override
public Byte convert(final String valueStr, final boolean _caseSensitive, final Object target)
{
if (valueStr.length() == 1)
{
if (_caseSensitive)
return new Byte((byte) valueStr.charAt(0));
return new Byte((byte) valueS... | public class class_name {
@Override
public Byte convert(final String valueStr, final boolean _caseSensitive, final Object target)
{
if (valueStr.length() == 1)
{
if (_caseSensitive)
return new Byte((byte) valueStr.charAt(0));
return new Byte((byte) valueS... |
public class class_name {
void initialize(AbstractCompiler compiler) throws Exception {
checkState(
!Strings.isNullOrEmpty(templateJs),
"The template JS must be loaded before the scanner is used. "
+ "Make sure that the template file is not empty.");
Node scriptRoot = new JsAst(Sour... | public class class_name {
void initialize(AbstractCompiler compiler) throws Exception {
checkState(
!Strings.isNullOrEmpty(templateJs),
"The template JS must be loaded before the scanner is used. "
+ "Make sure that the template file is not empty.");
Node scriptRoot = new JsAst(Sour... |
public class class_name {
public NumberExpression<Integer> dayOfMonth() {
if (dayOfMonth == null) {
dayOfMonth = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.DAY_OF_MONTH, mixin);
}
return dayOfMonth;
} } | public class class_name {
public NumberExpression<Integer> dayOfMonth() {
if (dayOfMonth == null) {
dayOfMonth = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.DAY_OF_MONTH, mixin); // depends on control dependency: [if], data = [none]
}
return dayOfMonth;
} } |
public class class_name {
public short acceptNode(int n)
{
XPathContext xctxt = getXPathContext();
try
{
xctxt.pushCurrentNode(n);
for (int i = 0; i < m_nodeTests.length; i++)
{
PredicatedNodeTest pnt = m_nodeTests[i];
XObject score = pnt.execute(xctxt, n);
if (s... | public class class_name {
public short acceptNode(int n)
{
XPathContext xctxt = getXPathContext();
try
{
xctxt.pushCurrentNode(n); // depends on control dependency: [try], data = [none]
for (int i = 0; i < m_nodeTests.length; i++)
{
PredicatedNodeTest pnt = m_nodeTests[i];
... |
public class class_name {
public String login( String username, String password ) throws DebugWsException {
this.logger.finer( "Logging in as " + username );
WebResource path = this.resource.path( UrlConstants.AUTHENTICATION ).path( "e" );
ClientResponse response = path
.header( "u", username )
.hea... | public class class_name {
public String login( String username, String password ) throws DebugWsException {
this.logger.finer( "Logging in as " + username );
WebResource path = this.resource.path( UrlConstants.AUTHENTICATION ).path( "e" );
ClientResponse response = path
.header( "u", username )
.hea... |
public class class_name {
private void handleInputQueue() {
if (!addedQueue.isEmpty()) {
getLogger().debug("Handling queue");
Collection<MemcachedNode> toAdd = new HashSet<MemcachedNode>();
Collection<MemcachedNode> todo = new HashSet<MemcachedNode>();
MemcachedNode qaNode;
while ((q... | public class class_name {
private void handleInputQueue() {
if (!addedQueue.isEmpty()) {
getLogger().debug("Handling queue");
Collection<MemcachedNode> toAdd = new HashSet<MemcachedNode>();
Collection<MemcachedNode> todo = new HashSet<MemcachedNode>();
MemcachedNode qaNode;
while ((q... |
public class class_name {
@Nullable
static Drawable maybeWrapWithMatrix(
@Nullable Drawable drawable,
@Nullable Matrix matrix) {
if (drawable == null || matrix == null) {
return drawable;
}
return new MatrixDrawable(drawable, matrix);
} } | public class class_name {
@Nullable
static Drawable maybeWrapWithMatrix(
@Nullable Drawable drawable,
@Nullable Matrix matrix) {
if (drawable == null || matrix == null) {
return drawable; // depends on control dependency: [if], data = [none]
}
return new MatrixDrawable(drawable, matrix)... |
public class class_name {
List createAndExecuteQuery(CouchDBQueryInterpreter interpreter)
{
EntityMetadata m = interpreter.getMetadata();
List results = new ArrayList();
try
{
MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel... | public class class_name {
List createAndExecuteQuery(CouchDBQueryInterpreter interpreter)
{
EntityMetadata m = interpreter.getMetadata();
List results = new ArrayList();
try
{
MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel... |
public class class_name {
private void evaluateSubtreeReplacement() {
if (this.hypothesis.size() == 1) {
// skip replacement if only one node is discovered
return;
}
final Set<ReplacementResult<ADTState<I, O>, I, O>> potentialReplacements =
this.subtree... | public class class_name {
private void evaluateSubtreeReplacement() {
if (this.hypothesis.size() == 1) {
// skip replacement if only one node is discovered
return; // depends on control dependency: [if], data = [none]
}
final Set<ReplacementResult<ADTState<I, O>, I, O>... |
public class class_name {
private void addColumnMethodToCriteria(TopLevelClass topLevelClass, InnerClass innerClass, IntrospectedTable introspectedTable) {
// !!!!! Column import比较特殊引入的是外部类
topLevelClass.addImportedType(introspectedTable.getRules().calculateAllFieldsClass());
for (IntrospectedC... | public class class_name {
private void addColumnMethodToCriteria(TopLevelClass topLevelClass, InnerClass innerClass, IntrospectedTable introspectedTable) {
// !!!!! Column import比较特殊引入的是外部类
topLevelClass.addImportedType(introspectedTable.getRules().calculateAllFieldsClass());
for (IntrospectedC... |
public class class_name {
public static <T> ElementMatcher.Junction<T> noneOf(Iterable<?> values) {
ElementMatcher.Junction<T> matcher = null;
for (Object value : values) {
matcher = matcher == null
? ElementMatchers.<T>not(is(value))
: matcher.and(no... | public class class_name {
public static <T> ElementMatcher.Junction<T> noneOf(Iterable<?> values) {
ElementMatcher.Junction<T> matcher = null;
for (Object value : values) {
matcher = matcher == null
? ElementMatchers.<T>not(is(value))
: matcher.and(no... |
public class class_name {
@Override
public String getResourcePath(String requestedPath) {
String resourcePath = super.getResourcePath(requestedPath);
GeneratorMappingHelper helper = new GeneratorMappingHelper(resourcePath);
String fullPath = null;
if (StringUtils.isNotEmpty(helper.getBracketsParam())) {
//... | public class class_name {
@Override
public String getResourcePath(String requestedPath) {
String resourcePath = super.getResourcePath(requestedPath);
GeneratorMappingHelper helper = new GeneratorMappingHelper(resourcePath);
String fullPath = null;
if (StringUtils.isNotEmpty(helper.getBracketsParam())) {
//... |
public class class_name {
protected void validateMessageContent(Message receivedMessage, Message controlMessage, XmlMessageValidationContext validationContext,
TestContext context) {
if (controlMessage == null || controlMessage.getPayload() == null) {
log.debug("Skip message payload val... | public class class_name {
protected void validateMessageContent(Message receivedMessage, Message controlMessage, XmlMessageValidationContext validationContext,
TestContext context) {
if (controlMessage == null || controlMessage.getPayload() == null) {
log.debug("Skip message payload val... |
public class class_name {
public ApplicationUpdate withCloudWatchLoggingOptionUpdates(CloudWatchLoggingOptionUpdate... cloudWatchLoggingOptionUpdates) {
if (this.cloudWatchLoggingOptionUpdates == null) {
setCloudWatchLoggingOptionUpdates(new java.util.ArrayList<CloudWatchLoggingOptionUpdate>(cloudW... | public class class_name {
public ApplicationUpdate withCloudWatchLoggingOptionUpdates(CloudWatchLoggingOptionUpdate... cloudWatchLoggingOptionUpdates) {
if (this.cloudWatchLoggingOptionUpdates == null) {
setCloudWatchLoggingOptionUpdates(new java.util.ArrayList<CloudWatchLoggingOptionUpdate>(cloudW... |
public class class_name {
public Double getValue(GriddedTile griddedTile, int unsignedPixelValue) {
Double value = null;
if (!isDataNull(unsignedPixelValue)) {
value = pixelValueToValue(griddedTile, new Double(
unsignedPixelValue));
}
return value;
} } | public class class_name {
public Double getValue(GriddedTile griddedTile, int unsignedPixelValue) {
Double value = null;
if (!isDataNull(unsignedPixelValue)) {
value = pixelValueToValue(griddedTile, new Double(
unsignedPixelValue)); // depends on control dependency: [if], data = [none]
}
return value... |
public class class_name {
public static <T, R, E extends Exception> List<R> map(final Collection<? extends T> c, final int fromIndex, final int toIndex,
final Try.Function<? super T, ? extends R, E> func) throws E {
checkFromToIndex(fromIndex, toIndex, size(c));
N.checkArgNotNull(func);
... | public class class_name {
public static <T, R, E extends Exception> List<R> map(final Collection<? extends T> c, final int fromIndex, final int toIndex,
final Try.Function<? super T, ? extends R, E> func) throws E {
checkFromToIndex(fromIndex, toIndex, size(c));
N.checkArgNotNull(func);
... |
public class class_name {
private static String getHostnamesFromInstances(Iterable<TaskManagerLocation> locations) {
StringBuilder bld = new StringBuilder();
boolean successive = false;
for (TaskManagerLocation loc : locations) {
if (successive) {
bld.append(", ");
} else {
successive = true;
}... | public class class_name {
private static String getHostnamesFromInstances(Iterable<TaskManagerLocation> locations) {
StringBuilder bld = new StringBuilder();
boolean successive = false;
for (TaskManagerLocation loc : locations) {
if (successive) {
bld.append(", "); // depends on control dependency: [if],... |
public class class_name {
private void updateInfoButton() {
if (m_stateBean.getType().isUser()) {
Map<String, String> dataMap = new LinkedHashMap<String, String>();
dataMap.put(
CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_COUNT_0),
String.v... | public class class_name {
private void updateInfoButton() {
if (m_stateBean.getType().isUser()) {
Map<String, String> dataMap = new LinkedHashMap<String, String>();
dataMap.put(
CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_COUNT_0),
String.v... |
public class class_name {
public void setHeader(String name, String value) {
if (headers == null) {
headers = new HashMap<String, String>();
}
if (value != null) {
headers.put(name, value);
} else {
headers.remove(name);
}
} } | public class class_name {
public void setHeader(String name, String value) {
if (headers == null) {
headers = new HashMap<String, String>();
// depends on control dependency: [if], data = [none]
}
if (value != null) {
headers.put(name, value);
// depends on control dependency: [if], data = [none]
}... |
public class class_name {
@Override
public List<Form> getFormDescendants(
Long electronicFormIdParam,
boolean includeFieldDataParam,
boolean includeTableFieldsParam,
boolean includeTableFieldFormRecordInfoParam) {
if(electronicFormIdParam == null)
{
return null;
}
List<Long> electronicFormIds... | public class class_name {
@Override
public List<Form> getFormDescendants(
Long electronicFormIdParam,
boolean includeFieldDataParam,
boolean includeTableFieldsParam,
boolean includeTableFieldFormRecordInfoParam) {
if(electronicFormIdParam == null)
{
return null; // depends on control dependency: [... |
public class class_name {
@Override
public void actionCommit() {
List<Throwable> errors = new ArrayList<Throwable>();
try {
// if new create it first
if (!m_searchManager.getSearchIndexesAll().contains(m_index)) {
// check the index name for invalid charac... | public class class_name {
@Override
public void actionCommit() {
List<Throwable> errors = new ArrayList<Throwable>();
try {
// if new create it first
if (!m_searchManager.getSearchIndexesAll().contains(m_index)) {
// check the index name for invalid charac... |
public class class_name {
@NotNull
public List<SxGeoResult> getList(@NotNull String ip) {
if (!IPV4_COMMA_SEPARATED_PATTERN.matcher(ip).matches()) {
throw new IllegalArgumentException("Illegal IP address or list: " + ip);
}
clientQueriesCount++;
List<SxGeoResult> cachedR... | public class class_name {
@NotNull
public List<SxGeoResult> getList(@NotNull String ip) {
if (!IPV4_COMMA_SEPARATED_PATTERN.matcher(ip).matches()) {
throw new IllegalArgumentException("Illegal IP address or list: " + ip);
}
clientQueriesCount++;
List<SxGeoResult> cachedR... |
public class class_name {
private static CmsWorkplaceSettings getWorkplaceSettings(CmsObject cms, HttpSession session) {
CmsWorkplaceSettings settings = (CmsWorkplaceSettings)session.getAttribute(
CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS);
if (settings == null) {
settings... | public class class_name {
private static CmsWorkplaceSettings getWorkplaceSettings(CmsObject cms, HttpSession session) {
CmsWorkplaceSettings settings = (CmsWorkplaceSettings)session.getAttribute(
CmsWorkplaceManager.SESSION_WORKPLACE_SETTINGS);
if (settings == null) {
settings... |
public class class_name {
public static int getWhiteSpaceLineStartAfter( String script, int end )
{
int endLine = getLineEnd( script, end );
if( endLine < script.length() - 1 )
{
int nextLineStart = endLine + 1;
int nextLineEnd = getLineEnd( script, nextLineStart );
boolean whitespace =... | public class class_name {
public static int getWhiteSpaceLineStartAfter( String script, int end )
{
int endLine = getLineEnd( script, end );
if( endLine < script.length() - 1 )
{
int nextLineStart = endLine + 1;
int nextLineEnd = getLineEnd( script, nextLineStart );
boolean whitespace =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.