code stringlengths 130 281k | code_dependency stringlengths 182 306k |
|---|---|
public class class_name {
public static int copy(Reader in, Writer out) throws IOException {
assert in != null : "No input Reader specified";
assert out != null : "No output Writer specified";
try {
int byteCount = 0;
char[] buffer = new char[BUFFER_SIZE];
i... | public class class_name {
public static int copy(Reader in, Writer out) throws IOException {
assert in != null : "No input Reader specified";
assert out != null : "No output Writer specified";
try {
int byteCount = 0;
char[] buffer = new char[BUFFER_SIZE];
i... |
public class class_name {
public static String getConfigParam(String key, String defaultValue) {
if (config == null) {
init(null);
}
if (StringUtils.isBlank(key)) {
return defaultValue;
}
String keyVar = key.replaceAll("\\.", "_");
String env = System.getenv(keyVar) == null ? System.getenv(PARA + "_"... | public class class_name {
public static String getConfigParam(String key, String defaultValue) {
if (config == null) {
init(null); // depends on control dependency: [if], data = [null)]
}
if (StringUtils.isBlank(key)) {
return defaultValue; // depends on control dependency: [if], data = [none]
}
String... |
public class class_name {
public final String getTextOrField() {
final String text = getText();
if (text == null) {
return field.getName();
}
return text;
} } | public class class_name {
public final String getTextOrField() {
final String text = getText();
if (text == null) {
return field.getName();
// depends on control dependency: [if], data = [none]
}
return text;
} } |
public class class_name {
private void processAtmostRequestMappingInfo() {
Context cx = Context.enter();
global = new Global(cx);
// javascript library loading
/*
* List<String> modulePath = new ArrayList<String>();
* modulePath.add(getServletContextPath() + atmosLibraryLocation);
* global.installRe... | public class class_name {
private void processAtmostRequestMappingInfo() {
Context cx = Context.enter();
global = new Global(cx);
// javascript library loading
/*
* List<String> modulePath = new ArrayList<String>();
* modulePath.add(getServletContextPath() + atmosLibraryLocation);
* global.installRe... |
public class class_name {
public Long getNanos() {
if (isBlank(myFractionalSeconds)) {
return null;
}
String retVal = StringUtils.rightPad(myFractionalSeconds, 9, '0');
retVal = retVal.substring(0, 9);
return Long.parseLong(retVal);
} } | public class class_name {
public Long getNanos() {
if (isBlank(myFractionalSeconds)) {
return null; // depends on control dependency: [if], data = [none]
}
String retVal = StringUtils.rightPad(myFractionalSeconds, 9, '0');
retVal = retVal.substring(0, 9);
return Long.parseLong(retVal);
} } |
public class class_name {
public void commitAddedRules() {
// commit changes in the context initialization rules
ChainableContextInitRule nextContextInitRule;
Chain<ChainableContextInitRule> contextInitRuleChain;
nextContextInitRule = addedContextInitRules_;
contextInitRuleChain = getContextInitRuleChain();... | public class class_name {
public void commitAddedRules() {
// commit changes in the context initialization rules
ChainableContextInitRule nextContextInitRule;
Chain<ChainableContextInitRule> contextInitRuleChain;
nextContextInitRule = addedContextInitRules_;
contextInitRuleChain = getContextInitRuleChain();... |
public class class_name {
public static synchronized void unregisterModule(PmiModule instance) {
if (disabled)
return;
if (instance == null) // || instance.getPath().length<=1) return;
return;
// check if the path has null in it. if a module is unregistered twice
... | public class class_name {
public static synchronized void unregisterModule(PmiModule instance) {
if (disabled)
return;
if (instance == null) // || instance.getPath().length<=1) return;
return;
// check if the path has null in it. if a module is unregistered twice
... |
public class class_name {
private void register(RegisterAttempt attempt) {
state.getLogger().debug("Registering session: attempt {}", attempt.attempt);
RegisterRequest request = RegisterRequest.builder()
.withClient(state.getClientId())
.withTimeout(sessionTimeout.toMillis())
.build();
... | public class class_name {
private void register(RegisterAttempt attempt) {
state.getLogger().debug("Registering session: attempt {}", attempt.attempt);
RegisterRequest request = RegisterRequest.builder()
.withClient(state.getClientId())
.withTimeout(sessionTimeout.toMillis())
.build();
... |
public class class_name {
private void doFindGroup(final Message<JsonObject> message) {
String group = message.body().getString("group");
if (group == null) {
message.reply(new JsonObject().putString("status", "error").putString("message", "Invalid group name."));
return;
}
final String ad... | public class class_name {
private void doFindGroup(final Message<JsonObject> message) {
String group = message.body().getString("group");
if (group == null) {
message.reply(new JsonObject().putString("status", "error").putString("message", "Invalid group name.")); // depends on control dependency: [if], ... |
public class class_name {
protected byte[] ensure128BitMD5(byte[] digest) {
if(digest.length == MD5_LENGTH) {
return digest;
} else if(digest.length > MD5_LENGTH) {
byte[] b = new byte[MD5_LENGTH];
System.arraycopy(digest, 0, b, 0, MD5_LENGTH);
return b;
... | public class class_name {
protected byte[] ensure128BitMD5(byte[] digest) {
if(digest.length == MD5_LENGTH) {
return digest; // depends on control dependency: [if], data = [none]
} else if(digest.length > MD5_LENGTH) {
byte[] b = new byte[MD5_LENGTH];
System.arraycop... |
public class class_name {
public static Object objectArrayGet(Object[] a, int i) {
try {
return a[i];
} catch (Throwable t) {
return a[DefaultGroovyMethodsSupport.normaliseIndex(i,a.length)];
}
} } | public class class_name {
public static Object objectArrayGet(Object[] a, int i) {
try {
return a[i]; // depends on control dependency: [try], data = [none]
} catch (Throwable t) {
return a[DefaultGroovyMethodsSupport.normaliseIndex(i,a.length)];
} // depends on control ... |
public class class_name {
Map<String, String> parseJsStringMap(String input) throws ParseException {
input = CharMatcher.whitespace().trimFrom(input);
check(
!input.isEmpty() && input.charAt(0) == '{' && input.charAt(input.length() - 1) == '}',
"Syntax error when parsing JS object");
input ... | public class class_name {
Map<String, String> parseJsStringMap(String input) throws ParseException {
input = CharMatcher.whitespace().trimFrom(input);
check(
!input.isEmpty() && input.charAt(0) == '{' && input.charAt(input.length() - 1) == '}',
"Syntax error when parsing JS object");
input ... |
public class class_name {
public LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result) {
double toLat, toLon;
double fromX = world.getX() - falseEasting;
double fromY = world.getY() - falseNorthing;
double rrho0 = rho0;
if (n < 0) {
rrho0 *= -1.0;
fromX *= -1.... | public class class_name {
public LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result) {
double toLat, toLon;
double fromX = world.getX() - falseEasting;
double fromY = world.getY() - falseNorthing;
double rrho0 = rho0;
if (n < 0) {
rrho0 *= -1.0;
// depends on cont... |
public class class_name {
void hoistNoCompileFiles() {
boolean staleInputs = false;
maybeDoThreadedParsing();
// Iterate a copy because hoisting modifies what we're iterating over.
for (CompilerInput input : ImmutableList.copyOf(moduleGraph.getAllInputs())) {
if (input.getHasNoCompileAnnotation()... | public class class_name {
void hoistNoCompileFiles() {
boolean staleInputs = false;
maybeDoThreadedParsing();
// Iterate a copy because hoisting modifies what we're iterating over.
for (CompilerInput input : ImmutableList.copyOf(moduleGraph.getAllInputs())) {
if (input.getHasNoCompileAnnotation()... |
public class class_name {
private static <T> T loadAndInstantiateClassImpl(
AddOnClassLoader addOnClassLoader,
String classname,
Class<T> clazz,
String type) {
Class<?> cls;
try {
cls = addOnClassLoader.loadClass(classname);
} catch (C... | public class class_name {
private static <T> T loadAndInstantiateClassImpl(
AddOnClassLoader addOnClassLoader,
String classname,
Class<T> clazz,
String type) {
Class<?> cls;
try {
cls = addOnClassLoader.loadClass(classname); // depends on cont... |
public class class_name {
private String buildCacheKey(final String[] objectIds, final String namespace) {
if (objectIds.length == 1) {
checkKeyPart(objectIds[0]);
return namespace + SEPARATOR + objectIds[0];
}
StringBuilder cacheKey = new StringBuilder(namespace);
... | public class class_name {
private String buildCacheKey(final String[] objectIds, final String namespace) {
if (objectIds.length == 1) {
checkKeyPart(objectIds[0]); // depends on control dependency: [if], data = [none]
return namespace + SEPARATOR + objectIds[0]; // depends on control de... |
public class class_name {
public static Object getProp( Object object, final String property ) {
if ( object == null ) {
return null;
}
if ( isDigits( property ) ) {
/* We can index numbers and names. */
object = idx(object, StringScanner.parseInt(proper... | public class class_name {
public static Object getProp( Object object, final String property ) {
if ( object == null ) {
return null; // depends on control dependency: [if], data = [none]
}
if ( isDigits( property ) ) {
/* We can index numbers and names. */
... |
public class class_name {
public Colorization getColorization (String className, int colorId)
{
ClassRecord crec = getClassRecord(className);
if (crec != null) {
ColorRecord color = crec.colors.get(colorId);
if (color != null) {
return color.getColorization()... | public class class_name {
public Colorization getColorization (String className, int colorId)
{
ClassRecord crec = getClassRecord(className);
if (crec != null) {
ColorRecord color = crec.colors.get(colorId);
if (color != null) {
return color.getColorization()... |
public class class_name {
public Interval<C> behind() {
if(this.hasNone()) {
return new Interval(this.dimension, Range.all());
}
if(this.range.equals(Range.all())) {
return new Interval(this.dimension);
}
return new Interval(this.dimension,
... | public class class_name {
public Interval<C> behind() {
if(this.hasNone()) {
return new Interval(this.dimension, Range.all()); // depends on control dependency: [if], data = [none]
}
if(this.range.equals(Range.all())) {
return new Interval(this.dimension); // depends on ... |
public class class_name {
public static String getElementName(ENamedElement element) {
String value = getValue(element, "JsonProperty", "value");
if (value == null) {
value = getValue(element, EXTENDED_METADATA, "name");
}
return value == null ? element.getName(): value;
} } | public class class_name {
public static String getElementName(ENamedElement element) {
String value = getValue(element, "JsonProperty", "value");
if (value == null) {
value = getValue(element, EXTENDED_METADATA, "name"); // depends on control dependency: [if], data = [none]
}
return value == null ? element... |
public class class_name {
public void cleanTables() {
try {
DefaultTableModel algModel = (DefaultTableModel) jTableAlgorithms.getModel();
DefaultTableModel strModel = (DefaultTableModel) jTableStreams.getModel();
int rows = jTableAlgorithms.getRowCount();
int sro... | public class class_name {
public void cleanTables() {
try {
DefaultTableModel algModel = (DefaultTableModel) jTableAlgorithms.getModel();
DefaultTableModel strModel = (DefaultTableModel) jTableStreams.getModel();
int rows = jTableAlgorithms.getRowCount();
int sro... |
public class class_name {
protected void applyHiddenRegionFormatting(List<ITextReplacer> replacers) {
IHiddenRegionFormatting separator = findWhitespaceThatSeparatesSemanticRegions(replacers).getFormatting();
// 1. apply indentation
Integer inc = formatting.getIndentationIncrease();
Integer dec = formatting.... | public class class_name {
protected void applyHiddenRegionFormatting(List<ITextReplacer> replacers) {
IHiddenRegionFormatting separator = findWhitespaceThatSeparatesSemanticRegions(replacers).getFormatting();
// 1. apply indentation
Integer inc = formatting.getIndentationIncrease();
Integer dec = formatting.... |
public class class_name {
private static Collection<String> getPropertyGuard()
{
Collection<String> propertyGuard = propertyGuardThreadLocal.get();
if (propertyGuard == null)
{
propertyGuard = new HashSet<String>();
propertyGuardThreadLocal.set(propertyGuard);
... | public class class_name {
private static Collection<String> getPropertyGuard()
{
Collection<String> propertyGuard = propertyGuardThreadLocal.get();
if (propertyGuard == null)
{
propertyGuard = new HashSet<String>(); // depends on control dependency: [if], data = [none]
... |
public class class_name {
private void amk(final EncodingResult result, final Variable[] vars, int rhs) {
if (rhs < 0)
throw new IllegalArgumentException("Invalid right hand side of cardinality constraint: " + rhs);
if (rhs >= vars.length) // there is no constraint
return;
if (rhs == 0) { // no... | public class class_name {
private void amk(final EncodingResult result, final Variable[] vars, int rhs) {
if (rhs < 0)
throw new IllegalArgumentException("Invalid right hand side of cardinality constraint: " + rhs);
if (rhs >= vars.length) // there is no constraint
return;
if (rhs == 0) { // no... |
public class class_name {
public void verifyProxyAccess() throws PeachApiException
{
stashUnirestProxy();
if(_debug)
System.out.println(">>verifyProxyAccess");
try
{
Logger logger = Logger.getLogger(PeachProxy.class.getName());
... | public class class_name {
public void verifyProxyAccess() throws PeachApiException
{
stashUnirestProxy();
if(_debug)
System.out.println(">>verifyProxyAccess");
try
{
Logger logger = Logger.getLogger(PeachProxy.class.getName());
... |
public class class_name {
public void update(final int[] data) {
if ((data == null) || (data.length == 0)) { return; }
final long[] arr = hash(data, seed);
hashUpdate(arr[0], arr[1]);
} } | public class class_name {
public void update(final int[] data) {
if ((data == null) || (data.length == 0)) { return; } // depends on control dependency: [if], data = [none]
final long[] arr = hash(data, seed);
hashUpdate(arr[0], arr[1]);
} } |
public class class_name {
public static String getColumnSharedPrefix(String[] associationKeyColumns) {
String prefix = null;
for ( String column : associationKeyColumns ) {
String newPrefix = getPrefix( column );
if ( prefix == null ) { // first iteration
prefix = newPrefix;
if ( prefix == null ) { /... | public class class_name {
public static String getColumnSharedPrefix(String[] associationKeyColumns) {
String prefix = null;
for ( String column : associationKeyColumns ) {
String newPrefix = getPrefix( column );
if ( prefix == null ) { // first iteration
prefix = newPrefix; // depends on control depende... |
public class class_name {
public Iterable<Path> getPaths( CachedNode node ) {
NodeKey key = node.getKey();
List<Path> pathList = paths.get(key);
if (pathList == null) {
// Compute the node's path ...
Segment nodeSegment = node.getSegment(cache);
NodeKey paren... | public class class_name {
public Iterable<Path> getPaths( CachedNode node ) {
NodeKey key = node.getKey();
List<Path> pathList = paths.get(key);
if (pathList == null) {
// Compute the node's path ...
Segment nodeSegment = node.getSegment(cache);
NodeKey paren... |
public class class_name {
protected ClassElement mirrorToClassElement(TypeMirror returnType, JavaVisitorContext visitorContext) {
if (returnType instanceof NoType) {
return new JavaVoidElement();
} else if (returnType instanceof DeclaredType) {
DeclaredType dt = (DeclaredType) r... | public class class_name {
protected ClassElement mirrorToClassElement(TypeMirror returnType, JavaVisitorContext visitorContext) {
if (returnType instanceof NoType) {
return new JavaVoidElement(); // depends on control dependency: [if], data = [none]
} else if (returnType instanceof Declared... |
public class class_name {
public static <T> HttpMethod retrieveMethod(Request<T> request) {
if (request == null) {
return null;
}
Class<?> clazz = request.getClass();
Method method = clazz.getAnnotation(Method.class);
HttpMethod httpMethod = method.value();
return httpMethod;
} } | public class class_name {
public static <T> HttpMethod retrieveMethod(Request<T> request) {
if (request == null) {
return null; // depends on control dependency: [if], data = [none]
}
Class<?> clazz = request.getClass();
Method method = clazz.getAnnotation(Method.class);
HttpMethod httpMethod = method.v... |
public class class_name {
protected void createRecursiveIncidents(String rootCauseIncidentId, List<IncidentEntity> createdIncidents) {
final ExecutionEntity execution = getExecution();
if(execution != null) {
ExecutionEntity superExecution = execution.getProcessInstance().getSuperExecution();
i... | public class class_name {
protected void createRecursiveIncidents(String rootCauseIncidentId, List<IncidentEntity> createdIncidents) {
final ExecutionEntity execution = getExecution();
if(execution != null) {
ExecutionEntity superExecution = execution.getProcessInstance().getSuperExecution();
i... |
public class class_name {
public boolean isSubtypesUnchecked(List<Type> ts, List<Type> ss, Warner warn) {
while (ts.tail != null && ss.tail != null
/*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
isSubtypeUnchecked(ts.head, ss.head, warn)) {
ts = ts.tail;
ss... | public class class_name {
public boolean isSubtypesUnchecked(List<Type> ts, List<Type> ss, Warner warn) {
while (ts.tail != null && ss.tail != null
/*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
isSubtypeUnchecked(ts.head, ss.head, warn)) {
ts = ts.tail; // depends on ... |
public class class_name {
public static String generateState(CmsSearchReplaceSettings settings) {
String state = "";
state = A_CmsWorkplaceApp.addParamToState(state, SITE_ROOT, settings.getSiteRoot());
state = A_CmsWorkplaceApp.addParamToState(state, SEARCH_TYPE, settings.getType().name());
... | public class class_name {
public static String generateState(CmsSearchReplaceSettings settings) {
String state = "";
state = A_CmsWorkplaceApp.addParamToState(state, SITE_ROOT, settings.getSiteRoot());
state = A_CmsWorkplaceApp.addParamToState(state, SEARCH_TYPE, settings.getType().name());
... |
public class class_name {
public void restoreFromFile(File file) throws IOException
{
byte[] rawData = new byte[(int) file.length()];
ByteBuffer bufData = null;
FileInputStream fis = null;
DataInputStream dis = null;
try {
fis = new FileInputStream(file);
... | public class class_name {
public void restoreFromFile(File file) throws IOException
{
byte[] rawData = new byte[(int) file.length()];
ByteBuffer bufData = null;
FileInputStream fis = null;
DataInputStream dis = null;
try {
fis = new FileInputStream(file);
... |
public class class_name {
public static Date nextGivenMinuteDate (final Date date, final int minuteBase)
{
if (minuteBase < 0 || minuteBase > 59)
{
throw new IllegalArgumentException ("minuteBase must be >=0 and <= 59");
}
final Calendar c = PDTFactory.createCalendar ();
c.setTime (date !=... | public class class_name {
public static Date nextGivenMinuteDate (final Date date, final int minuteBase)
{
if (minuteBase < 0 || minuteBase > 59)
{
throw new IllegalArgumentException ("minuteBase must be >=0 and <= 59");
}
final Calendar c = PDTFactory.createCalendar ();
c.setTime (date !=... |
public class class_name {
public String getNextAvailableNodeId(final String nodeId) {
String result = nodeId;
do {
result = _primaryNodeIds.getNextNodeId(result);
if(result != null && result.equals(nodeId)) {
result = null;
}
} while(result != null && !isNodeAvail... | public class class_name {
public String getNextAvailableNodeId(final String nodeId) {
String result = nodeId;
do {
result = _primaryNodeIds.getNextNodeId(result);
if(result != null && result.equals(nodeId)) {
result = null; // depends on control dependency: [if], data = [none]
... |
public class class_name {
public GL createSurface(SurfaceHolder holder) {
/*
* The window size has changed, so we need to create a new surface.
*/
if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {
/*
... | public class class_name {
public GL createSurface(SurfaceHolder holder) {
/*
* The window size has changed, so we need to create a new surface.
*/
if (mEglSurface != null && mEglSurface != EGL10.EGL_NO_SURFACE) {
/*
... |
public class class_name {
public double[] solveLInplace(double[] X) {
final int n = L.length;
X[0] /= L[0][0]; // First iteration, simplified.
for(int k = 1; k < n; k++) {
final double[] Lk = L[k];
for(int i = 0; i < k; i++) {
X[k] -= X[i] * Lk[i];
}
X[k] /= Lk[k];
}
... | public class class_name {
public double[] solveLInplace(double[] X) {
final int n = L.length;
X[0] /= L[0][0]; // First iteration, simplified.
for(int k = 1; k < n; k++) {
final double[] Lk = L[k];
for(int i = 0; i < k; i++) {
X[k] -= X[i] * Lk[i]; // depends on control dependency: [for... |
public class class_name {
public static VoltTable tableFromShorthand(String schema) {
String name = "T";
VoltTable.ColumnInfo[] columns = null;
// get a name
Matcher nameMatcher = m_namePattern.matcher(schema);
if (nameMatcher.find()) {
name = nameMatcher.group().t... | public class class_name {
public static VoltTable tableFromShorthand(String schema) {
String name = "T";
VoltTable.ColumnInfo[] columns = null;
// get a name
Matcher nameMatcher = m_namePattern.matcher(schema);
if (nameMatcher.find()) {
name = nameMatcher.group().t... |
public class class_name {
@Deprecated
public Set<AbstractTagBase> getRebuiltTags(final Object accessObject) {
// TODO remove this method later
if (accessObject == null || !(SecurityClassConstants.ABSTRACT_HTML
.equals(accessObject.getClass().getName()))) {
throw new Wff... | public class class_name {
@Deprecated
public Set<AbstractTagBase> getRebuiltTags(final Object accessObject) {
// TODO remove this method later
if (accessObject == null || !(SecurityClassConstants.ABSTRACT_HTML
.equals(accessObject.getClass().getName()))) {
throw new Wff... |
public class class_name {
@Override
public synchronized BooleanQuery doQuery(Schema schema) {
int oldMaxClauses= BooleanQuery.getMaxClauseCount();
BooleanQuery.setMaxClauseCount(maxClauses);
BooleanQuery.Builder builder = new BooleanQuery.Builder();
must.forEach(condition -> builde... | public class class_name {
@Override
public synchronized BooleanQuery doQuery(Schema schema) {
int oldMaxClauses= BooleanQuery.getMaxClauseCount();
BooleanQuery.setMaxClauseCount(maxClauses);
BooleanQuery.Builder builder = new BooleanQuery.Builder();
must.forEach(condition -> builde... |
public class class_name {
private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
repositories.put(repositoryId, repositoryHolder);
try {
numRepos = getNumberOfRepositories();
} catch (WIMException e) {
// okay
}
} } | public class class_name {
private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
repositories.put(repositoryId, repositoryHolder);
try {
numRepos = getNumberOfRepositories(); // depends on control dependency: [try], data = [none]
} catch (WIMException ... |
public class class_name {
void computeDescriptor(int row, int col) {
// set location to top-left pixel
locations.grow().set(col* pixelsPerCell,row* pixelsPerCell);
TupleDesc_F64 d = descriptions.grow();
int indexDesc = 0;
for (int i = 0; i < cellsPerBlockY; i++) {
for (int j = 0; j < cellsPerBlockX; j++... | public class class_name {
void computeDescriptor(int row, int col) {
// set location to top-left pixel
locations.grow().set(col* pixelsPerCell,row* pixelsPerCell);
TupleDesc_F64 d = descriptions.grow();
int indexDesc = 0;
for (int i = 0; i < cellsPerBlockY; i++) {
for (int j = 0; j < cellsPerBlockX; j++... |
public class class_name {
public static SDDL userCannotChangePassword(final SDDL sddl, final Boolean cannot) {
final AceType type = cannot ? AceType.ACCESS_DENIED_OBJECT_ACE_TYPE : AceType.ACCESS_ALLOWED_OBJECT_ACE_TYPE;
ACE self = null;
ACE all = null;
final List<ACE> aces = sddl.get... | public class class_name {
public static SDDL userCannotChangePassword(final SDDL sddl, final Boolean cannot) {
final AceType type = cannot ? AceType.ACCESS_DENIED_OBJECT_ACE_TYPE : AceType.ACCESS_ALLOWED_OBJECT_ACE_TYPE;
ACE self = null;
ACE all = null;
final List<ACE> aces = sddl.get... |
public class class_name {
public void setInputType(InputType input)
{
if (this.stateMachine.currentMissionBehaviour() != null && this.stateMachine.currentMissionBehaviour().commandHandler != null)
this.stateMachine.currentMissionBehaviour().commandHandler.setOverriding(input == InputType.AI);
if (... | public class class_name {
public void setInputType(InputType input)
{
if (this.stateMachine.currentMissionBehaviour() != null && this.stateMachine.currentMissionBehaviour().commandHandler != null)
this.stateMachine.currentMissionBehaviour().commandHandler.setOverriding(input == InputType.AI);
if (... |
public class class_name {
private static void parseErrorPages(final ErrorPageType errorPageType, final WebApp webApp) {
final WebAppErrorPage errorPage = new WebAppErrorPage();
if (errorPageType.getErrorCode() != null) {
errorPage.setErrorCode(errorPageType.getErrorCode().getValue().toString());
}
if (... | public class class_name {
private static void parseErrorPages(final ErrorPageType errorPageType, final WebApp webApp) {
final WebAppErrorPage errorPage = new WebAppErrorPage();
if (errorPageType.getErrorCode() != null) {
errorPage.setErrorCode(errorPageType.getErrorCode().getValue().toString());
// depends ... |
public class class_name {
private synchronized void checkShutDownRunningProcesses() {
smtpRequestsPhaser.arriveAndDeregister();
LOGGER.trace("SMTP request threads left: {}", smtpRequestsPhaser.getUnarrivedParties());
// if this thread is the last one finishing
if (smtpRequestsPhaser.get... | public class class_name {
private synchronized void checkShutDownRunningProcesses() {
smtpRequestsPhaser.arriveAndDeregister();
LOGGER.trace("SMTP request threads left: {}", smtpRequestsPhaser.getUnarrivedParties());
// if this thread is the last one finishing
if (smtpRequestsPhaser.get... |
public class class_name {
public static String getFieldNameByType(Class<?> classType, Class<?> fieldType) {
Field[] declaredFields = classType.getDeclaredFields();
for (Field field : declaredFields) {
if (field.getType().isAssignableFrom(fieldType)) {
return field.getName();
}
}
if (classType.... | public class class_name {
public static String getFieldNameByType(Class<?> classType, Class<?> fieldType) {
Field[] declaredFields = classType.getDeclaredFields();
for (Field field : declaredFields) {
if (field.getType().isAssignableFrom(fieldType)) {
return field.getName();
// depends on control depen... |
public class class_name {
public static URL getResource(String resource, Class<?> context, boolean checkParent)
{
URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
if (url != null)
return url;
if (context != null)
{
Clas... | public class class_name {
public static URL getResource(String resource, Class<?> context, boolean checkParent)
{
URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
if (url != null)
return url;
if (context != null)
{
Clas... |
public class class_name {
public static ConfigurationElement getConfigurationElement(Configuration config, String... names) {
if (config != null && names.length > 0) {
String first = names[0];
ConfigurationElement root = findConfigurationElement(config, first);
if (root != n... | public class class_name {
public static ConfigurationElement getConfigurationElement(Configuration config, String... names) {
if (config != null && names.length > 0) {
String first = names[0];
ConfigurationElement root = findConfigurationElement(config, first);
if (root != n... |
public class class_name {
public static Status valueOf(String name) {
if (name == null) {
return UNDEFINED;
}
for (Status status : INSTANCES.values()) {
if (name.equals(status.getName())) {
return status;
}
}
return UNDEFINED;
} } | public class class_name {
public static Status valueOf(String name) {
if (name == null) {
return UNDEFINED; // depends on control dependency: [if], data = [none]
}
for (Status status : INSTANCES.values()) {
if (name.equals(status.getName())) {
return status; // depends on control depend... |
public class class_name {
public void marshall(UpdateNumberOfDomainControllersRequest updateNumberOfDomainControllersRequest, ProtocolMarshaller protocolMarshaller) {
if (updateNumberOfDomainControllersRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... | public class class_name {
public void marshall(UpdateNumberOfDomainControllersRequest updateNumberOfDomainControllersRequest, ProtocolMarshaller protocolMarshaller) {
if (updateNumberOfDomainControllersRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
... |
public class class_name {
public final EObject entryRuleXAndExpression() throws RecognitionException {
EObject current = null;
EObject iv_ruleXAndExpression = null;
try {
// InternalPureXbase.g:1121:55: (iv_ruleXAndExpression= ruleXAndExpression EOF )
// InternalPureX... | public class class_name {
public final EObject entryRuleXAndExpression() throws RecognitionException {
EObject current = null;
EObject iv_ruleXAndExpression = null;
try {
// InternalPureXbase.g:1121:55: (iv_ruleXAndExpression= ruleXAndExpression EOF )
// InternalPureX... |
public class class_name {
public static void writeTo(String html, Writer writer) throws IOException {
int index = html.indexOf('#');
if (index == -1) {
writer.write(html);
} else {
final ResourceBundle resourceBundle = getResourceBundle();
int begin = 0;
while (index != -1) {
writer.write... | public class class_name {
public static void writeTo(String html, Writer writer) throws IOException {
int index = html.indexOf('#');
if (index == -1) {
writer.write(html);
} else {
final ResourceBundle resourceBundle = getResourceBundle();
int begin = 0;
while (index != -1) {
writer.write... |
public class class_name {
public static void mergeAttributes( java.util.jar.Attributes target, java.util.jar.Attributes section )
{
for ( Object o : section.keySet() )
{
java.util.jar.Attributes.Name key = (Attributes.Name) o;
final Object value = section.get( o );
... | public class class_name {
public static void mergeAttributes( java.util.jar.Attributes target, java.util.jar.Attributes section )
{
for ( Object o : section.keySet() )
{
java.util.jar.Attributes.Name key = (Attributes.Name) o;
final Object value = section.get( o );
... |
public class class_name {
public TechnologyTagModel addTagToFileModel(FileModel fileModel, String tagName, TechnologyTagLevel level)
{
Traversable<Vertex, Vertex> q = getGraphContext().getQuery(TechnologyTagModel.class)
.traverse(g -> g.has(TechnologyTagModel.NAME, tagName));
Te... | public class class_name {
public TechnologyTagModel addTagToFileModel(FileModel fileModel, String tagName, TechnologyTagLevel level)
{
Traversable<Vertex, Vertex> q = getGraphContext().getQuery(TechnologyTagModel.class)
.traverse(g -> g.has(TechnologyTagModel.NAME, tagName));
Te... |
public class class_name {
public List<Interval<T>> complement(final Interval<T> op) throws MIDDException {
final boolean disJoined = (this.lowerBound.compareTo(op.upperBound) >= 0) ||
(this.upperBound.compareTo(op.lowerBound) <= 0);
if (disJoined) {
Interval<T> newInterval... | public class class_name {
public List<Interval<T>> complement(final Interval<T> op) throws MIDDException {
final boolean disJoined = (this.lowerBound.compareTo(op.upperBound) >= 0) ||
(this.upperBound.compareTo(op.lowerBound) <= 0);
if (disJoined) {
Interval<T> newInterval... |
public class class_name {
public void setAliasAttributes(java.util.Collection<String> aliasAttributes) {
if (aliasAttributes == null) {
this.aliasAttributes = null;
return;
}
this.aliasAttributes = new java.util.ArrayList<String>(aliasAttributes);
} } | public class class_name {
public void setAliasAttributes(java.util.Collection<String> aliasAttributes) {
if (aliasAttributes == null) {
this.aliasAttributes = null; // depends on control dependency: [if], data = [none]
return; // depends on control dependency: [if], data = [none]
... |
public class class_name {
private int processWrite(int state, final Object userData, int pos, int length) throws IOException {
if (done || exchange == null) {
throw new ClosedChannelException();
}
try {
assert state != STATE_BODY;
if (state == STATE_BUF_FLUSH... | public class class_name {
private int processWrite(int state, final Object userData, int pos, int length) throws IOException {
if (done || exchange == null) {
throw new ClosedChannelException();
}
try {
assert state != STATE_BODY;
if (state == STATE_BUF_FLUSH... |
public class class_name {
private static int distance(final Class<?>[] classArray, final Class<?>[] toClassArray) {
int answer = 0;
if (!ClassUtils.isAssignable(classArray, toClassArray, true)) {
return -1;
}
for (int offset = 0; offset < classArray.length; offset++) {
... | public class class_name {
private static int distance(final Class<?>[] classArray, final Class<?>[] toClassArray) {
int answer = 0;
if (!ClassUtils.isAssignable(classArray, toClassArray, true)) {
return -1; // depends on control dependency: [if], data = [none]
}
for (int of... |
public class class_name {
public static ChangeLog parse(Context ctx, @XmlRes int license){
ChangeLog clog = new ChangeLog();
// Get the XMLParser
XmlPullParser parser = ctx.getResources().getXml(license);
// Begin parsing
try {
parser.next();
parser.req... | public class class_name {
public static ChangeLog parse(Context ctx, @XmlRes int license){
ChangeLog clog = new ChangeLog();
// Get the XMLParser
XmlPullParser parser = ctx.getResources().getXml(license);
// Begin parsing
try {
parser.next(); // depends on control ... |
public class class_name {
public void marshall(DataRetrievalPolicy dataRetrievalPolicy, ProtocolMarshaller protocolMarshaller) {
if (dataRetrievalPolicy == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.mars... | public class class_name {
public void marshall(DataRetrievalPolicy dataRetrievalPolicy, ProtocolMarshaller protocolMarshaller) {
if (dataRetrievalPolicy == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.mars... |
public class class_name {
@Override
public void visitCode(final Code obj) {
try {
if (methodSignatureIsConstrained) {
return;
}
if (obj.getCode() == null) {
return;
}
Method m = getMethod();
if (m.isSy... | public class class_name {
@Override
public void visitCode(final Code obj) {
try {
if (methodSignatureIsConstrained) {
return; // depends on control dependency: [if], data = [none]
}
if (obj.getCode() == null) {
return; // depends on contr... |
public class class_name {
public static int size(Iterator self) {
int count = 0;
while (self.hasNext()) {
self.next();
count++;
}
return count;
} } | public class class_name {
public static int size(Iterator self) {
int count = 0;
while (self.hasNext()) {
self.next(); // depends on control dependency: [while], data = [none]
count++; // depends on control dependency: [while], data = [none]
}
return count;
}... |
public class class_name {
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions)
{
if (strCommand.equalsIgnoreCase(ThinMenuConstants.CLOSE))
{
this.free();
return true;
}
return super.doCommand(strCommand, sourceSField, iCo... | public class class_name {
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions)
{
if (strCommand.equalsIgnoreCase(ThinMenuConstants.CLOSE))
{
this.free(); // depends on control dependency: [if], data = [none]
return true; // depends on co... |
public class class_name {
private Object parseValue(String value) {
// Try to parse value as number
try {
return Double.valueOf(value);
} catch (NumberFormatException ignored){}
if (value.equals("true") || value.equals("false"))
return Boolean.valueOf(value);
... | public class class_name {
private Object parseValue(String value) {
// Try to parse value as number
try {
return Double.valueOf(value); // depends on control dependency: [try], data = [none]
} catch (NumberFormatException ignored){} // depends on control dependency: [catch], data =... |
public class class_name {
public void addSearchResult(CaptureSearchResult result, boolean append) {
String resultDate = result.getCaptureTimestamp();
if ((firstResultTimestamp == null) ||
(firstResultTimestamp.compareTo(resultDate) > 0)) {
firstResultTimestamp = resultDate;
}
if ((lastResultTimestamp ==... | public class class_name {
public void addSearchResult(CaptureSearchResult result, boolean append) {
String resultDate = result.getCaptureTimestamp();
if ((firstResultTimestamp == null) ||
(firstResultTimestamp.compareTo(resultDate) > 0)) {
firstResultTimestamp = resultDate; // depends on control dependency:... |
public class class_name {
public void slmget(final String keyspace, final String uid, final String serviceCode, final String... keys) {
final byte[][] bkeys = new byte[keys.length][];
for (int i = 0; i < keys.length; i++) {
bkeys[i] = SafeEncoder.encode(keys[i]);
}
slmget(Sa... | public class class_name {
public void slmget(final String keyspace, final String uid, final String serviceCode, final String... keys) {
final byte[][] bkeys = new byte[keys.length][];
for (int i = 0; i < keys.length; i++) {
bkeys[i] = SafeEncoder.encode(keys[i]); // depends on control depen... |
public class class_name {
float[] getBandFactors()
{
float[] factors = new float[BANDS];
for (int i=0, maxCount=BANDS; i<maxCount; i++)
{
factors[i] = getBandFactor(settings[i]);
}
return factors;
} } | public class class_name {
float[] getBandFactors()
{
float[] factors = new float[BANDS];
for (int i=0, maxCount=BANDS; i<maxCount; i++)
{
factors[i] = getBandFactor(settings[i]); // depends on control dependency: [for], data = [i]
}
return factors;
} } |
public class class_name {
public static Symmetry454Date from(TemporalAccessor temporal) {
if (temporal instanceof Symmetry454Date) {
return (Symmetry454Date) temporal;
}
return Symmetry454Date.ofEpochDay(temporal.getLong(ChronoField.EPOCH_DAY));
} } | public class class_name {
public static Symmetry454Date from(TemporalAccessor temporal) {
if (temporal instanceof Symmetry454Date) {
return (Symmetry454Date) temporal; // depends on control dependency: [if], data = [none]
}
return Symmetry454Date.ofEpochDay(temporal.getLong(ChronoFi... |
public class class_name {
private IDataSet performReplacements(IDataSet dataSet, List<Replacer> replacersList) {
if (replacersList == null || replacersList.isEmpty())
return dataSet;
ReplacementDataSet replacementSet = new ReplacementDataSet(dataSet);
// convert to set to remove d... | public class class_name {
private IDataSet performReplacements(IDataSet dataSet, List<Replacer> replacersList) {
if (replacersList == null || replacersList.isEmpty())
return dataSet;
ReplacementDataSet replacementSet = new ReplacementDataSet(dataSet);
// convert to set to remove d... |
public class class_name {
public final void saveDataInContext(final Cell poiCell,
final String strValue) {
String saveAttr = SaveAttrsUtility.prepareContextAndAttrsForCell(poiCell, ConfigurationUtility.getFullNameFromRow(poiCell.getRow()), this);
if (saveAttr!= null) {
SaveAttrsUtility.saveDataToObject... | public class class_name {
public final void saveDataInContext(final Cell poiCell,
final String strValue) {
String saveAttr = SaveAttrsUtility.prepareContextAndAttrsForCell(poiCell, ConfigurationUtility.getFullNameFromRow(poiCell.getRow()), this);
if (saveAttr!= null) {
SaveAttrsUtility.saveDataToObject... |
public class class_name {
public Attributes withExpires(DateTime expires) {
if (expires == null) {
this.expires = null;
} else {
this.expires = expires.toDateTime(DateTimeZone.UTC).getMillis() / 1000;
}
return this;
} } | public class class_name {
public Attributes withExpires(DateTime expires) {
if (expires == null) {
this.expires = null; // depends on control dependency: [if], data = [none]
} else {
this.expires = expires.toDateTime(DateTimeZone.UTC).getMillis() / 1000; // depends on control de... |
public class class_name {
@Override
public void onRegistered(Context context, String registrationId) {
try {
if(notificationCallback != null) {
notificationCallback.onRegister(context, registrationId);
}
else {
logWarn("No notificationCallback found in GCM receiver. Initialization may have failed... | public class class_name {
@Override
public void onRegistered(Context context, String registrationId) {
try {
if(notificationCallback != null) {
notificationCallback.onRegister(context, registrationId); // depends on control dependency: [if], data = [none]
}
else {
logWarn("No notificationCallback ... |
public class class_name {
public static boolean isActiveNamingContext(final WComponent component) {
if (component instanceof NamingContextable) {
NamingContextable naming = (NamingContextable) component;
boolean active = naming.isNamingContext() && naming.getIdName() != null;
return active;
}
return fal... | public class class_name {
public static boolean isActiveNamingContext(final WComponent component) {
if (component instanceof NamingContextable) {
NamingContextable naming = (NamingContextable) component;
boolean active = naming.isNamingContext() && naming.getIdName() != null;
return active; // depends on co... |
public class class_name {
public java.util.List<Tag> getAddTags() {
if (addTags == null) {
addTags = new com.amazonaws.internal.SdkInternalList<Tag>();
}
return addTags;
} } | public class class_name {
public java.util.List<Tag> getAddTags() {
if (addTags == null) {
addTags = new com.amazonaws.internal.SdkInternalList<Tag>(); // depends on control dependency: [if], data = [none]
}
return addTags;
} } |
public class class_name {
public final void setServicePid(String servicePid) {
synchronized (lock) {
if (servicePid == null) {
serviceProperties.remove(SERVICE_PID);
} else {
serviceProperties.put(SERVICE_PID, servicePid);
}
if (s... | public class class_name {
public final void setServicePid(String servicePid) {
synchronized (lock) {
if (servicePid == null) {
serviceProperties.remove(SERVICE_PID); // depends on control dependency: [if], data = [none]
} else {
serviceProperties.put(SERV... |
public class class_name {
void processPendingReplications() {
BlockInfo[] timedOutItems = pendingReplications.getTimedOutBlocks();
if (timedOutItems != null) {
writeLock();
try {
for (int i = 0; i < timedOutItems.length; i++) {
NumberReplicas num = countNodes(timedOutItems[i]);
... | public class class_name {
void processPendingReplications() {
BlockInfo[] timedOutItems = pendingReplications.getTimedOutBlocks();
if (timedOutItems != null) {
writeLock(); // depends on control dependency: [if], data = [none]
try {
for (int i = 0; i < timedOutItems.length; i++) {
... |
public class class_name {
void generateSerializeOnJacksonInternal(BindTypeContext context, MethodSpec.Builder methodBuilder, String serializerName, TypeName beanClass, String beanName, BindProperty property, boolean onString) {
// define key and value type
ParameterizedTypeName mapTypeName=(ParameterizedTypeName) ... | public class class_name {
void generateSerializeOnJacksonInternal(BindTypeContext context, MethodSpec.Builder methodBuilder, String serializerName, TypeName beanClass, String beanName, BindProperty property, boolean onString) {
// define key and value type
ParameterizedTypeName mapTypeName=(ParameterizedTypeName) ... |
public class class_name {
public static boolean hasValidContentAdditionParameterDefined(ModelNode operation) {
for (String s : DeploymentAttributes.MANAGED_CONTENT_ATTRIBUTES.keySet()) {
if (operation.hasDefined(s)) {
return true;
}
}
return false;
} ... | public class class_name {
public static boolean hasValidContentAdditionParameterDefined(ModelNode operation) {
for (String s : DeploymentAttributes.MANAGED_CONTENT_ATTRIBUTES.keySet()) {
if (operation.hasDefined(s)) {
return true; // depends on control dependency: [if], data = [none... |
public class class_name {
public PendingCloudwatchLogsExports withLogTypesToEnable(String... logTypesToEnable) {
if (this.logTypesToEnable == null) {
setLogTypesToEnable(new com.amazonaws.internal.SdkInternalList<String>(logTypesToEnable.length));
}
for (String ele : logTypesToEnabl... | public class class_name {
public PendingCloudwatchLogsExports withLogTypesToEnable(String... logTypesToEnable) {
if (this.logTypesToEnable == null) {
setLogTypesToEnable(new com.amazonaws.internal.SdkInternalList<String>(logTypesToEnable.length)); // depends on control dependency: [if], data = [non... |
public class class_name {
protected void parse(Node node) {
queryable = isQueryable(node);
styleInfo.clear();
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node child = childNodes.item(i);
String nodeName = child.getNodeName();
if ("Name".equalsIgnoreC... | public class class_name {
protected void parse(Node node) {
queryable = isQueryable(node);
styleInfo.clear();
NodeList childNodes = node.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node child = childNodes.item(i);
String nodeName = child.getNodeName();
if ("Name".equalsIgnoreC... |
public class class_name {
private void renderMask(SVG.Mask mask, SvgElement obj, Box originalObjBBox)
{
debug("Mask render");
boolean maskUnitsAreUser = (mask.maskUnitsAreUser != null && mask.maskUnitsAreUser);
float w, h;
if (maskUnitsAreUser)
{
w = (m... | public class class_name {
private void renderMask(SVG.Mask mask, SvgElement obj, Box originalObjBBox)
{
debug("Mask render");
boolean maskUnitsAreUser = (mask.maskUnitsAreUser != null && mask.maskUnitsAreUser);
float w, h;
if (maskUnitsAreUser)
{
w = (m... |
public class class_name {
public void help(String command) {
if ("*".equalsIgnoreCase(command)) {
m_shell.help(null);
} else if ("help".equalsIgnoreCase(command)) {
help();
} else {
m_shell.help(command);
}
} } | public class class_name {
public void help(String command) {
if ("*".equalsIgnoreCase(command)) {
m_shell.help(null); // depends on control dependency: [if], data = [none]
} else if ("help".equalsIgnoreCase(command)) {
help(); // depends on control dependency: [if], data = [non... |
public class class_name {
public static <ColumnSelectorStrategyClass extends ColumnSelectorStrategy>
//CHECKSTYLE.OFF: Indentation
ColumnSelectorPlus<ColumnSelectorStrategyClass>[] createColumnSelectorPluses(
//CHECKSTYLE.ON: Indentation
ColumnSelectorStrategyFactory<ColumnSelectorStrategyClass> strate... | public class class_name {
public static <ColumnSelectorStrategyClass extends ColumnSelectorStrategy>
//CHECKSTYLE.OFF: Indentation
ColumnSelectorPlus<ColumnSelectorStrategyClass>[] createColumnSelectorPluses(
//CHECKSTYLE.ON: Indentation
ColumnSelectorStrategyFactory<ColumnSelectorStrategyClass> strate... |
public class class_name {
public Client build(String name) {
if ((environment == null) && ((executorService == null) || (objectMapper == null))) {
throw new IllegalStateException("Must have either an environment or both " +
"an executor service and an object mapper");
}
... | public class class_name {
public Client build(String name) {
if ((environment == null) && ((executorService == null) || (objectMapper == null))) {
throw new IllegalStateException("Must have either an environment or both " +
"an executor service and an object mapper");
}
... |
public class class_name {
private List<Integer> alternatesToHash(List<AlternateCoordinate> alternates) {
List<Integer> list = new ArrayList<>(alternates.size());
for (AlternateCoordinate a : alternates) {
// list.add(Objects.hash(a.getChromosome(), a.getStart(), a.getEnd(), a.getReference(),... | public class class_name {
private List<Integer> alternatesToHash(List<AlternateCoordinate> alternates) {
List<Integer> list = new ArrayList<>(alternates.size());
for (AlternateCoordinate a : alternates) {
// list.add(Objects.hash(a.getChromosome(), a.getStart(), a.getEnd(), a.getReference(),... |
public class class_name {
public static PacketExtension parsePacketExtension(String elementName,
String namespace, XmlPullParser parser) throws Exception {
DefaultPacketExtension extension = new DefaultPacketExtension(
elementName, namespace);
boolean done = false;
w... | public class class_name {
public static PacketExtension parsePacketExtension(String elementName,
String namespace, XmlPullParser parser) throws Exception {
DefaultPacketExtension extension = new DefaultPacketExtension(
elementName, namespace);
boolean done = false;
w... |
public class class_name {
private void addFieldToLayout(final WComponent input, final String labelText,
final String labelHint) {
WField field = layout.addField(labelText, input);
if (labelHint != null) {
field.getLabel().setHint(labelHint);
}
} } | public class class_name {
private void addFieldToLayout(final WComponent input, final String labelText,
final String labelHint) {
WField field = layout.addField(labelText, input);
if (labelHint != null) {
field.getLabel().setHint(labelHint); // depends on control dependency: [if], data = [(labelHint]
}
}... |
public class class_name {
public static void main(String[] args) {
int width = 6;
int height = 10;
Pentomino model = new Pentomino(width, height);
List splits = model.getSplits(2);
for(Iterator splitItr=splits.iterator(); splitItr.hasNext(); ) {
int[] choices = (int[]) splitItr.next();
... | public class class_name {
public static void main(String[] args) {
int width = 6;
int height = 10;
Pentomino model = new Pentomino(width, height);
List splits = model.getSplits(2);
for(Iterator splitItr=splits.iterator(); splitItr.hasNext(); ) {
int[] choices = (int[]) splitItr.next();
... |
public class class_name {
@FormatMethod
private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) {
if (parseTree == null) {
reportError(message, arguments);
} else {
errorReporter.reportError(parseTree.location.start, message, arguments);
}
} } | public class class_name {
@FormatMethod
private void reportError(ParseTree parseTree, @FormatString String message, Object... arguments) {
if (parseTree == null) {
reportError(message, arguments); // depends on control dependency: [if], data = [none]
} else {
errorReporter.reportError(parseTree.l... |
public class class_name {
public String getDescription() throws ProgramInvocationException {
if (ProgramDescription.class.isAssignableFrom(this.mainClass)) {
ProgramDescription descr;
if (this.program != null) {
descr = (ProgramDescription) this.program;
} else {
try {
descr = Instantiatio... | public class class_name {
public String getDescription() throws ProgramInvocationException {
if (ProgramDescription.class.isAssignableFrom(this.mainClass)) {
ProgramDescription descr;
if (this.program != null) {
descr = (ProgramDescription) this.program; // depends on control dependency: [if], data = [... |
public class class_name {
private SiftsResidue getResidue(Element residue) {
SiftsResidue res = new SiftsResidue();
String dbResNumS = residue.getAttribute("dbResNum");
res.setNaturalPos(Integer.parseInt(dbResNumS));
String seqResName = residue.getAttribute("dbResName");
res.setSeqResName(seqResName)... | public class class_name {
private SiftsResidue getResidue(Element residue) {
SiftsResidue res = new SiftsResidue();
String dbResNumS = residue.getAttribute("dbResNum");
res.setNaturalPos(Integer.parseInt(dbResNumS));
String seqResName = residue.getAttribute("dbResName");
res.setSeqResName(seqResName)... |
public class class_name {
public List<ParserToken> consumeWhile(ParserTokenType... types) {
List<ParserToken> tokens = new ArrayList<>();
while (isOfType(lookAheadType(0), types)) {
tokens.add(consume());
}
return tokens;
} } | public class class_name {
public List<ParserToken> consumeWhile(ParserTokenType... types) {
List<ParserToken> tokens = new ArrayList<>();
while (isOfType(lookAheadType(0), types)) {
tokens.add(consume()); // depends on control dependency: [while], data = [none]
}
return tokens;
} } |
public class class_name {
public static final Renderer<Long> instance() { // NOPMD it's thread save!
if (LongRendererWithoutSeparator.instanceRenderer == null) {
synchronized (LongRendererWithoutSeparator.class) {
if (LongRendererWithoutSeparator.instanceRenderer == null) {
LongRendererWith... | public class class_name {
public static final Renderer<Long> instance() { // NOPMD it's thread save!
if (LongRendererWithoutSeparator.instanceRenderer == null) {
synchronized (LongRendererWithoutSeparator.class) { // depends on control dependency: [if], data = [none]
if (LongRendererWithoutSeparator.... |
public class class_name {
@Override
public void workerPreempted(final String id) {
final Optional<Collection<Tasklet>> preemptedTasklets = runningWorkers.removeWorker(id);
if (preemptedTasklets.isPresent()) {
for (final Tasklet tasklet : preemptedTasklets.get()) {
pendingTasklets.addFirst(taskl... | public class class_name {
@Override
public void workerPreempted(final String id) {
final Optional<Collection<Tasklet>> preemptedTasklets = runningWorkers.removeWorker(id);
if (preemptedTasklets.isPresent()) {
for (final Tasklet tasklet : preemptedTasklets.get()) {
pendingTasklets.addFirst(taskl... |
public class class_name {
public DescribeTagsResult withTagDescriptions(TagDescription... tagDescriptions) {
if (this.tagDescriptions == null) {
setTagDescriptions(new java.util.ArrayList<TagDescription>(tagDescriptions.length));
}
for (TagDescription ele : tagDescriptions) {
... | public class class_name {
public DescribeTagsResult withTagDescriptions(TagDescription... tagDescriptions) {
if (this.tagDescriptions == null) {
setTagDescriptions(new java.util.ArrayList<TagDescription>(tagDescriptions.length)); // depends on control dependency: [if], data = [none]
}
... |
public class class_name {
public PondLife get(int timeoutMs)
throws Exception
{
PondLife pl=null;
// Defer to other threads before locking
if (_available<_min)
Thread.yield();
int new_id=-1;
// Try to get pondlife without creat... | public class class_name {
public PondLife get(int timeoutMs)
throws Exception
{
PondLife pl=null;
// Defer to other threads before locking
if (_available<_min)
Thread.yield();
int new_id=-1;
// Try to get pondlife without creat... |
public class class_name {
public static void monitor(Object handle, ReleaseListener listener) {
if (logger.isDebugEnabled()) {
logger.debug("Monitoring handle [" + handle + "] with release listener [" + listener + "]");
}
// Make weak reference to this handle, so we can say when
... | public class class_name {
public static void monitor(Object handle, ReleaseListener listener) {
if (logger.isDebugEnabled()) {
logger.debug("Monitoring handle [" + handle + "] with release listener [" + listener + "]"); // depends on control dependency: [if], data = [none]
}
// Mak... |
public class class_name {
@Override
public void publish(String channel, Tree message) {
if (status.get() == STATUS_CONNECTED) {
try {
if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) {
logger.info("Submitting message to channel \"" + channel + "\":\r\n" + message.toString());
... | public class class_name {
@Override
public void publish(String channel, Tree message) {
if (status.get() == STATUS_CONNECTED) {
try {
if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) {
logger.info("Submitting message to channel \"" + channel + "\":\r\n" + message.toString());
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.