code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
public synchronized String getString()
{
checkReleased();
String returningString = null;
// Read the length in
short stringLength = receivedBuffer.getShort();
// Allocate the right amount of space for it
byte[] stringBytes = new byte[stringLength];
... | public class class_name {
public synchronized String getString()
{
checkReleased();
String returningString = null;
// Read the length in
short stringLength = receivedBuffer.getShort();
// Allocate the right amount of space for it
byte[] stringBytes = new byte[stringLength];
... |
public class class_name {
public MapConfiguration createOsmMap(int nrOfLevels) {
MapConfiguration configuration = new MapConfigurationImpl();
Bbox bounds = new Bbox(-OSM_HALF_WIDTH, -OSM_HALF_WIDTH, 2 * OSM_HALF_WIDTH, 2 * OSM_HALF_WIDTH);
configuration.setCrs(OSM_EPSG, CrsType.METRIC);
configuration.setHintVa... | public class class_name {
public MapConfiguration createOsmMap(int nrOfLevels) {
MapConfiguration configuration = new MapConfigurationImpl();
Bbox bounds = new Bbox(-OSM_HALF_WIDTH, -OSM_HALF_WIDTH, 2 * OSM_HALF_WIDTH, 2 * OSM_HALF_WIDTH);
configuration.setCrs(OSM_EPSG, CrsType.METRIC);
configuration.setHintVa... |
public class class_name {
public void marshall(DescribeConfigurationAggregatorsRequest describeConfigurationAggregatorsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeConfigurationAggregatorsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... | public class class_name {
public void marshall(DescribeConfigurationAggregatorsRequest describeConfigurationAggregatorsRequest, ProtocolMarshaller protocolMarshaller) {
if (describeConfigurationAggregatorsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... |
public class class_name {
public Word2VecPrediction predictWord2Vec(RowData data) throws PredictException {
validateModelCategory(ModelCategory.WordEmbedding);
if (! (m instanceof WordEmbeddingModel))
throw new PredictException("Model is not of the expected type, class = " + m.getClass().getSimpleName()... | public class class_name {
public Word2VecPrediction predictWord2Vec(RowData data) throws PredictException {
validateModelCategory(ModelCategory.WordEmbedding);
if (! (m instanceof WordEmbeddingModel))
throw new PredictException("Model is not of the expected type, class = " + m.getClass().getSimpleName()... |
public class class_name {
public TimeOfDay withChronologyRetainFields(Chronology newChronology) {
newChronology = DateTimeUtils.getChronology(newChronology);
newChronology = newChronology.withUTC();
if (newChronology == getChronology()) {
return this;
} else {
Ti... | public class class_name {
public TimeOfDay withChronologyRetainFields(Chronology newChronology) {
newChronology = DateTimeUtils.getChronology(newChronology);
newChronology = newChronology.withUTC();
if (newChronology == getChronology()) {
return this; // depends on control dependenc... |
public class class_name {
public static String[] getFormats() {
JsArrayString tempArr = nativeGetFormats();
if ((tempArr == null) || (tempArr.length() == 0)) {
return null;
}
String[] result = new String[tempArr.length()];
for (int i = 0; i < tempArr.length(); i++) ... | public class class_name {
public static String[] getFormats() {
JsArrayString tempArr = nativeGetFormats();
if ((tempArr == null) || (tempArr.length() == 0)) {
return null; // depends on control dependency: [if], data = [none]
}
String[] result = new String[tempArr.length()... |
public class class_name {
private void sendAlert(byte level, byte description) {
// the connectionState cannot be cs_START
if (connectionState >= cs_CLOSED) {
return;
}
// For initial handshaking, don't send alert message to peer if
// handshaker has not started.
... | public class class_name {
private void sendAlert(byte level, byte description) {
// the connectionState cannot be cs_START
if (connectionState >= cs_CLOSED) {
return; // depends on control dependency: [if], data = [none]
}
// For initial handshaking, don't send alert messag... |
public class class_name {
public Set<Terminal> get(Construction construction) {
if (construction.isTerminal()) {
Set<Terminal> result = new LinkedHashSet<Terminal>();
result.add((Terminal) construction);
return result;
}
return firstGrammar.get(construction.getName());
} } | public class class_name {
public Set<Terminal> get(Construction construction) {
if (construction.isTerminal()) {
Set<Terminal> result = new LinkedHashSet<Terminal>();
result.add((Terminal) construction); // depends on control dependency: [if], data = [none]
return result; // depends on control dependen... |
public class class_name {
protected void checkBestDistance(KdTree.Node node, P target) {
double distanceSq = distance.distance((P)node.point,target);
// <= because multiple nodes could be at the bestDistanceSq
if( distanceSq <= bestDistanceSq ) {
// see if the node is already in the list. This is possible ... | public class class_name {
protected void checkBestDistance(KdTree.Node node, P target) {
double distanceSq = distance.distance((P)node.point,target);
// <= because multiple nodes could be at the bestDistanceSq
if( distanceSq <= bestDistanceSq ) {
// see if the node is already in the list. This is possible ... |
public class class_name {
public static void deleteChildrenNotInCollection(Resource resource, ConfigurationCollectionPersistData data) {
Set<String> collectionItemNames = data.getItems().stream()
.map(item -> item.getCollectionItemName())
.collect(Collectors.toSet());
for (Resource child : res... | public class class_name {
public static void deleteChildrenNotInCollection(Resource resource, ConfigurationCollectionPersistData data) {
Set<String> collectionItemNames = data.getItems().stream()
.map(item -> item.getCollectionItemName())
.collect(Collectors.toSet());
for (Resource child : res... |
public class class_name {
public BitCounterUncompressed makeNested(DataDescriptor subKey, int n, int row, int replicationCountSize) {
if (subCounters == null)
subCounters = new HashMap<DataDescriptor, BitCounterUncompressed[]>(5); // assumes DataDescriptor.equals is ==
BitCounterUncompressed[] subCo... | public class class_name {
public BitCounterUncompressed makeNested(DataDescriptor subKey, int n, int row, int replicationCountSize) {
if (subCounters == null)
subCounters = new HashMap<DataDescriptor, BitCounterUncompressed[]>(5); // assumes DataDescriptor.equals is ==
BitCounterUncompressed[] subCo... |
public class class_name {
public P getPresenter() {
if (presenterFactory != null) {
if (presenter == null && bundle != null)
presenter = PresenterStorage.INSTANCE.getPresenter(bundle.getString(PRESENTER_ID_KEY));
if (presenter == null) {
presenter = pres... | public class class_name {
public P getPresenter() {
if (presenterFactory != null) {
if (presenter == null && bundle != null)
presenter = PresenterStorage.INSTANCE.getPresenter(bundle.getString(PRESENTER_ID_KEY));
if (presenter == null) {
presenter = pres... |
public class class_name {
public RepositoryDTO getOrFindUserRepository(String user, String repositoryName, GitRepoClient repoClient) {
RepositoryDTO repository = getUserRepository(user, repositoryName);
if (repository == null) {
List<RepositoryDTO> repositoryDTOs = repoClient.listRepositori... | public class class_name {
public RepositoryDTO getOrFindUserRepository(String user, String repositoryName, GitRepoClient repoClient) {
RepositoryDTO repository = getUserRepository(user, repositoryName);
if (repository == null) {
List<RepositoryDTO> repositoryDTOs = repoClient.listRepositori... |
public class class_name {
public DescribeServersResult withServers(Server... servers) {
if (this.servers == null) {
setServers(new java.util.ArrayList<Server>(servers.length));
}
for (Server ele : servers) {
this.servers.add(ele);
}
return this;
} } | public class class_name {
public DescribeServersResult withServers(Server... servers) {
if (this.servers == null) {
setServers(new java.util.ArrayList<Server>(servers.length)); // depends on control dependency: [if], data = [none]
}
for (Server ele : servers) {
this.serv... |
public class class_name {
public void printXMLElement(String name, String[][] attributes)
{
Element element = new DefaultElement(name);
if (attributes != null && attributes.length > 0) {
for (String[] entry : attributes) {
element.addAttribute(entry[0], entry[1]);
... | public class class_name {
public void printXMLElement(String name, String[][] attributes)
{
Element element = new DefaultElement(name);
if (attributes != null && attributes.length > 0) {
for (String[] entry : attributes) {
element.addAttribute(entry[0], entry[1]); // de... |
public class class_name {
public void removeLayer(Layer layer) {
if (layers.contains(layer)) {
layers.remove(layer);
mapInfo.getLayers().remove(layer.getLayerInfo());
handlerManager.fireEvent(new MapModelChangedEvent(this));
}
} } | public class class_name {
public void removeLayer(Layer layer) {
if (layers.contains(layer)) {
layers.remove(layer); // depends on control dependency: [if], data = [none]
mapInfo.getLayers().remove(layer.getLayerInfo()); // depends on control dependency: [if], data = [none]
handlerManager.fireEvent(new MapM... |
public class class_name {
private JBBPTokenizerException checkFieldName(final String name, final int position) {
if (name != null) {
final String normalized = JBBPUtils.normalizeFieldNameOrPath(name);
if (normalized.indexOf('.') >= 0) {
return new JBBPTokenizerException("Field name must not con... | public class class_name {
private JBBPTokenizerException checkFieldName(final String name, final int position) {
if (name != null) {
final String normalized = JBBPUtils.normalizeFieldNameOrPath(name);
if (normalized.indexOf('.') >= 0) {
return new JBBPTokenizerException("Field name must not con... |
public class class_name {
public BrokerInstance withEndpoints(String... endpoints) {
if (this.endpoints == null) {
setEndpoints(new java.util.ArrayList<String>(endpoints.length));
}
for (String ele : endpoints) {
this.endpoints.add(ele);
}
return this;
... | public class class_name {
public BrokerInstance withEndpoints(String... endpoints) {
if (this.endpoints == null) {
setEndpoints(new java.util.ArrayList<String>(endpoints.length)); // depends on control dependency: [if], data = [none]
}
for (String ele : endpoints) {
this... |
public class class_name {
public static final int getDateTimeIndex(String entity)
{
if ( entity == null ) {
return -1;
}
int sIdx = entity.indexOf('.');
if ( sIdx == -1 ) {
return DATETIME_NONE;
}
String attr = entity.substri... | public class class_name {
public static final int getDateTimeIndex(String entity)
{
if ( entity == null ) {
return -1; // depends on control dependency: [if], data = [none]
}
int sIdx = entity.indexOf('.');
if ( sIdx == -1 ) {
return DATETIME_NONE; /... |
public class class_name {
@Override
public Authentication attemptAuthentication(HttpServletRequest request,
HttpServletResponse response) throws AuthenticationException, IOException {
OpenIDAuthenticationToken token;
String identity = request.getParameter("openid.identity");
if (!StringUtils.hasText(identi... | public class class_name {
@Override
public Authentication attemptAuthentication(HttpServletRequest request,
HttpServletResponse response) throws AuthenticationException, IOException {
OpenIDAuthenticationToken token;
String identity = request.getParameter("openid.identity");
if (!StringUtils.hasText(identi... |
public class class_name {
public void marshall(NoiseReducerSpatialFilterSettings noiseReducerSpatialFilterSettings, ProtocolMarshaller protocolMarshaller) {
if (noiseReducerSpatialFilterSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
... | public class class_name {
public void marshall(NoiseReducerSpatialFilterSettings noiseReducerSpatialFilterSettings, ProtocolMarshaller protocolMarshaller) {
if (noiseReducerSpatialFilterSettings == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
... |
public class class_name {
protected String getColName(TableAlias aTableAlias, PathInfo aPathInfo, boolean translate)
{
String result = null;
// no translation required, use attribute name
if (!translate)
{
return aPathInfo.column;
}
// BRJ: sp... | public class class_name {
protected String getColName(TableAlias aTableAlias, PathInfo aPathInfo, boolean translate)
{
String result = null;
// no translation required, use attribute name
if (!translate)
{
return aPathInfo.column;
// depends on control dependenc... |
public class class_name {
public String[] getMetaInfo(JavaRDD<String> fileRDD, String fieldSeparator) {
String[] headers = null;
int sampleSize = 5;
// sanity check
if (sampleSize < 1) {
mLog.info("DATATYPE_SAMPLE_SIZE must be bigger than 1");
return null;
}
List<String> sampleStr... | public class class_name {
public String[] getMetaInfo(JavaRDD<String> fileRDD, String fieldSeparator) {
String[] headers = null;
int sampleSize = 5;
// sanity check
if (sampleSize < 1) {
mLog.info("DATATYPE_SAMPLE_SIZE must be bigger than 1"); // depends on control dependency: [if], data = [none... |
public class class_name {
protected String getDiscoveryResponseURL(String entityBaseURL, String entityAlias) {
if (extendedMetadata != null && extendedMetadata.getIdpDiscoveryResponseURL() != null
&& extendedMetadata.getIdpDiscoveryResponseURL().length() > 0) {
return extendedMetada... | public class class_name {
protected String getDiscoveryResponseURL(String entityBaseURL, String entityAlias) {
if (extendedMetadata != null && extendedMetadata.getIdpDiscoveryResponseURL() != null
&& extendedMetadata.getIdpDiscoveryResponseURL().length() > 0) {
return extendedMetada... |
public class class_name {
public static double[] minus(final double[] v1, final double[] v2) {
assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
final double[] sub = new double[v1.length];
for(int i = 0; i < v1.length; i++) {
sub[i] = v1[i] - v2[i];
}
return sub;
} } | public class class_name {
public static double[] minus(final double[] v1, final double[] v2) {
assert v1.length == v2.length : ERR_VEC_DIMENSIONS;
final double[] sub = new double[v1.length];
for(int i = 0; i < v1.length; i++) {
sub[i] = v1[i] - v2[i]; // depends on control dependency: [for], data = [... |
public class class_name {
public static String binaryToHex(byte[] data, int offset, int length)
{
assert offset < data.length && offset >= 0 : offset + ", " + data.length;
int end = offset + length;
assert end <= data.length && end >= 0 : offset + ", " + length + ", " + data.length;
... | public class class_name {
public static String binaryToHex(byte[] data, int offset, int length)
{
assert offset < data.length && offset >= 0 : offset + ", " + data.length;
int end = offset + length;
assert end <= data.length && end >= 0 : offset + ", " + length + ", " + data.length;
... |
public class class_name {
private Collection<ImageListEditor<ColumnType>.Entry> getAcceptableEntries(final ColumnType type) {
final Collection<ImageListEditor<ColumnType>.Entry> result = new ArrayList<ImageListEditor<org.dashbuilder.dataset.ColumnType>.Entry>();
if (type != null) {
if (Colu... | public class class_name {
private Collection<ImageListEditor<ColumnType>.Entry> getAcceptableEntries(final ColumnType type) {
final Collection<ImageListEditor<ColumnType>.Entry> result = new ArrayList<ImageListEditor<org.dashbuilder.dataset.ColumnType>.Entry>();
if (type != null) {
if (Colu... |
public class class_name {
public void addMemberTags(ExecutableElement member, Content methodsContentTree) {
Content tagContent = new ContentBuilder();
TagletManager tagletManager =
configuration.tagletManager;
TagletWriter.genTagOutput(tagletManager, member,
tagletManage... | public class class_name {
public void addMemberTags(ExecutableElement member, Content methodsContentTree) {
Content tagContent = new ContentBuilder();
TagletManager tagletManager =
configuration.tagletManager;
TagletWriter.genTagOutput(tagletManager, member,
tagletManage... |
public class class_name {
public static ExpiryDate fromAbsolute(long expiryDate) {
long creationTime = System.currentTimeMillis();
long relativeTtl;
try {
relativeTtl = Math.subtractExact(expiryDate, creationTime);
} catch (ArithmeticException exception) {
relati... | public class class_name {
public static ExpiryDate fromAbsolute(long expiryDate) {
long creationTime = System.currentTimeMillis();
long relativeTtl;
try {
relativeTtl = Math.subtractExact(expiryDate, creationTime); // depends on control dependency: [try], data = [none]
} cat... |
public class class_name {
@Override
public Money[] divideAndRemainder(double divisor) {
if (NumberVerifier.isInfinityAndNotNaN(divisor)) {
Money zero = Money.of(0, getCurrency());
return new Money[]{zero, zero};
}
return divideAndRemainder(new BigDecimal(String.value... | public class class_name {
@Override
public Money[] divideAndRemainder(double divisor) {
if (NumberVerifier.isInfinityAndNotNaN(divisor)) {
Money zero = Money.of(0, getCurrency());
return new Money[]{zero, zero}; // depends on control dependency: [if], data = [none]
}
... |
public class class_name {
@Override
public IValueNode getValueNode(String language) {
if (language == null) {
return null;
}
return valueNodeMap.get(language);
} } | public class class_name {
@Override
public IValueNode getValueNode(String language) {
if (language == null) {
return null; // depends on control dependency: [if], data = [none]
}
return valueNodeMap.get(language);
} } |
public class class_name {
public void removeSpace(String spaceId) {
// Will throw if bucket does not exist
String bucketName = getBucketName(spaceId);
try {
s3Client.deleteBucket(bucketName);
} catch (AmazonClientException e) {
String err = "Could not delete S3 ... | public class class_name {
public void removeSpace(String spaceId) {
// Will throw if bucket does not exist
String bucketName = getBucketName(spaceId);
try {
s3Client.deleteBucket(bucketName); // depends on control dependency: [try], data = [none]
} catch (AmazonClientExcept... |
public class class_name {
private Integer getNumberOfDocuments(List<File> inputFiles) throws ResourceInitializationException{
String directory = (String) getConfigParameterValue(PARAM_INPUTDIR);
String filename = directory+"/"+FILE_BASE_SEGMENTATION;
for (File file : inputFiles) {
if (file.getAbsolutePath()... | public class class_name {
private Integer getNumberOfDocuments(List<File> inputFiles) throws ResourceInitializationException{
String directory = (String) getConfigParameterValue(PARAM_INPUTDIR);
String filename = directory+"/"+FILE_BASE_SEGMENTATION;
for (File file : inputFiles) {
if (file.getAbsolutePath()... |
public class class_name {
public static boolean hasInjectAnnotation(Element element) {
for (AnnotationMirror annotationMirror : element.getAnnotationMirrors()) {
String annotationQualifiedName = annotationMirror.getAnnotationType().toString();
if (annotationQualifiedName.equals(Inject.class.getCanonica... | public class class_name {
public static boolean hasInjectAnnotation(Element element) {
for (AnnotationMirror annotationMirror : element.getAnnotationMirrors()) {
String annotationQualifiedName = annotationMirror.getAnnotationType().toString();
if (annotationQualifiedName.equals(Inject.class.getCanonica... |
public class class_name {
public List<MockResponse> enqueue(String... paths) {
if (paths == null) {
return null;
}
List<MockResponse> mockResponseList = new ArrayList<>();
for (String path : paths) {
Fixture fixture = Fixture.parseFrom(path, parser);
MockResponse mockResponse = fixtur... | public class class_name {
public List<MockResponse> enqueue(String... paths) {
if (paths == null) {
return null; // depends on control dependency: [if], data = [none]
}
List<MockResponse> mockResponseList = new ArrayList<>();
for (String path : paths) {
Fixture fixture = Fixture.parseFrom(p... |
public class class_name {
Lexeme removeTail(){
Lexeme tail = this.pollLast();
if(this.isEmpty()){
this.pathBegin = -1;
this.pathEnd = -1;
this.payloadLength = 0;
}else{
this.payloadLength -= tail.getLength();
Lexeme newTail = this.peekLast();
this.pathEnd = newTail.getBegin() + ne... | public class class_name {
Lexeme removeTail(){
Lexeme tail = this.pollLast();
if(this.isEmpty()){
this.pathBegin = -1;
// depends on control dependency: [if], data = [none]
this.pathEnd = -1;
// depends on control dependency: [if], data = [none]
this.payloadLength = 0;
// depends on control depen... |
public class class_name {
public static double weightedCoefficient(NumberVector x, NumberVector y, double[] weights) {
final int xdim = x.getDimensionality();
final int ydim = y.getDimensionality();
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: number vectors differ in dim... | public class class_name {
public static double weightedCoefficient(NumberVector x, NumberVector y, double[] weights) {
final int xdim = x.getDimensionality();
final int ydim = y.getDimensionality();
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: number vectors differ in dim... |
public class class_name {
@Override
public boolean validate(final Problems problems, final String compName, final String model) {
final ParsePosition p = new ParsePosition(0);
try {
NumberFormat.getNumberInstance(this.locale == null ? Locale.getDefault() : this.locale).parse(model, p);
if (model.length() !=... | public class class_name {
@Override
public boolean validate(final Problems problems, final String compName, final String model) {
final ParsePosition p = new ParsePosition(0);
try {
NumberFormat.getNumberInstance(this.locale == null ? Locale.getDefault() : this.locale).parse(model, p); // depends on control de... |
public class class_name {
void computeCellHistograms() {
int width = cellCols* pixelsPerCell;
int height = cellRows* pixelsPerCell;
float angleBinSize = GrlConstants.F_PI/orientationBins;
int indexCell = 0;
for (int i = 0; i < height; i += pixelsPerCell) {
for (int j = 0; j < width; j += pixelsPerCell,... | public class class_name {
void computeCellHistograms() {
int width = cellCols* pixelsPerCell;
int height = cellRows* pixelsPerCell;
float angleBinSize = GrlConstants.F_PI/orientationBins;
int indexCell = 0;
for (int i = 0; i < height; i += pixelsPerCell) {
for (int j = 0; j < width; j += pixelsPerCell,... |
public class class_name {
@Requires({
"isValidPattern(pattern)",
"rule != null"
})
@Ensures({
"rule.equals(get(pattern))",
"!isOverriden(pattern)"
})
public void put(String pattern, R rule) {
String canon = pattern.replace('/', '.');
boolean exact = !canon.endsWith(".*");
if (!exact... | public class class_name {
@Requires({
"isValidPattern(pattern)",
"rule != null"
})
@Ensures({
"rule.equals(get(pattern))",
"!isOverriden(pattern)"
})
public void put(String pattern, R rule) {
String canon = pattern.replace('/', '.');
boolean exact = !canon.endsWith(".*");
if (!exact... |
public class class_name {
public int readInt(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 32; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy;
++i;
}
return result;
} } | public class class_name {
public int readInt(int offset, byte[] data)
{
int result = 0;
int i = offset + m_offset;
for (int shiftBy = 0; shiftBy < 32; shiftBy += 8)
{
result |= ((data[i] & 0xff)) << shiftBy; // depends on control dependency: [for], data = [shiftBy]
++i; // ... |
public class class_name {
public DescribeLifecycleHookTypesResult withLifecycleHookTypes(String... lifecycleHookTypes) {
if (this.lifecycleHookTypes == null) {
setLifecycleHookTypes(new com.amazonaws.internal.SdkInternalList<String>(lifecycleHookTypes.length));
}
for (String ele : l... | public class class_name {
public DescribeLifecycleHookTypesResult withLifecycleHookTypes(String... lifecycleHookTypes) {
if (this.lifecycleHookTypes == null) {
setLifecycleHookTypes(new com.amazonaws.internal.SdkInternalList<String>(lifecycleHookTypes.length)); // depends on control dependency: [if... |
public class class_name {
public void nodeAppRemoved(String nodeName, ResourceType type) {
Set<String> sessions = nodeManager.getNodeSessions(nodeName);
Set<ClusterNode.GrantId> grantsToRevoke =
nodeManager.deleteAppFromNode(nodeName, type);
if (grantsToRevoke == null) {
return;
}
Set<S... | public class class_name {
public void nodeAppRemoved(String nodeName, ResourceType type) {
Set<String> sessions = nodeManager.getNodeSessions(nodeName);
Set<ClusterNode.GrantId> grantsToRevoke =
nodeManager.deleteAppFromNode(nodeName, type);
if (grantsToRevoke == null) {
return; // depends on c... |
public class class_name {
public ModuleInfoList filter(final ModuleInfoFilter filter) {
final ModuleInfoList moduleInfoFiltered = new ModuleInfoList();
for (final ModuleInfo resource : this) {
if (filter.accept(resource)) {
moduleInfoFiltered.add(resource);
}
... | public class class_name {
public ModuleInfoList filter(final ModuleInfoFilter filter) {
final ModuleInfoList moduleInfoFiltered = new ModuleInfoList();
for (final ModuleInfo resource : this) {
if (filter.accept(resource)) {
moduleInfoFiltered.add(resource); // depends on con... |
public class class_name {
public void setAddToPath(boolean isAddToPath) {
if(started) {
throw new IllegalStateException("Cannot set a record route on an already started proxy");
}
if(this.pathURI == null) {
this.pathURI = new SipURIImpl (JainSipUtils.createRecordRouteURI( proxy.getSipFactoryImpl().getSipNe... | public class class_name {
public void setAddToPath(boolean isAddToPath) {
if(started) {
throw new IllegalStateException("Cannot set a record route on an already started proxy");
}
if(this.pathURI == null) {
this.pathURI = new SipURIImpl (JainSipUtils.createRecordRouteURI( proxy.getSipFactoryImpl().getSipNe... |
public class class_name {
protected void fireObjectAction (
ObjectActionHandler handler, SceneObject scobj, ActionEvent event)
{
if (handler == null) {
Controller.postAction(event);
} else {
handler.handleAction(scobj, event);
}
} } | public class class_name {
protected void fireObjectAction (
ObjectActionHandler handler, SceneObject scobj, ActionEvent event)
{
if (handler == null) {
Controller.postAction(event); // depends on control dependency: [if], data = [none]
} else {
handler.handleAction(s... |
public class class_name {
@Override
public int indexOf(final Object object) {
if (object instanceof Integer) {
int value = (Integer) object;
if (value >= startIndex && value <= endIndex) {
return value - startIndex;
}
}
return -1;
} } | public class class_name {
@Override
public int indexOf(final Object object) {
if (object instanceof Integer) {
int value = (Integer) object;
if (value >= startIndex && value <= endIndex) {
return value - startIndex; // depends on control dependency: [if], data = [none]
}
}
return -1;
} } |
public class class_name {
public void addAnonymousFunctions() {
TreeSet<SymbolScope> scopes = new TreeSet<>(lexicalScopeOrdering);
for (SymbolScope scope : getAllScopes()) {
if (scope.isLexicalScope()) {
scopes.add(scope);
}
}
for (SymbolScope scope : scopes) {
addAnonymousFu... | public class class_name {
public void addAnonymousFunctions() {
TreeSet<SymbolScope> scopes = new TreeSet<>(lexicalScopeOrdering);
for (SymbolScope scope : getAllScopes()) {
if (scope.isLexicalScope()) {
scopes.add(scope); // depends on control dependency: [if], data = [none]
}
}
f... |
public class class_name {
@Deprecated
public static String decode(String string)
{
try {
byte[] bytes = Base64.decode(string.toCharArray());
return new String(bytes, DEFAULT_ENCODING);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
... | public class class_name {
@Deprecated
public static String decode(String string)
{
try {
byte[] bytes = Base64.decode(string.toCharArray());
return new String(bytes, DEFAULT_ENCODING); // depends on control dependency: [try], data = [none]
} catch (UnsupportedEncodingExc... |
public class class_name {
private String formatVersion(String version) {
if (version == null) {
return version;
}
String[] split = version.split(GERRIT_VERSION_PREFIX);
if (split.length < 2) {
return version.trim();
}
return split[1].trim();
}... | public class class_name {
private String formatVersion(String version) {
if (version == null) {
return version; // depends on control dependency: [if], data = [none]
}
String[] split = version.split(GERRIT_VERSION_PREFIX);
if (split.length < 2) {
return version.t... |
public class class_name {
public void sendTriState(String codeWord) {
if (transmitterPin != null) {
for (int nRepeat = 0; nRepeat < repeatTransmit; nRepeat++) {
for (int i = 0; i < codeWord.length(); ++i) {
switch (codeWord.charAt(i)) {
ca... | public class class_name {
public void sendTriState(String codeWord) {
if (transmitterPin != null) {
for (int nRepeat = 0; nRepeat < repeatTransmit; nRepeat++) {
for (int i = 0; i < codeWord.length(); ++i) {
switch (codeWord.charAt(i)) { // depends on control depe... |
public class class_name {
@Override
public DurationFormatterFactory setPeriodBuilder(PeriodBuilder builder) {
if (builder != this.builder) {
this.builder = builder;
reset();
}
return this;
} } | public class class_name {
@Override
public DurationFormatterFactory setPeriodBuilder(PeriodBuilder builder) {
if (builder != this.builder) {
this.builder = builder; // depends on control dependency: [if], data = [none]
reset(); // depends on control dependency: [if], data = [none]
}
return th... |
public class class_name {
public void undeployed() {
classLoader = null;
if (classLoaderDomain != null) {
classLoaderDomain.clear();
classLoaderDomain = null;
}
if (classPool != null) {
classPool.clean();
classPool = null;
}
if (permissions != null) {
permissions.clear();... | public class class_name {
public void undeployed() {
classLoader = null;
if (classLoaderDomain != null) {
classLoaderDomain.clear(); // depends on control dependency: [if], data = [none]
classLoaderDomain = null; // depends on control dependency: [if], data = [none]
}
if (classPool != nu... |
public class class_name {
private void initOldAdditionalResources() {
SortedMap<String, String> parameters = new TreeMap<String, String>(m_parameters);
List<String> resources = new ArrayList<String>(m_resources);
String additionalResources;
additionalResources = parameters.get(MODULE_... | public class class_name {
private void initOldAdditionalResources() {
SortedMap<String, String> parameters = new TreeMap<String, String>(m_parameters);
List<String> resources = new ArrayList<String>(m_resources);
String additionalResources;
additionalResources = parameters.get(MODULE_... |
public class class_name {
public boolean runOptimize() {
boolean hasChanged = false;
for (BitmapDataProvider lowBitmap : highToBitmap.values()) {
if (lowBitmap instanceof RoaringBitmap) {
hasChanged |= ((RoaringBitmap) lowBitmap).runOptimize();
} else if (lowBitmap instanceof MutableRoaring... | public class class_name {
public boolean runOptimize() {
boolean hasChanged = false;
for (BitmapDataProvider lowBitmap : highToBitmap.values()) {
if (lowBitmap instanceof RoaringBitmap) {
hasChanged |= ((RoaringBitmap) lowBitmap).runOptimize(); // depends on control dependency: [if], data = [none... |
public class class_name {
public boolean isAllBroadcastTables(final Collection<String> logicTableNames) {
if (logicTableNames.isEmpty()) {
return false;
}
for (String each : logicTableNames) {
if (!isBroadcastTable(each)) {
return false;
}
... | public class class_name {
public boolean isAllBroadcastTables(final Collection<String> logicTableNames) {
if (logicTableNames.isEmpty()) {
return false; // depends on control dependency: [if], data = [none]
}
for (String each : logicTableNames) {
if (!isBroadcastTable(ea... |
public class class_name {
public static base_responses update(nitro_service client, snmpmanager resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
snmpmanager updateresources[] = new snmpmanager[resources.length];
for (int i=0;i<resources.length;i++... | public class class_name {
public static base_responses update(nitro_service client, snmpmanager resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
snmpmanager updateresources[] = new snmpmanager[resources.length];
for (int i=0;i<resources.length;i++... |
public class class_name {
public static String getPreTime(String sj1, String jj) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String mydate1 = "";
try {
Date date1 = format.parse(sj1);
long Time = (date1.getTime() / 1000) + Integer.parseInt(jj... | public class class_name {
public static String getPreTime(String sj1, String jj) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String mydate1 = "";
try {
Date date1 = format.parse(sj1);
long Time = (date1.getTime() / 1000) + Integer.parseInt(jj... |
public class class_name {
public static String roleHierarchyFromMap(Map<String, List<String>> roleHierarchyMap) {
Assert.notEmpty(roleHierarchyMap, "roleHierarchyMap cannot be empty");
StringWriter roleHierarchyBuffer = new StringWriter();
PrintWriter roleHierarchyWriter = new PrintWriter(roleHierarchyBuffer);
... | public class class_name {
public static String roleHierarchyFromMap(Map<String, List<String>> roleHierarchyMap) {
Assert.notEmpty(roleHierarchyMap, "roleHierarchyMap cannot be empty");
StringWriter roleHierarchyBuffer = new StringWriter();
PrintWriter roleHierarchyWriter = new PrintWriter(roleHierarchyBuffer);
... |
public class class_name {
public int getKerning(char first, char second) {
Map toMap = (Map) ansiKerning.get(new Integer(first));
if (toMap == null) {
return 0;
}
Integer kerning = (Integer) toMap.get(new Integer(second));
if (kerning == null) {
return 0;
}
return Math.round(conver... | public class class_name {
public int getKerning(char first, char second) {
Map toMap = (Map) ansiKerning.get(new Integer(first));
if (toMap == null) {
return 0;
// depends on control dependency: [if], data = [none]
}
Integer kerning = (Integer) toMap.get(new Integer(second));
if (kerning == null... |
public class class_name {
public void marshall(Route route, ProtocolMarshaller protocolMarshaller) {
if (route == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(route.getApiKeyRequired(), APIKEYREQU... | public class class_name {
public void marshall(Route route, ProtocolMarshaller protocolMarshaller) {
if (route == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(route.getApiKeyRequired(), APIKEYREQU... |
public class class_name {
public static boolean isValid(String name) {
char[] nameChars = name.toCharArray();
for (int i = 0; i < nameChars.length; i++) {
boolean valid = i == 0 ? Character.isJavaIdentifierStart(nameChars[i]) : Character.isJavaIdentifierPart(nameChars[i]);
if (!valid) {
return valid;
... | public class class_name {
public static boolean isValid(String name) {
char[] nameChars = name.toCharArray();
for (int i = 0; i < nameChars.length; i++) {
boolean valid = i == 0 ? Character.isJavaIdentifierStart(nameChars[i]) : Character.isJavaIdentifierPart(nameChars[i]);
if (!valid) {
return valid; // ... |
public class class_name {
public static int ordinalIndexOf(String str, String searchStr, int ordinal) {
if (str == null || searchStr == null || ordinal <= 0) {
return INDEX_NOT_FOUND;
}
if (searchStr.length() == 0) {
return 0;
}
int found = 0;
int index = INDEX_N... | public class class_name {
public static int ordinalIndexOf(String str, String searchStr, int ordinal) {
if (str == null || searchStr == null || ordinal <= 0) {
return INDEX_NOT_FOUND; // depends on control dependency: [if], data = [none]
}
if (searchStr.length() == 0) {
return 0; ... |
public class class_name {
public void errorOccurred(SIConnectionLostException exception,
int segmentType,
int requestNumber,
int priority,
Conversation conversation)
{
if (TraceComponent.isAnyTr... | public class class_name {
public void errorOccurred(SIConnectionLostException exception,
int segmentType,
int requestNumber,
int priority,
Conversation conversation)
{
if (TraceComponent.isAnyTr... |
public class class_name {
public void setScheduledActionNames(java.util.Collection<String> scheduledActionNames) {
if (scheduledActionNames == null) {
this.scheduledActionNames = null;
return;
}
this.scheduledActionNames = new com.amazonaws.internal.SdkInternalList<Stri... | public class class_name {
public void setScheduledActionNames(java.util.Collection<String> scheduledActionNames) {
if (scheduledActionNames == null) {
this.scheduledActionNames = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], ... |
public class class_name {
protected FtpMessage listFiles(ListCommand list, TestContext context) {
String remoteFilePath = Optional.ofNullable(list.getTarget())
.map(ListCommand.Target::getPath)
.map(context::replaceDynamicContentIn... | public class class_name {
protected FtpMessage listFiles(ListCommand list, TestContext context) {
String remoteFilePath = Optional.ofNullable(list.getTarget())
.map(ListCommand.Target::getPath)
.map(context::replaceDynamicContentIn... |
public class class_name {
public static YearQuarter from(TemporalAccessor temporal) {
if (temporal instanceof YearQuarter) {
return (YearQuarter) temporal;
}
Objects.requireNonNull(temporal, "temporal");
try {
if (IsoChronology.INSTANCE.equals(Chronology.from(tem... | public class class_name {
public static YearQuarter from(TemporalAccessor temporal) {
if (temporal instanceof YearQuarter) {
return (YearQuarter) temporal; // depends on control dependency: [if], data = [none]
}
Objects.requireNonNull(temporal, "temporal");
try {
... |
public class class_name {
@SuppressWarnings("deprecation")
protected void sendError( int sc, String message, HttpServletRequest request, HttpServletResponse response )
throws IOException
{
if(400 <= sc && sc < 600 && !response.isCommitted()) {
String[] fileNames = new String[] {
"/"+Integer.t... | public class class_name {
@SuppressWarnings("deprecation")
protected void sendError( int sc, String message, HttpServletRequest request, HttpServletResponse response )
throws IOException
{
if(400 <= sc && sc < 600 && !response.isCommitted()) {
String[] fileNames = new String[] {
"/"+Integer.t... |
public class class_name {
protected String mergeDefinition(BeanDefinition target, ReconfigBeanDefinitionHolder source) {
if (null == target.getBeanClassName()) {
logger.warn("ingore bean definition {} for without class", source.getBeanName());
return null;
}
// 当类型变化后,删除原有配置
if (null != sou... | public class class_name {
protected String mergeDefinition(BeanDefinition target, ReconfigBeanDefinitionHolder source) {
if (null == target.getBeanClassName()) {
logger.warn("ingore bean definition {} for without class", source.getBeanName()); // depends on control dependency: [if], data = [none]
retur... |
public class class_name {
private static List<Integer> parseRange(String range, int max) {
List<Integer> idx = new ArrayList<Integer>();
String[] n = range.split(",");
for (String s : n) {
String[] d = s.split("-");
int mi = Integer.parseInt(d[0]);
if (mi < 0... | public class class_name {
private static List<Integer> parseRange(String range, int max) {
List<Integer> idx = new ArrayList<Integer>();
String[] n = range.split(",");
for (String s : n) {
String[] d = s.split("-");
int mi = Integer.parseInt(d[0]);
if (mi < 0... |
public class class_name {
public static boolean areAttributesLiteral(TagAttribute... attributes)
{
for (TagAttribute attribute : attributes)
{
if (attribute != null && !attribute.isLiteral())
{
// the attribute exists and is not literal
return... | public class class_name {
public static boolean areAttributesLiteral(TagAttribute... attributes)
{
for (TagAttribute attribute : attributes)
{
if (attribute != null && !attribute.isLiteral())
{
// the attribute exists and is not literal
return... |
public class class_name {
public List<VarPasswordPair> getGlobalVarPasswordPairs() {
List<VarPasswordPair> r = new ArrayList<VarPasswordPair>(getGlobalVarPasswordPairsList().size());
// deep copy
for(VarPasswordPair varPasswordPair: getGlobalVarPasswordPairsList()) {
r.add((VarPass... | public class class_name {
public List<VarPasswordPair> getGlobalVarPasswordPairs() {
List<VarPasswordPair> r = new ArrayList<VarPasswordPair>(getGlobalVarPasswordPairsList().size());
// deep copy
for(VarPasswordPair varPasswordPair: getGlobalVarPasswordPairsList()) {
r.add((VarPass... |
public class class_name {
public JobScheduleExistsOptions withIfModifiedSince(DateTime ifModifiedSince) {
if (ifModifiedSince == null) {
this.ifModifiedSince = null;
} else {
this.ifModifiedSince = new DateTimeRfc1123(ifModifiedSince);
}
return this;
} } | public class class_name {
public JobScheduleExistsOptions withIfModifiedSince(DateTime ifModifiedSince) {
if (ifModifiedSince == null) {
this.ifModifiedSince = null; // depends on control dependency: [if], data = [none]
} else {
this.ifModifiedSince = new DateTimeRfc1123(ifModif... |
public class class_name {
private static void collapseConj(Collection<TypedDependency> list) {
List<TreeGraphNode> govs = new ArrayList<TreeGraphNode>();
// find typed deps of form cc(gov, dep)
for (TypedDependency td : list) {
if (td.reln() == COORDINATION) { // i.e. "cc"
TreeGraphNode ... | public class class_name {
private static void collapseConj(Collection<TypedDependency> list) {
List<TreeGraphNode> govs = new ArrayList<TreeGraphNode>();
// find typed deps of form cc(gov, dep)
for (TypedDependency td : list) {
if (td.reln() == COORDINATION) { // i.e. "cc"
TreeGraphNode ... |
public class class_name {
public NetworkInterface withTagSet(Tag... tagSet) {
if (this.tagSet == null) {
setTagSet(new com.amazonaws.internal.SdkInternalList<Tag>(tagSet.length));
}
for (Tag ele : tagSet) {
this.tagSet.add(ele);
}
return this;
} } | public class class_name {
public NetworkInterface withTagSet(Tag... tagSet) {
if (this.tagSet == null) {
setTagSet(new com.amazonaws.internal.SdkInternalList<Tag>(tagSet.length)); // depends on control dependency: [if], data = [none]
}
for (Tag ele : tagSet) {
this.tagSe... |
public class class_name {
public String annotationToHELM2() {
if (!(annotationSection.isEmpty())) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < annotationSection.size(); i++) {
sb.append(annotationSection.get(i).toHELM2() + "|");
}
sb.setLength(sb.length() - ... | public class class_name {
public String annotationToHELM2() {
if (!(annotationSection.isEmpty())) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < annotationSection.size(); i++) {
sb.append(annotationSection.get(i).toHELM2() + "|");
// depends on control dependency: [for], dat... |
public class class_name {
@POST
public Response runBackup(final InputStream bodyStream) throws IOException {
File backupDirectory;
if (null != bodyStream) {
final String body = IOUtils.toString(bodyStream).trim();
backupDirectory = new File(body.trim());
if (bo... | public class class_name {
@POST
public Response runBackup(final InputStream bodyStream) throws IOException {
File backupDirectory;
if (null != bodyStream) {
final String body = IOUtils.toString(bodyStream).trim();
backupDirectory = new File(body.trim());
if (bo... |
public class class_name {
public static PgConnectOptions fromEnv() {
PgConnectOptions pgConnectOptions = new PgConnectOptions();
if (getenv("PGHOSTADDR") == null) {
if (getenv("PGHOST") != null) {
pgConnectOptions.setHost(getenv("PGHOST"));
}
} else {
pgConnectOptions.setHost(get... | public class class_name {
public static PgConnectOptions fromEnv() {
PgConnectOptions pgConnectOptions = new PgConnectOptions();
if (getenv("PGHOSTADDR") == null) {
if (getenv("PGHOST") != null) {
pgConnectOptions.setHost(getenv("PGHOST")); // depends on control dependency: [if], data = [(getenv... |
public class class_name {
private boolean doesReaderOwnTooManySegments(ReaderGroupState state) {
Map<String, Double> sizesOfAssignemnts = state.getRelativeSizes();
Set<Segment> assignedSegments = state.getSegments(readerId);
if (sizesOfAssignemnts.isEmpty() || assignedSegments == null || assign... | public class class_name {
private boolean doesReaderOwnTooManySegments(ReaderGroupState state) {
Map<String, Double> sizesOfAssignemnts = state.getRelativeSizes();
Set<Segment> assignedSegments = state.getSegments(readerId);
if (sizesOfAssignemnts.isEmpty() || assignedSegments == null || assign... |
public class class_name {
public final EObject ruleXTryCatchFinallyExpression() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_4=null;
Token otherlv_6=null;
EObject lv_expression_2_0 = null;
EObject lv_catchClauses_3_0 = null;... | public class class_name {
public final EObject ruleXTryCatchFinallyExpression() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_4=null;
Token otherlv_6=null;
EObject lv_expression_2_0 = null;
EObject lv_catchClauses_3_0 = null;... |
public class class_name {
public static byte[] getURLData(final String url) {
final int readBytes = 1000;
URL u;
InputStream is = null;
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
// See http://www.exampledepot.com/egs/javax.net.ssl/TrustAll.html
... | public class class_name {
public static byte[] getURLData(final String url) {
final int readBytes = 1000;
URL u;
InputStream is = null;
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
// See http://www.exampledepot.com/egs/javax.net.ssl/TrustAll.html
... |
public class class_name {
public static Long getSize(final File file){
if ( file!=null && file.exists() ){
return file.length();
}
return null;
} } | public class class_name {
public static Long getSize(final File file){
if ( file!=null && file.exists() ){
return file.length(); // depends on control dependency: [if], data = [none]
}
return null;
} } |
public class class_name {
private void clearDeck(TrackMetadataUpdate update) {
if (hotCache.remove(DeckReference.getDeckReference(update.player, 0)) != null) {
deliverBeatGridUpdate(update.player, null);
}
} } | public class class_name {
private void clearDeck(TrackMetadataUpdate update) {
if (hotCache.remove(DeckReference.getDeckReference(update.player, 0)) != null) {
deliverBeatGridUpdate(update.player, null); // depends on control dependency: [if], data = [null)]
}
} } |
public class class_name {
public Observable<ServiceResponse<ResourceListKeysInner>> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, String policyKey) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter... | public class class_name {
public Observable<ServiceResponse<ResourceListKeysInner>> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, String policyKey) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter... |
public class class_name {
public static double recall(long tpCount, long fnCount, double edgeCase) {
//Edge case
if (tpCount == 0 && fnCount == 0) {
return edgeCase;
}
return tpCount / (double) (tpCount + fnCount);
} } | public class class_name {
public static double recall(long tpCount, long fnCount, double edgeCase) {
//Edge case
if (tpCount == 0 && fnCount == 0) {
return edgeCase; // depends on control dependency: [if], data = [none]
}
return tpCount / (double) (tpCount + fnCount);
}... |
public class class_name {
public static TvListing parse(InputStream inputStream) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
String line;
List<Channel> channels = new ArrayList<>();
List<Program> programs = new ArrayList<>();
... | public class class_name {
public static TvListing parse(InputStream inputStream) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
String line;
List<Channel> channels = new ArrayList<>();
List<Program> programs = new ArrayList<>();
... |
public class class_name {
public void closeWebApplicationContext(ServletContext servletContext) {
servletContext.log("Closing Spring root PortletApplicationContext");
try {
if (this.context instanceof ConfigurablePortletApplicationContext) {
((ConfigurablePortletApplicationC... | public class class_name {
public void closeWebApplicationContext(ServletContext servletContext) {
servletContext.log("Closing Spring root PortletApplicationContext");
try {
if (this.context instanceof ConfigurablePortletApplicationContext) {
((ConfigurablePortletApplicationC... |
public class class_name {
private boolean isRedundant(IContextMapping<INode> mapping, IMappingElement<INode> e) {
switch (e.getRelation()) {
case IMappingElement.LESS_GENERAL: {
if (verifyCondition1(mapping, e)) {
return true;
}
... | public class class_name {
private boolean isRedundant(IContextMapping<INode> mapping, IMappingElement<INode> e) {
switch (e.getRelation()) {
case IMappingElement.LESS_GENERAL: {
if (verifyCondition1(mapping, e)) {
return true;
// depends on control dependenc... |
public class class_name {
private Adapter getAdapter(String name) {
List<Adapter> services = getAdapterServices();
if (services != null) {
for (Adapter service : services) {
if (service.getName().equals(name)) {
return service;
}
}
}
Adapter result = new Adapter();
result.setName(name);
... | public class class_name {
private Adapter getAdapter(String name) {
List<Adapter> services = getAdapterServices();
if (services != null) {
for (Adapter service : services) {
if (service.getName().equals(name)) {
return service; // depends on control dependency: [if], data = [none]
}
}
}
Ad... |
public class class_name {
public void marshall(GetQueryResultsRequest getQueryResultsRequest, ProtocolMarshaller protocolMarshaller) {
if (getQueryResultsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarsha... | public class class_name {
public void marshall(GetQueryResultsRequest getQueryResultsRequest, ProtocolMarshaller protocolMarshaller) {
if (getQueryResultsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarsha... |
public class class_name {
public InputStream getInputStream(String strFilename)
{
InputStream streamIn = null;
if ((strFilename != null) && (strFilename.length() > 0))
{
try {
URL url = null;
if (strFilename.indexOf(':') == -1)
... | public class class_name {
public InputStream getInputStream(String strFilename)
{
InputStream streamIn = null;
if ((strFilename != null) && (strFilename.length() > 0))
{
try {
URL url = null;
if (strFilename.indexOf(':') == -1)
... |
public class class_name {
private static void possiblyFail(float chanceFailure, Random random) {
float value = random.nextFloat();
if (value < chanceFailure) {
LOG.fatal("shouldFail: Failing with value " + value +
" < " + chanceFailure);
System.exit(-1);
}
} } | public class class_name {
private static void possiblyFail(float chanceFailure, Random random) {
float value = random.nextFloat();
if (value < chanceFailure) {
LOG.fatal("shouldFail: Failing with value " + value +
" < " + chanceFailure); // depends on control dependency: [if], data = [none]
... |
public class class_name {
public static boolean containsOccurrences(
Multiset<?> superMultiset, Multiset<?> subMultiset) {
checkNotNull(superMultiset);
checkNotNull(subMultiset);
for (Entry<?> entry : subMultiset.entrySet()) {
int superCount = superMultiset.count(entry.getElement());
if (... | public class class_name {
public static boolean containsOccurrences(
Multiset<?> superMultiset, Multiset<?> subMultiset) {
checkNotNull(superMultiset);
checkNotNull(subMultiset);
for (Entry<?> entry : subMultiset.entrySet()) {
int superCount = superMultiset.count(entry.getElement());
if (... |
public class class_name {
@Override
public EClass getIfcVertex() {
if (ifcVertexEClass == null) {
ifcVertexEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers()
.get(750);
}
return ifcVertexEClass;
} } | public class class_name {
@Override
public EClass getIfcVertex() {
if (ifcVertexEClass == null) {
ifcVertexEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers()
.get(750);
// depends on control dependency: [if], data = [none]
}
return ifcVertexEClass;
} ... |
public class class_name {
private String translateWildcards(String input)
{
StringBuilder translated = new StringBuilder(input.length());
boolean escaped = false;
for (int i = 0; i < input.length(); i++)
{
if (input.charAt(i) == '\\')
{
if (escaped)
... | public class class_name {
private String translateWildcards(String input)
{
StringBuilder translated = new StringBuilder(input.length());
boolean escaped = false;
for (int i = 0; i < input.length(); i++)
{
if (input.charAt(i) == '\\')
{
if (escaped)
... |
public class class_name {
@Override
public void draw(final Canvas canvas, final Projection pj) {
if (mPendingFocusChangedEvent && mOnFocusChangeListener != null)
mOnFocusChangeListener.onFocusChanged(this, mFocusedItem);
mPendingFocusChangedEvent = false;
final int size = Math.min(this.mInternalItemList.siz... | public class class_name {
@Override
public void draw(final Canvas canvas, final Projection pj) {
if (mPendingFocusChangedEvent && mOnFocusChangeListener != null)
mOnFocusChangeListener.onFocusChanged(this, mFocusedItem);
mPendingFocusChangedEvent = false;
final int size = Math.min(this.mInternalItemList.siz... |
public class class_name {
public static Object readNativeValue(Type type, Block block, int position)
{
Class<?> javaType = type.getJavaType();
if (block.isNull(position)) {
return null;
}
if (javaType == long.class) {
return type.getLong(block, position);
... | public class class_name {
public static Object readNativeValue(Type type, Block block, int position)
{
Class<?> javaType = type.getJavaType();
if (block.isNull(position)) {
return null; // depends on control dependency: [if], data = [none]
}
if (javaType == long.class) ... |
public class class_name {
public static <E> Set<E> retainAbove(Counter<E> counter, double countThreshold) {
Set<E> removed = new HashSet<E>();
for (E key : counter.keySet()) {
if (counter.getCount(key) < countThreshold) {
removed.add(key);
}
}
for (E key : removed) {
c... | public class class_name {
public static <E> Set<E> retainAbove(Counter<E> counter, double countThreshold) {
Set<E> removed = new HashSet<E>();
for (E key : counter.keySet()) {
if (counter.getCount(key) < countThreshold) {
removed.add(key);
// depends on control dependency: [if], data = [none... |
public class class_name {
private void initializeViews() {
directoryTitle = (TextView) findViewById(R.id.file_directory_title);
addButton = (MaterialFloatingActionButton) findViewById(R.id.file_picker_add_button);
addButton.setOnClickListener(new View.OnClickListener() {
@Override
... | public class class_name {
private void initializeViews() {
directoryTitle = (TextView) findViewById(R.id.file_directory_title);
addButton = (MaterialFloatingActionButton) findViewById(R.id.file_picker_add_button);
addButton.setOnClickListener(new View.OnClickListener() {
@Override
... |
public class class_name {
private String getFolderAndCreateIfMissing(String inFolder) {
String folder = outputFolder;
if (inFolder != null) {
folder += "/" + inFolder;
}
mkdirs(folder);
return folder;
} } | public class class_name {
private String getFolderAndCreateIfMissing(String inFolder) {
String folder = outputFolder;
if (inFolder != null) {
folder += "/" + inFolder; // depends on control dependency: [if], data = [none]
}
mkdirs(folder);
return folder;
} } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.