code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
@Override
public String getWildcardString() {
String result = cachedWildcardString;
if(result == null) {
synchronized(this) {
result = cachedWildcardString;
if(result == null) {
if(!isPrefixed() || !isMultiple()) {
result = getString();
} else if(isFullRange())... | public class class_name {
@Override
public String getWildcardString() {
String result = cachedWildcardString;
if(result == null) {
synchronized(this) { // depends on control dependency: [if], data = [none]
result = cachedWildcardString;
if(result == null) {
if(!isPrefixed() || !isMultiple()) {
... |
public class class_name {
@Override
public int filter(double[] eigenValues) {
// find the last eigenvector that is considered 'strong' by the weak rule
// applied to the remaining vectors only
double eigenValueSum = eigenValues[eigenValues.length - 1];
for(int i = eigenValues.length - 2; i >= 0; i--)... | public class class_name {
@Override
public int filter(double[] eigenValues) {
// find the last eigenvector that is considered 'strong' by the weak rule
// applied to the remaining vectors only
double eigenValueSum = eigenValues[eigenValues.length - 1];
for(int i = eigenValues.length - 2; i >= 0; i--)... |
public class class_name {
public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) {
if (softwareModules == null) {
softwareModules = new ArrayList<>();
}
softwareModules.add(createSoftwareModule);
} } | public class class_name {
public void addSoftwareModule(final DmfSoftwareModule createSoftwareModule) {
if (softwareModules == null) {
softwareModules = new ArrayList<>(); // depends on control dependency: [if], data = [none]
}
softwareModules.add(createSoftwareModule);
} } |
public class class_name {
private Checkpoints getBWCheckpoints(Bw bwService) {
for (Object o : bwService.getRest()) {
if (o.getClass().equals(Checkpoints.class)) {
return (Checkpoints) o;
}
}
return null;
} } | public class class_name {
private Checkpoints getBWCheckpoints(Bw bwService) {
for (Object o : bwService.getRest()) {
if (o.getClass().equals(Checkpoints.class)) {
return (Checkpoints) o; // depends on control dependency: [if], data = [none]
}
}
return null;
} } |
public class class_name {
public CmsContainerConfiguration getConfiguration(String name) {
Map<String, CmsContainerConfiguration> configurationsForLocale = null;
if (m_configurations.containsKey(CmsLocaleManager.MASTER_LOCALE)) {
configurationsForLocale = m_configurations.get(CmsLocale... | public class class_name {
public CmsContainerConfiguration getConfiguration(String name) {
Map<String, CmsContainerConfiguration> configurationsForLocale = null;
if (m_configurations.containsKey(CmsLocaleManager.MASTER_LOCALE)) {
configurationsForLocale = m_configurations.get(CmsLocale... |
public class class_name {
private PopupMenu createMenu(View v, String[] menuArray) {
PopupMenu popupMenu = new PopupMenu(this, v);
Menu menu = popupMenu.getMenu();
for (int i = 0; i < menuArray.length; i++) {
String menuText = menuArray[i];
menu.add(0, i, i, menuText);
... | public class class_name {
private PopupMenu createMenu(View v, String[] menuArray) {
PopupMenu popupMenu = new PopupMenu(this, v);
Menu menu = popupMenu.getMenu();
for (int i = 0; i < menuArray.length; i++) {
String menuText = menuArray[i];
menu.add(0, i, i, menuText); /... |
public class class_name {
private static IndexableExpression getIndexableExpressionFromFilters(
ExpressionType targetComparator, ExpressionType altTargetComparator,
AbstractExpression coveringExpr, int coveringColId, StmtTableScan tableScan,
List<AbstractExpression> filtersToCover,
bool... | public class class_name {
private static IndexableExpression getIndexableExpressionFromFilters(
ExpressionType targetComparator, ExpressionType altTargetComparator,
AbstractExpression coveringExpr, int coveringColId, StmtTableScan tableScan,
List<AbstractExpression> filtersToCover,
bool... |
public class class_name {
@EnsuresNonNull("compiledScript")
private JavaScriptAggregator.ScriptAggregator getCompiledScript()
{
// JavaScript configuration should be checked when it's actually used because someone might still want Druid
// nodes to be able to deserialize JavaScript-based objects even thoug... | public class class_name {
@EnsuresNonNull("compiledScript")
private JavaScriptAggregator.ScriptAggregator getCompiledScript()
{
// JavaScript configuration should be checked when it's actually used because someone might still want Druid
// nodes to be able to deserialize JavaScript-based objects even thoug... |
public class class_name {
public Float getAsFloat(String key) {
Object value = mValues.get(key);
try {
return value != null ? ((Number) value).floatValue() : null;
} catch (ClassCastException e) {
if (value instanceof CharSequence) {
try {
... | public class class_name {
public Float getAsFloat(String key) {
Object value = mValues.get(key);
try {
return value != null ? ((Number) value).floatValue() : null; // depends on control dependency: [try], data = [none]
} catch (ClassCastException e) {
if (value instanceo... |
public class class_name {
public boolean beginFakeDrag() {
if (mIsBeingDragged) {
return false;
}
mFakeDragging = true;
setScrollState(SCROLL_STATE_DRAGGING);
mInitialMotionY = mLastMotionY = 0;
if (mVelocityTracker == null) {
mVelocityTracker = V... | public class class_name {
public boolean beginFakeDrag() {
if (mIsBeingDragged) {
return false; // depends on control dependency: [if], data = [none]
}
mFakeDragging = true;
setScrollState(SCROLL_STATE_DRAGGING);
mInitialMotionY = mLastMotionY = 0;
if (mVeloc... |
public class class_name {
private Representation createRepresentation(Representation representation) throws DDFException {
Collection<Representation> vertices = this.mReps.values();
//List<GraphPath<Representation<?>, ConvertFunction<?, ?>>> pathList = new ArrayList<GraphPath<Representation<?>, ConvertFunctio... | public class class_name {
private Representation createRepresentation(Representation representation) throws DDFException {
Collection<Representation> vertices = this.mReps.values();
//List<GraphPath<Representation<?>, ConvertFunction<?, ?>>> pathList = new ArrayList<GraphPath<Representation<?>, ConvertFunctio... |
public class class_name {
public void clean() {
if (!remove(this))
return;
try {
thunk.run();
} catch (final Throwable x) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
if (System... | public class class_name {
public void clean() {
if (!remove(this))
return;
try {
thunk.run(); // depends on control dependency: [try], data = [none]
} catch (final Throwable x) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
... |
public class class_name {
private Expression parseSemVerExpression() {
Expression expr;
if (tokens.positiveLookahead(NOT)) {
tokens.consume();
consumeNextToken(LEFT_PAREN);
expr = new Not(parseSemVerExpression());
consumeNextToken(RIGHT_PAREN);
} else if (tokens.positiveLookahead(LE... | public class class_name {
private Expression parseSemVerExpression() {
Expression expr;
if (tokens.positiveLookahead(NOT)) {
tokens.consume(); // depends on control dependency: [if], data = [none]
consumeNextToken(LEFT_PAREN); // depends on control dependency: [if], data = [none]
expr = new N... |
public class class_name {
private void setJoin(List<T> models) {
if (null == models || models.isEmpty() ||
joinParams.size() == 0) {
return;
}
models.stream().filter(Objects::nonNull).forEach(this::setJoin);
} } | public class class_name {
private void setJoin(List<T> models) {
if (null == models || models.isEmpty() ||
joinParams.size() == 0) {
return; // depends on control dependency: [if], data = [none]
}
models.stream().filter(Objects::nonNull).forEach(this::setJoin);
}... |
public class class_name {
private static PermutationParity fill3DCoordinates(IAtomContainer container, IAtom a, List<IBond> connected,
Point3d[] coordinates, int offset) {
int i = 0;
int[] indices = new int[2];
for (IBond bond : connected) {
if (!isDoubleBond(bond)) {
... | public class class_name {
private static PermutationParity fill3DCoordinates(IAtomContainer container, IAtom a, List<IBond> connected,
Point3d[] coordinates, int offset) {
int i = 0;
int[] indices = new int[2];
for (IBond bond : connected) {
if (!isDoubleBond(bond)) {
... |
public class class_name {
public static RowColumn toRowColumn(Key key) {
if (key == null) {
return RowColumn.EMPTY;
}
if ((key.getRow() == null) || key.getRow().getLength() == 0) {
return RowColumn.EMPTY;
}
Bytes row = ByteUtil.toBytes(key.getRow());
if ((key.getColumnFamily() == nu... | public class class_name {
public static RowColumn toRowColumn(Key key) {
if (key == null) {
return RowColumn.EMPTY; // depends on control dependency: [if], data = [none]
}
if ((key.getRow() == null) || key.getRow().getLength() == 0) {
return RowColumn.EMPTY; // depends on control dependency: [i... |
public class class_name {
@Override
public void run(final IAction action) {
if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
return;
}
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
IProject project = getProject(st... | public class class_name {
@Override
public void run(final IAction action) {
if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
return; // depends on control dependency: [if], data = [none]
}
IStructuredSelection structuredSelection = (IStructuredSelection... |
public class class_name {
private Stream<Quad> fetchContainmentQuads() {
if (getInteractionModel().getIRIString().endsWith("Container")) {
final Query q = new Query();
q.setQuerySelectType();
q.addResultVar(OBJECT);
final ElementPathBlock epb = new ElementPathBl... | public class class_name {
private Stream<Quad> fetchContainmentQuads() {
if (getInteractionModel().getIRIString().endsWith("Container")) {
final Query q = new Query();
q.setQuerySelectType(); // depends on control dependency: [if], data = [none]
q.addResultVar(OBJECT); // de... |
public class class_name {
public static Buffer[] consumeGenericParam(final Buffer buffer) throws IndexOutOfBoundsException, IOException {
final Buffer key = consumeToken(buffer);
Buffer value = null;
if (key == null) {
return new Buffer[2];
}
if (consumeEQUAL(buffer)... | public class class_name {
public static Buffer[] consumeGenericParam(final Buffer buffer) throws IndexOutOfBoundsException, IOException {
final Buffer key = consumeToken(buffer);
Buffer value = null;
if (key == null) {
return new Buffer[2];
}
if (consumeEQUAL(buffer)... |
public class class_name {
private void parseNamedAttributes(Node parent) throws JasperException {
do {
Mark start = reader.mark();
Attributes attrs = parseAttributes();
if (attrs == null || attrs.getValue("name") == null) {
err.jspError(start, "jsp.error.jspA... | public class class_name {
private void parseNamedAttributes(Node parent) throws JasperException {
do {
Mark start = reader.mark();
Attributes attrs = parseAttributes();
if (attrs == null || attrs.getValue("name") == null) {
err.jspError(start, "jsp.error.jspA... |
public class class_name {
public String[] arrayEscapeXml(final Object[] target) {
if (target == null) {
return null;
}
final String[] result = new String[target.length];
for (int i = 0; i < target.length; i++) {
result[i] = escapeXml(target[i]);
}
... | public class class_name {
public String[] arrayEscapeXml(final Object[] target) {
if (target == null) {
return null; // depends on control dependency: [if], data = [none]
}
final String[] result = new String[target.length];
for (int i = 0; i < target.length; i++) {
... |
public class class_name {
private boolean doTryInsertNoLock(S storable) {
// Create a fresh copy to ensure that custom fields are not saved.
S copy = (S) storable.prepare();
storable.copyAllProperties(copy);
copy.markAllPropertiesClean();
Key<S> key = new Key<S>(copy, mFull... | public class class_name {
private boolean doTryInsertNoLock(S storable) {
// Create a fresh copy to ensure that custom fields are not saved.
S copy = (S) storable.prepare();
storable.copyAllProperties(copy);
copy.markAllPropertiesClean();
Key<S> key = new Key<S>(copy, mFull... |
public class class_name {
private static boolean hasSingleValueWithDefaultKey(AnnotationMirror annotation) {
if (annotation.getElementValues().size() != 1) {
return false;
}
ExecutableElement key = getOnlyElement(annotation.getElementValues().keySet());
return key.getSimpleName().contentEquals("v... | public class class_name {
private static boolean hasSingleValueWithDefaultKey(AnnotationMirror annotation) {
if (annotation.getElementValues().size() != 1) {
return false; // depends on control dependency: [if], data = [none]
}
ExecutableElement key = getOnlyElement(annotation.getElementValues().keyS... |
public class class_name {
public NodeIterator getNodes() throws RepositoryException
{
if (SessionImpl.FORCE_USE_GET_NODES_LAZILY)
{
if (LOG.isDebugEnabled())
{
LOG
.debug("EXPERIMENTAL! Be aware that \"getNodesLazily()\" feature is used instead of JCR API get... | public class class_name {
public NodeIterator getNodes() throws RepositoryException
{
if (SessionImpl.FORCE_USE_GET_NODES_LAZILY)
{
if (LOG.isDebugEnabled())
{
LOG
.debug("EXPERIMENTAL! Be aware that \"getNodesLazily()\" feature is used instead of JCR API get... |
public class class_name {
public void marshall(S3DestinationUpdate s3DestinationUpdate, ProtocolMarshaller protocolMarshaller) {
if (s3DestinationUpdate == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.mars... | public class class_name {
public void marshall(S3DestinationUpdate s3DestinationUpdate, ProtocolMarshaller protocolMarshaller) {
if (s3DestinationUpdate == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.mars... |
public class class_name {
@Override
public synchronized void clearParameters(final String name) throws DatabaseEngineException, ConnectionResetException {
final PreparedStatementCapsule ps = stmts.get(name);
if (ps == null) {
throw new DatabaseEngineRuntimeException(String.format("Prepa... | public class class_name {
@Override
public synchronized void clearParameters(final String name) throws DatabaseEngineException, ConnectionResetException {
final PreparedStatementCapsule ps = stmts.get(name);
if (ps == null) {
throw new DatabaseEngineRuntimeException(String.format("Prepa... |
public class class_name {
public int update(String sql, Object... paras) {
Connection conn = null;
try {
conn = config.getConnection();
return update(config, conn, sql, paras);
} catch (Exception e) {
throw new ActiveRecordException(e);
} finally {
config.close(conn);
}
} } | public class class_name {
public int update(String sql, Object... paras) {
Connection conn = null;
try {
conn = config.getConnection();
// depends on control dependency: [try], data = [none]
return update(config, conn, sql, paras);
// depends on control dependency: [try], data = [none]
} catch (Except... |
public class class_name {
private void fillCollection(Collection<?> collection) {
int count = 0;
// 展开 Collection 容器, 输出逗号分隔以支持 IN (...) 语法
// "IN :varlist" --> "IN (?, ?, ...)"
if (collection.isEmpty()) {
// 输出 "IN (NULL)" 保证不会产生错误
builder.append(NULL);
... | public class class_name {
private void fillCollection(Collection<?> collection) {
int count = 0;
// 展开 Collection 容器, 输出逗号分隔以支持 IN (...) 语法
// "IN :varlist" --> "IN (?, ?, ...)"
if (collection.isEmpty()) {
// 输出 "IN (NULL)" 保证不会产生错误
builder.append(NULL); // ... |
public class class_name {
@Override
public void save(Object context, Bundle bundle) {
Set<Field> fieldsToSave = FieldUtils.getAllFields(context, Stateful.class);
for (Field field : fieldsToSave) {
try {
if(!field.isAccessible()) field.setAccessible(true);
Serializable state = (Seri... | public class class_name {
@Override
public void save(Object context, Bundle bundle) {
Set<Field> fieldsToSave = FieldUtils.getAllFields(context, Stateful.class);
for (Field field : fieldsToSave) {
try {
if(!field.isAccessible()) field.setAccessible(true);
Serializable state = (Seri... |
public class class_name {
private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) {
SeaGlassPainter borderPainter = style.getBorderPainter(ctx);
if (borderPainter != null) {
paint(borderPainter, ctx, g, x, y, w, h, transform);
}... | public class class_name {
private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w, int h, AffineTransform transform) {
SeaGlassPainter borderPainter = style.getBorderPainter(ctx);
if (borderPainter != null) {
paint(borderPainter, ctx, g, x, y, w, h, transform); // depend... |
public class class_name {
public java.lang.String getVariableName() {
java.lang.Object ref = variableName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String ... | public class class_name {
public java.lang.String getVariableName() {
java.lang.Object ref = variableName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref; // depends on control dependency: [if], data = [none]
} else {
com.google.protobuf.ByteString bs =
(com.go... |
public class class_name {
public Func3<P1, P2, P3, R> andThen(
final Func3<? super P1, ? super P2, ? super P3, ? extends R>... fs
) {
if (0 == fs.length) {
return this;
}
final Func3<P1, P2, P3, R> me = this;
return new F3<P1, P2,... | public class class_name {
public Func3<P1, P2, P3, R> andThen(
final Func3<? super P1, ? super P2, ? super P3, ? extends R>... fs
) {
if (0 == fs.length) {
return this; // depends on control dependency: [if], data = [none]
}
final Func3<P1, P... |
public class class_name {
private static void inferPropertyTypesToMatchConstraint(
JSType type, JSType constraint) {
if (type == null || constraint == null) {
return;
}
type.matchConstraint(constraint);
} } | public class class_name {
private static void inferPropertyTypesToMatchConstraint(
JSType type, JSType constraint) {
if (type == null || constraint == null) {
return; // depends on control dependency: [if], data = [none]
}
type.matchConstraint(constraint);
} } |
public class class_name {
public void setActivePage(DialogPage activePage) {
DialogPage oldPage = this.activePage;
Assert.isTrue(activePage == null || pages.contains(activePage));
if (oldPage == activePage) {
return;
}
this.activePage = activePage;
updateMessage();
if (oldPage != null) {
updatePa... | public class class_name {
public void setActivePage(DialogPage activePage) {
DialogPage oldPage = this.activePage;
Assert.isTrue(activePage == null || pages.contains(activePage));
if (oldPage == activePage) {
return; // depends on control dependency: [if], data = [none]
}
this.activePage = activePage;
... |
public class class_name {
@SuppressWarnings("unchecked")
public static <T> Collection<T> findNextByType(FaceletHandler nextHandler, Class<T> type)
{
List<T> found = new ArrayList<T>();
if (type.isAssignableFrom(nextHandler.getClass()))
{
found.add((T)nextHandler);
}
... | public class class_name {
@SuppressWarnings("unchecked")
public static <T> Collection<T> findNextByType(FaceletHandler nextHandler, Class<T> type)
{
List<T> found = new ArrayList<T>();
if (type.isAssignableFrom(nextHandler.getClass()))
{
found.add((T)nextHandler); // depends... |
public class class_name {
@SuppressWarnings("unchecked")
public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) {
if (collectionClass == null || classOfT == null) {
return null;
}
try {
// r... | public class class_name {
@SuppressWarnings("unchecked")
public <X extends Collection<T>, T> X toCollection(Class<? extends Collection> collectionClass, Class<T> classOfT, String pattern) {
if (collectionClass == null || classOfT == null) {
return null; // depends on control dependency: [if], d... |
public class class_name {
static boolean isImmutableValue(Node n) {
// TODO(johnlenz): rename this function. It is currently being used
// in two disjoint cases:
// 1) We only care about the result of the expression
// (in which case NOT here should return true)
// 2) We care that expression is... | public class class_name {
static boolean isImmutableValue(Node n) {
// TODO(johnlenz): rename this function. It is currently being used
// in two disjoint cases:
// 1) We only care about the result of the expression
// (in which case NOT here should return true)
// 2) We care that expression is... |
public class class_name {
private Events _getEvents(PhaseId phaseId)
{
// Gather the events and purge the event list to prevent concurrent modification during broadcasting
int size = _events.size();
List<FacesEvent> anyPhase = new ArrayList<FacesEvent>(size);
List<FacesEvent> onPhas... | public class class_name {
private Events _getEvents(PhaseId phaseId)
{
// Gather the events and purge the event list to prevent concurrent modification during broadcasting
int size = _events.size();
List<FacesEvent> anyPhase = new ArrayList<FacesEvent>(size);
List<FacesEvent> onPhas... |
public class class_name {
public java.util.List<GatewayInfo> getGateways() {
if (gateways == null) {
gateways = new com.amazonaws.internal.SdkInternalList<GatewayInfo>();
}
return gateways;
} } | public class class_name {
public java.util.List<GatewayInfo> getGateways() {
if (gateways == null) {
gateways = new com.amazonaws.internal.SdkInternalList<GatewayInfo>(); // depends on control dependency: [if], data = [none]
}
return gateways;
} } |
public class class_name {
@Path("/{cuid}/rel/{relId}")
@ApiOperation(value="Delete a user or remove a user from a workgroup or role",
notes="If rel/{relId} is present, user is removed from workgroup or role.", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<S... | public class class_name {
@Path("/{cuid}/rel/{relId}")
@ApiOperation(value="Delete a user or remove a user from a workgroup or role",
notes="If rel/{relId} is present, user is removed from workgroup or role.", response=StatusMessage.class)
public JSONObject delete(String path, JSONObject content, Map<S... |
public class class_name {
public void marshall(ListLoggerDefinitionsRequest listLoggerDefinitionsRequest, ProtocolMarshaller protocolMarshaller) {
if (listLoggerDefinitionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... | public class class_name {
public void marshall(ListLoggerDefinitionsRequest listLoggerDefinitionsRequest, ProtocolMarshaller protocolMarshaller) {
if (listLoggerDefinitionsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
... |
public class class_name {
public static long hash(final BsonDocument doc) {
if (doc == null) {
return 0L;
}
final byte[] docBytes = toBytes(doc);
long hashValue = FNV_64BIT_OFFSET_BASIS;
for (int offset = 0; offset < docBytes.length; offset++) {
hashValue ^= (0xFF & docBytes[offset]);... | public class class_name {
public static long hash(final BsonDocument doc) {
if (doc == null) {
return 0L; // depends on control dependency: [if], data = [none]
}
final byte[] docBytes = toBytes(doc);
long hashValue = FNV_64BIT_OFFSET_BASIS;
for (int offset = 0; offset < docBytes.length; off... |
public class class_name {
public void marshall(ListOutgoingCertificatesRequest listOutgoingCertificatesRequest, ProtocolMarshaller protocolMarshaller) {
if (listOutgoingCertificatesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {... | public class class_name {
public void marshall(ListOutgoingCertificatesRequest listOutgoingCertificatesRequest, ProtocolMarshaller protocolMarshaller) {
if (listOutgoingCertificatesRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {... |
public class class_name {
protected static double computeSigma(int i, DoubleArray pij_row, double perplexity, double log_perp, double[] pij_i) {
double max = pij_row.get((int) FastMath.ceil(perplexity)) / Math.E;
double beta = 1 / max; // beta = 1. / (2*sigma*sigma)
double diff = computeH(pij_row, pij_i, -... | public class class_name {
protected static double computeSigma(int i, DoubleArray pij_row, double perplexity, double log_perp, double[] pij_i) {
double max = pij_row.get((int) FastMath.ceil(perplexity)) / Math.E;
double beta = 1 / max; // beta = 1. / (2*sigma*sigma)
double diff = computeH(pij_row, pij_i, -... |
public class class_name {
public void setPercentValue(Pin pin, Number percent){
// validate range
if(percent.doubleValue() <= 0){
setValue(pin, getMinSupportedValue());
}
else if(percent.doubleValue() >= 100){
setValue(pin, getMaxSupportedValue());
}
... | public class class_name {
public void setPercentValue(Pin pin, Number percent){
// validate range
if(percent.doubleValue() <= 0){
setValue(pin, getMinSupportedValue()); // depends on control dependency: [if], data = [none]
}
else if(percent.doubleValue() >= 100){
... |
public class class_name {
@Override
public void addClassDescription(Content classInfoTree) {
if(!configuration.nocomment) {
// generate documentation for the class.
if (!utils.getFullBody(typeElement).isEmpty()) {
addInlineComment(typeElement, classInfoTree);
... | public class class_name {
@Override
public void addClassDescription(Content classInfoTree) {
if(!configuration.nocomment) {
// generate documentation for the class.
if (!utils.getFullBody(typeElement).isEmpty()) {
addInlineComment(typeElement, classInfoTree); // depe... |
public class class_name {
public void marshall(UpdateJobRequest updateJobRequest, ProtocolMarshaller protocolMarshaller) {
if (updateJobRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(upda... | public class class_name {
public void marshall(UpdateJobRequest updateJobRequest, ProtocolMarshaller protocolMarshaller) {
if (updateJobRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(upda... |
public class class_name {
public SelectorName qualifiedForm(NameFactory nameFactory) {
if (expandedForm) {
return new SelectorName(nameFactory.create(this.name).getString(nameFactory.getNamespaceRegistry()));
}
return this;
} } | public class class_name {
public SelectorName qualifiedForm(NameFactory nameFactory) {
if (expandedForm) {
return new SelectorName(nameFactory.create(this.name).getString(nameFactory.getNamespaceRegistry())); // depends on control dependency: [if], data = [none]
}
return this;
}... |
public class class_name {
private static String badIndexMsg(int index, int size, String desc, Object... params) {
if (index < 0) {
return StrUtil.format("{} ({}) must not be negative", StrUtil.format(desc, params), index);
} else if (size < 0) {
throw new IllegalArgumentException("negative size: " + size... | public class class_name {
private static String badIndexMsg(int index, int size, String desc, Object... params) {
if (index < 0) {
return StrUtil.format("{} ({}) must not be negative", StrUtil.format(desc, params), index);
// depends on control dependency: [if], data = [none]
} else if (size < 0) {
throw... |
public class class_name {
public void setTapes(java.util.Collection<Tape> tapes) {
if (tapes == null) {
this.tapes = null;
return;
}
this.tapes = new com.amazonaws.internal.SdkInternalList<Tape>(tapes);
} } | public class class_name {
public void setTapes(java.util.Collection<Tape> tapes) {
if (tapes == null) {
this.tapes = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
}
this.tapes = new com.amazonaw... |
public class class_name {
public Map<TreeNode, Rectangle2D.Double> getNodeBounds() {
if (nodeBounds == null) {
nodeBounds = this.useIdentity ? new IdentityHashMap<TreeNode, Rectangle2D.Double>()
: new HashMap<TreeNode, Rectangle2D.Double>();
for (Entry<TreeNode, Point2D> entry : positions.entrySet()) {
... | public class class_name {
public Map<TreeNode, Rectangle2D.Double> getNodeBounds() {
if (nodeBounds == null) {
nodeBounds = this.useIdentity ? new IdentityHashMap<TreeNode, Rectangle2D.Double>()
: new HashMap<TreeNode, Rectangle2D.Double>(); // depends on control dependency: [if], data = [none]
for (Entry... |
public class class_name {
NodeSchema copyAndReplaceWithTVE() {
NodeSchema copy = new NodeSchema();
int colIndex = 0;
for (SchemaColumn column : m_columns) {
copy.addColumn(column.copyAndReplaceWithTVE(colIndex));
++colIndex;
}
return copy;
} } | public class class_name {
NodeSchema copyAndReplaceWithTVE() {
NodeSchema copy = new NodeSchema();
int colIndex = 0;
for (SchemaColumn column : m_columns) {
copy.addColumn(column.copyAndReplaceWithTVE(colIndex)); // depends on control dependency: [for], data = [column]
+... |
public class class_name {
public static UIMenuItem getHelpMenuItem()
{
UIMenuItem ret = null;
try {
final String cmdStr = Configuration.getAttribute(ConfigAttribute.HELPEDITCMD);
final Command cmd = UUIDUtil.isUUID(cmdStr) ? Command.get(UUID.fromString(cmdStr)) : Command.get... | public class class_name {
public static UIMenuItem getHelpMenuItem()
{
UIMenuItem ret = null;
try {
final String cmdStr = Configuration.getAttribute(ConfigAttribute.HELPEDITCMD);
final Command cmd = UUIDUtil.isUUID(cmdStr) ? Command.get(UUID.fromString(cmdStr)) : Command.get... |
public class class_name {
public ListSuitesResult withSuites(Suite... suites) {
if (this.suites == null) {
setSuites(new java.util.ArrayList<Suite>(suites.length));
}
for (Suite ele : suites) {
this.suites.add(ele);
}
return this;
} } | public class class_name {
public ListSuitesResult withSuites(Suite... suites) {
if (this.suites == null) {
setSuites(new java.util.ArrayList<Suite>(suites.length)); // depends on control dependency: [if], data = [none]
}
for (Suite ele : suites) {
this.suites.add(ele); /... |
public class class_name {
public static double inverseRegularizedIncompleteGamma(double a, double p) {
if (a <= 0.0) {
throw new IllegalArgumentException("a must be pos in invgammap");
}
final double EPS = 1.0E-8;
double x, err, t, u, pp;
double lna1 = 0.0;
... | public class class_name {
public static double inverseRegularizedIncompleteGamma(double a, double p) {
if (a <= 0.0) {
throw new IllegalArgumentException("a must be pos in invgammap");
}
final double EPS = 1.0E-8;
double x, err, t, u, pp;
double lna1 = 0.0;
... |
public class class_name {
public static int skipToNextMatchingShort(byte[] buffer, int offset, int value)
{
int nextOffset = offset;
while (getShort(buffer, nextOffset) != value)
{
++nextOffset;
}
nextOffset += 2;
return nextOffset;
} } | public class class_name {
public static int skipToNextMatchingShort(byte[] buffer, int offset, int value)
{
int nextOffset = offset;
while (getShort(buffer, nextOffset) != value)
{
++nextOffset; // depends on control dependency: [while], data = [none]
}
nextOffset += 2;
... |
public class class_name {
static void overwrite(StringBuffer sb, int pos, String s) {
int len = s.length();
for (int i = 0; i < len; i++) {
sb.setCharAt(pos + i, s.charAt(i));
}
} } | public class class_name {
static void overwrite(StringBuffer sb, int pos, String s) {
int len = s.length();
for (int i = 0; i < len; i++) {
sb.setCharAt(pos + i, s.charAt(i)); // depends on control dependency: [for], data = [i]
}
} } |
public class class_name {
@SuppressWarnings({"CheckReturnValue", "MockitoUsage", "unchecked"})
static void verifyInt(MockedVoidMethod method, VerificationMode mode, InOrder
instanceInOrder) {
if (onMethodCallDuringVerification.get() != null) {
throw new IllegalStateException("Verifi... | public class class_name {
@SuppressWarnings({"CheckReturnValue", "MockitoUsage", "unchecked"})
static void verifyInt(MockedVoidMethod method, VerificationMode mode, InOrder
instanceInOrder) {
if (onMethodCallDuringVerification.get() != null) {
throw new IllegalStateException("Verifi... |
public class class_name {
public EngineResult createNewJob(String jobname) {
HttpPost postRequest = new HttpPost(baseUrl);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
nvp.add(new BasicNameValuePair("action", "create"));
nvp.add(new BasicNameValuePair("createpath", jobname... | public class class_name {
public EngineResult createNewJob(String jobname) {
HttpPost postRequest = new HttpPost(baseUrl);
List<NameValuePair> nvp = new LinkedList<NameValuePair>();
nvp.add(new BasicNameValuePair("action", "create"));
nvp.add(new BasicNameValuePair("createpath", jobname... |
public class class_name {
public void serialize( JsonWriter writer, T value, JsonSerializationContext ctx, JsonSerializerParameters params, boolean isMapValue ) throws
JsonSerializationException {
if ( null != params.getInclude() ) {
switch ( params.getInclude() ) {
case... | public class class_name {
public void serialize( JsonWriter writer, T value, JsonSerializationContext ctx, JsonSerializerParameters params, boolean isMapValue ) throws
JsonSerializationException {
if ( null != params.getInclude() ) {
switch ( params.getInclude() ) {
case... |
public class class_name {
protected void addToCloseReaderList(final Reader r) {
if (readersToClose == null) {
readersToClose = new ArrayList<>();
}
readersToClose.add(r);
} } | public class class_name {
protected void addToCloseReaderList(final Reader r) {
if (readersToClose == null) {
readersToClose = new ArrayList<>();
// depends on control dependency: [if], data = [none]
}
readersToClose.add(r);
} } |
public class class_name {
public java.util.List<String> getAssociationIds() {
if (associationIds == null) {
associationIds = new com.amazonaws.internal.SdkInternalList<String>();
}
return associationIds;
} } | public class class_name {
public java.util.List<String> getAssociationIds() {
if (associationIds == null) {
associationIds = new com.amazonaws.internal.SdkInternalList<String>(); // depends on control dependency: [if], data = [none]
}
return associationIds;
} } |
public class class_name {
public EEnum getColorFidelityRepCoEx() {
if (colorFidelityRepCoExEEnum == null) {
colorFidelityRepCoExEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(160);
}
return colorFidelityRepCoExEEnum;
} } | public class class_name {
public EEnum getColorFidelityRepCoEx() {
if (colorFidelityRepCoExEEnum == null) {
colorFidelityRepCoExEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(160); // depends on control dependency: [if], data = [none]
}
return colorFidelityR... |
public class class_name {
private void showHistoricVersion() {
String resourceStr = getParamResource();
byte[] result = getHistoricalResourceContent(getCms(), resourceStr, getParamVersion());
if (result != null) {
// get the top level response to change the content type
... | public class class_name {
private void showHistoricVersion() {
String resourceStr = getParamResource();
byte[] result = getHistoricalResourceContent(getCms(), resourceStr, getParamVersion());
if (result != null) {
// get the top level response to change the content type
... |
public class class_name {
public <T> List<T> asList() {
String cacheKey = null;
// is the result of the query cached?
if (isCacheable() && transaction == null) {
cacheKey = getCacheKey();
List<Key> keys = getCacheManager().get(cacheNamespace, cacheKey);
if (keys != null) {
if (isKeysOnly()) {
... | public class class_name {
public <T> List<T> asList() {
String cacheKey = null;
// is the result of the query cached?
if (isCacheable() && transaction == null) {
cacheKey = getCacheKey(); // depends on control dependency: [if], data = [none]
List<Key> keys = getCacheManager().get(cacheNamespace, cacheKe... |
public class class_name {
public static byte[] serialize(Serializable obj, boolean gzipOnSerialize) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out;
if (gzipOnSerialize) {
out = new ObjectOutputStream(new GZIPOutputSt... | public class class_name {
public static byte[] serialize(Serializable obj, boolean gzipOnSerialize) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream out;
if (gzipOnSerialize) {
out = new ObjectOutputStream(new GZIPOutputSt... |
public class class_name {
public static ExtractFromRow extractRelativePath( final int indexInRow,
final Path relativePath,
final NodeCache cache,
TypeSystem ... | public class class_name {
public static ExtractFromRow extractRelativePath( final int indexInRow,
final Path relativePath,
final NodeCache cache,
TypeSystem ... |
public class class_name {
@EnsuresNonNull("fn")
private Function getCompiledScript()
{
// JavaScript configuration should be checked when it's actually used because someone might still want Druid
// nodes to be able to deserialize JavaScript-based objects even though JavaScript is disabled.
Preconditio... | public class class_name {
@EnsuresNonNull("fn")
private Function getCompiledScript()
{
// JavaScript configuration should be checked when it's actually used because someone might still want Druid
// nodes to be able to deserialize JavaScript-based objects even though JavaScript is disabled.
Preconditio... |
public class class_name {
public void setStatements(java.util.Collection<ApplicationPolicyStatement> statements) {
if (statements == null) {
this.statements = null;
return;
}
this.statements = new java.util.ArrayList<ApplicationPolicyStatement>(statements);
} } | public class class_name {
public void setStatements(java.util.Collection<ApplicationPolicyStatement> statements) {
if (statements == null) {
this.statements = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
... |
public class class_name {
@Requires({
"kind != null",
"name != null",
"desc != null",
"extraCount >= 0"
})
@Ensures({
"result != null",
"!result.contains(null)"
})
List<MethodContractHandle> getMethodHandles(ContractKind kind,
String name, String desc, int extraCount) {
ArrayL... | public class class_name {
@Requires({
"kind != null",
"name != null",
"desc != null",
"extraCount >= 0"
})
@Ensures({
"result != null",
"!result.contains(null)"
})
List<MethodContractHandle> getMethodHandles(ContractKind kind,
String name, String desc, int extraCount) {
ArrayL... |
public class class_name {
public <T extends Graph> T getGraph(Class<T> clazz, Weighting weighting) {
if (clazz.equals(Graph.class))
return (T) baseGraph;
Collection<CHGraphImpl> chGraphs = getAllCHGraphs();
if (chGraphs.isEmpty())
throw new IllegalStateException("Cannot... | public class class_name {
public <T extends Graph> T getGraph(Class<T> clazz, Weighting weighting) {
if (clazz.equals(Graph.class))
return (T) baseGraph;
Collection<CHGraphImpl> chGraphs = getAllCHGraphs();
if (chGraphs.isEmpty())
throw new IllegalStateException("Cannot... |
public class class_name {
protected static DataBuffer createIndiceBuffer(long[][] indices, long[] shape){
checkNotNull(indices);
checkNotNull(shape);
if(indices.length == 0){
return Nd4j.getDataBufferFactory().createLong(shape.length);
}
if (indices.length == shape.... | public class class_name {
protected static DataBuffer createIndiceBuffer(long[][] indices, long[] shape){
checkNotNull(indices);
checkNotNull(shape);
if(indices.length == 0){
return Nd4j.getDataBufferFactory().createLong(shape.length); // depends on control dependency: [if], data = ... |
public class class_name {
@Override
public LabelledDocument nextDocument() {
LabelledDocument document = currentIterator.next();
for (String label : document.getLabels()) {
labels.storeLabel(label);
}
return document;
} } | public class class_name {
@Override
public LabelledDocument nextDocument() {
LabelledDocument document = currentIterator.next();
for (String label : document.getLabels()) {
labels.storeLabel(label); // depends on control dependency: [for], data = [label]
}
return docume... |
public class class_name {
public void dump(PrintStream output) {
TreeSet<String> keys = new TreeSet<String>(keySet());
for (String key : keys) {
output.println(key + ":" + get(key));
}
} } | public class class_name {
public void dump(PrintStream output) {
TreeSet<String> keys = new TreeSet<String>(keySet());
for (String key : keys) {
output.println(key + ":" + get(key)); // depends on control dependency: [for], data = [key]
}
} } |
public class class_name {
public Entity buildEntity(EntityConfig entityConfig) {
Entity entity = applicationContext.getBean(Entity.class);
entityConfigFactory.applyFallBacks(entityConfig);
entity.setEntityConfig(entityConfig);
Table table = getTableStrict(entityConfig);
if (tab... | public class class_name {
public Entity buildEntity(EntityConfig entityConfig) {
Entity entity = applicationContext.getBean(Entity.class);
entityConfigFactory.applyFallBacks(entityConfig);
entity.setEntityConfig(entityConfig);
Table table = getTableStrict(entityConfig);
if (tab... |
public class class_name {
private static void resolveTypeQualifierDefaults(AnnotationValue value, ElementType defaultFor,
LinkedList<AnnotationValue> result) {
try {
XClass c = Global.getAnalysisCache().getClassAnalysis(XClass.class, value.getAnnotationClass());
AnnotationV... | public class class_name {
private static void resolveTypeQualifierDefaults(AnnotationValue value, ElementType defaultFor,
LinkedList<AnnotationValue> result) {
try {
XClass c = Global.getAnalysisCache().getClassAnalysis(XClass.class, value.getAnnotationClass());
AnnotationV... |
public class class_name {
public boolean includes(MimeType other) {
if (other == null) {
return false;
}
if (this.isWildcardType()) {
// */* includes anything
return true;
} else if (getType().equals(other.getType())) {
if (getSubtype().eq... | public class class_name {
public boolean includes(MimeType other) {
if (other == null) {
return false; // depends on control dependency: [if], data = [none]
}
if (this.isWildcardType()) {
// */* includes anything
return true; // depends on control dependency:... |
public class class_name {
private Stat createStat(final WComponent comp) {
Stat stat = new Stat();
stat.setClassName(comp.getClass().getName());
stat.setName(comp.getId());
if (stat.getName() == null) {
stat.setName("Unknown");
}
if (comp instanceof AbstractWComponent) {
Object obj = AbstractWComp... | public class class_name {
private Stat createStat(final WComponent comp) {
Stat stat = new Stat();
stat.setClassName(comp.getClass().getName());
stat.setName(comp.getId());
if (stat.getName() == null) {
stat.setName("Unknown"); // depends on control dependency: [if], data = [none]
}
if (comp instance... |
public class class_name {
@Override
protected void parseURL(URL url, String spec, int start, int limit) {
boolean hasScheme = start != 0 && spec.charAt(start - 1) == ':';
spec = spec.substring(start, limit);
String path;
if (hasScheme) {
// If the "wsjar:" protocol was ... | public class class_name {
@Override
protected void parseURL(URL url, String spec, int start, int limit) {
boolean hasScheme = start != 0 && spec.charAt(start - 1) == ':';
spec = spec.substring(start, limit);
String path;
if (hasScheme) {
// If the "wsjar:" protocol was ... |
public class class_name {
private void loadMappings() {
for (int i = 0; i < mappings.length; i++) {
String[] pair = mappings[i].split(";");
if (pair.length < 2) {
try {
throw new AnnotatorConfigurationException();
} catch (AnnotatorConfigurationException e) {
LOGGER.error("[OpenNLP Parser: ... | public class class_name {
private void loadMappings() {
for (int i = 0; i < mappings.length; i++) {
String[] pair = mappings[i].split(";");
if (pair.length < 2) {
try {
throw new AnnotatorConfigurationException();
} catch (AnnotatorConfigurationException e) {
LOGGER.error("[OpenNLP Parser: ... |
public class class_name {
public static void checkVersion(GLVersioned required, GLVersioned object) {
if (!debug) {
return;
}
final GLVersion requiredVersion = required.getGLVersion();
final GLVersion objectVersion = object.getGLVersion();
if (objectVersion.getMajor(... | public class class_name {
public static void checkVersion(GLVersioned required, GLVersioned object) {
if (!debug) {
return; // depends on control dependency: [if], data = [none]
}
final GLVersion requiredVersion = required.getGLVersion();
final GLVersion objectVersion = obje... |
public class class_name {
public void setBorderWidth(final double WIDTH) {
if (null == borderWidth) {
_borderWidth = clamp(0.0, 50.0, WIDTH);
fireTileEvent(REDRAW_EVENT);
} else {
borderWidth.set(WIDTH);
}
} } | public class class_name {
public void setBorderWidth(final double WIDTH) {
if (null == borderWidth) {
_borderWidth = clamp(0.0, 50.0, WIDTH); // depends on control dependency: [if], data = [none]
fireTileEvent(REDRAW_EVENT); // depends on control dependency: [if], data = [none]
... |
public class class_name {
public static boolean recursiveDelete(VirtualFile root) {
boolean ok = true;
if (root.isDirectory()) {
final List<VirtualFile> files = root.getChildren();
for (VirtualFile file : files) {
ok &= recursiveDelete(file);
}
... | public class class_name {
public static boolean recursiveDelete(VirtualFile root) {
boolean ok = true;
if (root.isDirectory()) {
final List<VirtualFile> files = root.getChildren();
for (VirtualFile file : files) {
ok &= recursiveDelete(file); // depends on contro... |
public class class_name {
private void multiTouchController() {
if (DEBUG)
Log.i("MultiTouch", "Got here 6 - " + mMode + " " + mCurrPt.getNumTouchPoints() + " " + mCurrPt.isDown() + mCurrPt.isMultiTouch());
switch (mMode) {
case MODE_NOTHING:
if (DEBUG)
Log.i("MultiTouch", "MODE_N... | public class class_name {
private void multiTouchController() {
if (DEBUG)
Log.i("MultiTouch", "Got here 6 - " + mMode + " " + mCurrPt.getNumTouchPoints() + " " + mCurrPt.isDown() + mCurrPt.isMultiTouch());
switch (mMode) {
case MODE_NOTHING:
if (DEBUG)
Log.i("MultiTouch", "MODE_N... |
public class class_name {
public FastByteBuffer append(final FastByteBuffer buff) {
if (buff.offset == 0) {
return this;
}
append(buff.buffer, 0, buff.offset);
return this;
} } | public class class_name {
public FastByteBuffer append(final FastByteBuffer buff) {
if (buff.offset == 0) {
return this; // depends on control dependency: [if], data = [none]
}
append(buff.buffer, 0, buff.offset);
return this;
} } |
public class class_name {
@NotNull public static <T> Observable<Response<T>> from(@NotNull final ApolloQueryWatcher<T> watcher,
@NotNull Emitter.BackpressureMode backpressureMode) {
checkNotNull(backpressureMode, "backpressureMode == null");
checkNotNull(watcher, "watcher == null");
return Observable... | public class class_name {
@NotNull public static <T> Observable<Response<T>> from(@NotNull final ApolloQueryWatcher<T> watcher,
@NotNull Emitter.BackpressureMode backpressureMode) {
checkNotNull(backpressureMode, "backpressureMode == null");
checkNotNull(watcher, "watcher == null");
return Observable... |
public class class_name {
@Override
public void close() {
try {
sortAndReduce();
} catch (Exception e) {
throw new ExceptionInChainedStubException(this.taskName, e);
}
this.outputCollector.close();
} } | public class class_name {
@Override
public void close() {
try {
sortAndReduce(); // depends on control dependency: [try], data = [none]
} catch (Exception e) {
throw new ExceptionInChainedStubException(this.taskName, e);
} // depends on control dependency: [catch], data = [none]
this.outputCollector.cl... |
public class class_name {
public boolean setReferences (boolean references) {
boolean old = this.references;
if (references == old) return references;
if (old) {
referenceResolver.reset();
readObject = null;
}
this.references = references;
if (references && referenceResolver == null) referenc... | public class class_name {
public boolean setReferences (boolean references) {
boolean old = this.references;
if (references == old) return references;
if (old) {
referenceResolver.reset();
// depends on control dependency: [if], data = [none]
readObject = null;
// depends on control dependency: [if],... |
public class class_name {
private final Command takeExecutingCommand() {
try {
return this.commandAlreadySent.take();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
return null;
} } | public class class_name {
private final Command takeExecutingCommand() {
try {
return this.commandAlreadySent.take(); // depends on control dependency: [try], data = [none]
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} // depends on control dependency: [catch], data = [none]
re... |
public class class_name {
@Override
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
if (!isEnabled()) {
return;
}
try {
final MavenArtifact ma = searcher.searchSha1(dependency.getSha1sum());
dependency.addAsE... | public class class_name {
@Override
public void analyzeDependency(Dependency dependency, Engine engine) throws AnalysisException {
if (!isEnabled()) {
return;
}
try {
final MavenArtifact ma = searcher.searchSha1(dependency.getSha1sum());
dependency.addAsE... |
public class class_name {
public int invoke()
{
int workCount = 0;
if (isRunning)
{
try
{
workCount = agent.doWork();
}
catch (final InterruptedException | ClosedByInterruptException ignore)
{
close(... | public class class_name {
public int invoke()
{
int workCount = 0;
if (isRunning)
{
try
{
workCount = agent.doWork(); // depends on control dependency: [try], data = [none]
}
catch (final InterruptedException | ClosedByInterrup... |
public class class_name {
@Pure
public static String getPreferredAttributeNameForRoadType() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_TYPE_ATTR_NAME", DEFAULT_ATTR_ROAD_TYPE); //$NON-NLS-1$
}
return DEFAULT_ATTR_ROAD_... | public class class_name {
@Pure
public static String getPreferredAttributeNameForRoadType() {
final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
if (prefs != null) {
return prefs.get("ROAD_TYPE_ATTR_NAME", DEFAULT_ATTR_ROAD_TYPE); //$NON-NLS-1$ // depends on control dependenc... |
public class class_name {
public static void setBackgroundColor(int color, final View view) {
if (color == MULTICOLOR) {
ShapeDrawable.ShaderFactory sf = new ShapeDrawable.ShaderFactory() {
@Override
public Shader resize(int width, int height) {
r... | public class class_name {
public static void setBackgroundColor(int color, final View view) {
if (color == MULTICOLOR) {
ShapeDrawable.ShaderFactory sf = new ShapeDrawable.ShaderFactory() {
@Override
public Shader resize(int width, int height) {
r... |
public class class_name {
public CloseableReference<byte[]> get(int size) {
Preconditions.checkArgument(size > 0, "Size must be greater than zero");
Preconditions.checkArgument(size <= mMaxByteArraySize, "Requested size is too big");
mSemaphore.acquireUninterruptibly();
try {
byte[] byteArray = g... | public class class_name {
public CloseableReference<byte[]> get(int size) {
Preconditions.checkArgument(size > 0, "Size must be greater than zero");
Preconditions.checkArgument(size <= mMaxByteArraySize, "Requested size is too big");
mSemaphore.acquireUninterruptibly();
try {
byte[] byteArray = g... |
public class class_name {
public boolean start(String home, File options)
{
File homeDirectory = new File(home);
if (!homeDirectory.exists())
return false;
stop(home);
try
{
List<String> command = new ArrayList<String>();
command.add(java);
... | public class class_name {
public boolean start(String home, File options)
{
File homeDirectory = new File(home);
if (!homeDirectory.exists())
return false;
stop(home);
try
{
List<String> command = new ArrayList<String>();
command.add(java); // depend... |
public class class_name {
private boolean readMetaData() throws InvalidDataException {
final ByteBuffer buf = storage.get(0);
int magic1, magic2, t_b_order_leaf, t_b_order_internal, t_blockSize; // sanity
boolean isClean = false;
magic1 = buf.getInt();
if (magic1 != MAGIC_1) {
throw new InvalidDataExcepti... | public class class_name {
private boolean readMetaData() throws InvalidDataException {
final ByteBuffer buf = storage.get(0);
int magic1, magic2, t_b_order_leaf, t_b_order_internal, t_blockSize; // sanity
boolean isClean = false;
magic1 = buf.getInt();
if (magic1 != MAGIC_1) {
throw new InvalidDataExcepti... |
public class class_name {
public static List<Field> getAllDeclaredFields(Object object) {
List<Field> allFields = new ArrayList<>();
Class<?> objClass = object.getClass();
// Loop through the class hierarchy
while (objClass != Object.class) {
allFields.addAll(Arrays... | public class class_name {
public static List<Field> getAllDeclaredFields(Object object) {
List<Field> allFields = new ArrayList<>();
Class<?> objClass = object.getClass();
// Loop through the class hierarchy
while (objClass != Object.class) {
allFields.addAll(Arrays... |
public class class_name {
private void refineReferenceVector() {
referenceVector = new Vector3d(Y_AXIS);
if (rotationGroup.getPointGroup().startsWith("C")) {
referenceVector = getReferenceAxisCylicWithSubunitAlignment();
} else if (rotationGroup.getPointGroup().startsWith("D")) {
referenceVector = getRefer... | public class class_name {
private void refineReferenceVector() {
referenceVector = new Vector3d(Y_AXIS);
if (rotationGroup.getPointGroup().startsWith("C")) {
referenceVector = getReferenceAxisCylicWithSubunitAlignment(); // depends on control dependency: [if], data = [none]
} else if (rotationGroup.getPointGr... |
public class class_name {
private void loadTldFromClassloader(GlobalTagLibConfig globalTagLibConfig, TldParser tldParser) {
for (Iterator itr = globalTagLibConfig.getTldPathList().iterator(); itr.hasNext();) {
TldPathConfig tldPathConfig = (TldPathConfig) itr.next();
InputStream is = gl... | public class class_name {
private void loadTldFromClassloader(GlobalTagLibConfig globalTagLibConfig, TldParser tldParser) {
for (Iterator itr = globalTagLibConfig.getTldPathList().iterator(); itr.hasNext();) {
TldPathConfig tldPathConfig = (TldPathConfig) itr.next();
InputStream is = gl... |
public class class_name {
public void addTreeItem(CmsObject cms, CmsResource resource, CmsUUID parentId) {
List<Container.Filter> filters = Lists.newArrayList(getContainerFilters());
// getItem only finds an existing item if it isn't filtered out by the container
// filters, so we temporarily... | public class class_name {
public void addTreeItem(CmsObject cms, CmsResource resource, CmsUUID parentId) {
List<Container.Filter> filters = Lists.newArrayList(getContainerFilters());
// getItem only finds an existing item if it isn't filtered out by the container
// filters, so we temporarily... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.