method
stringlengths 13
441k
| clean_method
stringlengths 7
313k
| doc
stringlengths 17
17.3k
| comment
stringlengths 3
1.42k
| method_name
stringlengths 1
273
| extra
dict | imports
list | imports_info
stringlengths 19
34.8k
| cluster_imports_info
stringlengths 15
3.66k
| libraries
list | libraries_info
stringlengths 6
661
| id
int64 0
2.92M
|
|---|---|---|---|---|---|---|---|---|---|---|---|
public void open(Decoder decoder) throws JavaLayerException;
|
void function(Decoder decoder) throws JavaLayerException;
|
/**
* Prepares the AudioDevice for playback of audio samples.
* @param decoder The decoder that will be providing the audio
* samples.
*
* If the audio device is already open, this method returns silently.
*
*/
|
Prepares the AudioDevice for playback of audio samples
|
open
|
{
"repo_name": "groovejames/groovejames",
"path": "src/main/java/javazoom/jl2/player/AudioDevice.java",
"license": "gpl-3.0",
"size": 3620
}
|
[
"javazoom.jl2.decoder.Decoder",
"javazoom.jl2.decoder.JavaLayerException"
] |
import javazoom.jl2.decoder.Decoder; import javazoom.jl2.decoder.JavaLayerException;
|
import javazoom.jl2.decoder.*;
|
[
"javazoom.jl2.decoder"
] |
javazoom.jl2.decoder;
| 338,557
|
public String[][] get_all_values() {
int i, j;
String all_values[][] = new String[pf.number_variables()][];
DiscreteVariable dv;
for (i = 0; i < pf.number_variables(); i++) {
dv = pf.get_variable(i);
all_values[i] = new String[dv.number_values()];
for (j = 0; j < all_values[i].length; j++) {
all_values[i][j] = dv.get_value(j);
}
}
return (all_values);
}
|
String[][] function() { int i, j; String all_values[][] = new String[pf.number_variables()][]; DiscreteVariable dv; for (i = 0; i < pf.number_variables(); i++) { dv = pf.get_variable(i); all_values[i] = new String[dv.number_values()]; for (j = 0; j < all_values[i].length; j++) { all_values[i][j] = dv.get_value(j); } } return (all_values); }
|
/**
* Get all values for variables in the function in the node.
*/
|
Get all values for variables in the function in the node
|
get_all_values
|
{
"repo_name": "MrSampson/javabayes",
"path": "src/edu/cmu/cs/javabayes/inferencegraphs/InferenceGraphNode.java",
"license": "gpl-2.0",
"size": 15567
}
|
[
"edu.cmu.cs.javabayes.bayesiannetworks.DiscreteVariable"
] |
import edu.cmu.cs.javabayes.bayesiannetworks.DiscreteVariable;
|
import edu.cmu.cs.javabayes.bayesiannetworks.*;
|
[
"edu.cmu.cs"
] |
edu.cmu.cs;
| 1,167,411
|
List<Activity> findAll(ISubjectID subject);
|
List<Activity> findAll(ISubjectID subject);
|
/**
* Obtain the list of all activities of a subject
* @param subject Subject identifier
* @return List of Activities
*/
|
Obtain the list of all activities of a subject
|
findAll
|
{
"repo_name": "UOC/PeLP",
"path": "src/main/java/edu/uoc/pelp/model/dao/IActivityDAO.java",
"license": "gpl-3.0",
"size": 4751
}
|
[
"edu.uoc.pelp.engine.activity.Activity",
"edu.uoc.pelp.engine.campus.ISubjectID",
"java.util.List"
] |
import edu.uoc.pelp.engine.activity.Activity; import edu.uoc.pelp.engine.campus.ISubjectID; import java.util.List;
|
import edu.uoc.pelp.engine.activity.*; import edu.uoc.pelp.engine.campus.*; import java.util.*;
|
[
"edu.uoc.pelp",
"java.util"
] |
edu.uoc.pelp; java.util;
| 607,032
|
private void SD(SetData train, int clase) {
boolean continuar = false;
System.out.println("\n We search the best rules for class " + nameClasses[clase]);
SetRules beam = new SetRules();
SetRules newbeam = new SetRules();
beam.addNameClasses(nameClasses);
beam.addNameClass(nameClasses[clase]);
//Create the initial beam
for (int i = 0; i < storeSelectors.size(); i++) {
Complex aux = new Complex(nClases);
aux.setClas(clase);
aux.adjuntaNombreAtributos(nameAttributes);
aux.addSelector(storeSelectors.getSelector(i));
evaluateRuleInit(aux, train);
beam.addRegla(aux);
}
//Sort out the Beam
Collections.sort(beam.getConjReglas());
beam.eliminaSubsumidos(beam.size());
beam.deleteRulesLowSupport(beamWidth, minSupp);
beam.deleteEqualAttributes(beamWidth);
for (int j = beam.size() - 1; beam.size() > beamWidth; j--) {
beam.deleteRegla(j);
}
//Copy the beam in newbeam
newbeam.addNameClasses(nameClasses);
newbeam.addNameClass(nameClasses[clase]);
newbeam.addReglas(beam);
do { // while improvement
continuar = false;
for (int i = 0; i < storeSelectors.size(); i++) {
Selector s = storeSelectors.getSelector(i);
for (int j = 0; j < beam.size(); j++) {
Complex aux2 = beam.getRule(j);
Complex aux = new Complex(nClases);
boolean sigue = true;
for (int h = 0; (h < aux2.size()) && (sigue); h++) {
Selector s2 = aux2.getSelector(h);
aux.addSelector(s2);
if (s2.compareTo(s) < 2) { // It is the same attribute
sigue = false; // Don´t add this attribute
}
}
if (sigue) { //This is a new selector to add to the rule
aux.addSelector(s);
aux.setClas(clase);
aux.adjuntaNombreAtributos(nameAttributes);
//Evaluate TP/|E| and q_g
boolean improvement = evaluateRule(aux, train, newbeam);
if ((improvement)&&(isRelevant(aux, newbeam)&&(aux!=null))){
//The new rule is added to newbeam
newbeam.addRegla(aux);
//There is an improvement in NewBeam
continuar = true;
}
}
}
}
// Sort out newbeam
Collections.sort(newbeam.getConjReglas());
// Eliminate rules not valid
newbeam.eliminaSubsumidos(newbeam.size());
newbeam.deleteNull();
newbeam.deleteEqual(newbeam.size());
for (int j = newbeam.size() - 1; newbeam.size() > beamWidth; j--) {
newbeam.deleteRegla(j);
}
beam.deleteAll();
// Copy newbeam in beam
beam.addReglas(newbeam);
} while (continuar);
// if number of rules is lower than beamWidth
if ((numRules != 0)&&(numRules < beamWidth)){
int conta = 0;
for(int i=0; i<beamWidth && conta<numRules; i++){
if(beam.getRule(i).getSup() > minSupp){
setFinalRules.addRegla(beam.getRule(i));
conta++;
}
}
} else {
for(int i=0; i<beamWidth; i++){
if(beam.getRule(i).getSup() > minSupp){
setFinalRules.addRegla(beam.getRule(i));
}
}
}
}
|
void function(SetData train, int clase) { boolean continuar = false; System.out.println(STR + nameClasses[clase]); SetRules beam = new SetRules(); SetRules newbeam = new SetRules(); beam.addNameClasses(nameClasses); beam.addNameClass(nameClasses[clase]); for (int i = 0; i < storeSelectors.size(); i++) { Complex aux = new Complex(nClases); aux.setClas(clase); aux.adjuntaNombreAtributos(nameAttributes); aux.addSelector(storeSelectors.getSelector(i)); evaluateRuleInit(aux, train); beam.addRegla(aux); } Collections.sort(beam.getConjReglas()); beam.eliminaSubsumidos(beam.size()); beam.deleteRulesLowSupport(beamWidth, minSupp); beam.deleteEqualAttributes(beamWidth); for (int j = beam.size() - 1; beam.size() > beamWidth; j--) { beam.deleteRegla(j); } newbeam.addNameClasses(nameClasses); newbeam.addNameClass(nameClasses[clase]); newbeam.addReglas(beam); do { continuar = false; for (int i = 0; i < storeSelectors.size(); i++) { Selector s = storeSelectors.getSelector(i); for (int j = 0; j < beam.size(); j++) { Complex aux2 = beam.getRule(j); Complex aux = new Complex(nClases); boolean sigue = true; for (int h = 0; (h < aux2.size()) && (sigue); h++) { Selector s2 = aux2.getSelector(h); aux.addSelector(s2); if (s2.compareTo(s) < 2) { sigue = false; } } if (sigue) { aux.addSelector(s); aux.setClas(clase); aux.adjuntaNombreAtributos(nameAttributes); boolean improvement = evaluateRule(aux, train, newbeam); if ((improvement)&&(isRelevant(aux, newbeam)&&(aux!=null))){ newbeam.addRegla(aux); continuar = true; } } } } Collections.sort(newbeam.getConjReglas()); newbeam.eliminaSubsumidos(newbeam.size()); newbeam.deleteNull(); newbeam.deleteEqual(newbeam.size()); for (int j = newbeam.size() - 1; newbeam.size() > beamWidth; j--) { newbeam.deleteRegla(j); } beam.deleteAll(); beam.addReglas(newbeam); } while (continuar); if ((numRules != 0)&&(numRules < beamWidth)){ int conta = 0; for(int i=0; i<beamWidth && conta<numRules; i++){ if(beam.getRule(i).getSup() > minSupp){ setFinalRules.addRegla(beam.getRule(i)); conta++; } } } else { for(int i=0; i<beamWidth; i++){ if(beam.getRule(i).getSup() > minSupp){ setFinalRules.addRegla(beam.getRule(i)); } } } }
|
/**
* <p>
* It obtains the rules for a value of the class
* </p>
* @param train It is the examples of the training set
* @param clase It is the class to study
*/
|
It obtains the rules for a value of the class
|
SD
|
{
"repo_name": "adofsauron/KEEL",
"path": "src/keel/Algorithms/Subgroup_Discovery/SDAlgorithm/SD.java",
"license": "gpl-3.0",
"size": 20133
}
|
[
"java.util.Collections"
] |
import java.util.Collections;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,025,927
|
@ResourceOperation(resource = Resource.CLUSTER, operation = Operation.MANAGE,
target = Target.GATEWAY)
void rebalance();
|
@ResourceOperation(resource = Resource.CLUSTER, operation = Operation.MANAGE, target = Target.GATEWAY) void rebalance();
|
/**
* Rebalances this GatewaySender.
*/
|
Rebalances this GatewaySender
|
rebalance
|
{
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/management/GatewaySenderMXBean.java",
"license": "apache-2.0",
"size": 8168
}
|
[
"org.apache.geode.management.internal.security.ResourceOperation",
"org.apache.geode.security.ResourcePermission"
] |
import org.apache.geode.management.internal.security.ResourceOperation; import org.apache.geode.security.ResourcePermission;
|
import org.apache.geode.management.internal.security.*; import org.apache.geode.security.*;
|
[
"org.apache.geode"
] |
org.apache.geode;
| 2,146,904
|
public Application refresh() {
return wrapped.refresh()
.map((AsyncApplication app) -> this)
.toBlocking()
.single();
}
|
Application function() { return wrapped.refresh() .map((AsyncApplication app) -> this) .toBlocking() .single(); }
|
/**
* Refresh this local application
*
* @return the updated Application
*/
|
Refresh this local application
|
refresh
|
{
"repo_name": "TheThingsNetwork/java-app-sdk",
"path": "account/src/main/java/org/thethingsnetwork/account/sync/Application.java",
"license": "mit",
"size": 9498
}
|
[
"org.thethingsnetwork.account.async.AsyncApplication"
] |
import org.thethingsnetwork.account.async.AsyncApplication;
|
import org.thethingsnetwork.account.async.*;
|
[
"org.thethingsnetwork.account"
] |
org.thethingsnetwork.account;
| 1,841,500
|
void init(Map<String, String> additionalData);
|
void init(Map<String, String> additionalData);
|
/**
* is called after the agent is fully created to initialize the component
* @param additionalData a map containing the additional data defined in the simulation xml file
*/
|
is called after the agent is fully created to initialize the component
|
init
|
{
"repo_name": "Angerona/angerona-framework",
"path": "fw/src/main/java/com/github/angerona/fw/AgentComponent.java",
"license": "gpl-3.0",
"size": 2167
}
|
[
"java.util.Map"
] |
import java.util.Map;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 154,969
|
public synchronized void controllerUpdate(ControllerEvent ce) {
Player p = (Player)ce.getSourceController();
if (p == null)
return;
// Get this when the internal players are realized.
if (ce instanceof RealizeCompleteEvent) {
PlayerWindow pw = find(p);
if (pw == null) {
// Some strange happened.
System.err.println("Internal error!");
System.exit(-1);
}
pw.initialize();
pw.setVisible(true);
p.start();
}
if (ce instanceof ControllerErrorEvent) {
p.removeControllerListener(this);
PlayerWindow pw = find(p);
if (pw != null) {
pw.close();
playerWindows.removeElement(pw);
}
System.err.println("AVReceive2 internal error: " + ce);
}
}
class SessionLabel {
public String addr = null;
public int port;
public int ttl = 1;
SessionLabel(String session) throws IllegalArgumentException {
int off;
String portStr = null, ttlStr = null;
if (session != null && session.length() > 0) {
while (session.length() > 1 && session.charAt(0) == '/')
session = session.substring(1);
// Now see if there's a addr specified.
off = session.indexOf('/');
if (off == -1) {
if (!session.equals(""))
addr = session;
} else {
addr = session.substring(0, off);
session = session.substring(off + 1);
// Now see if there's a port specified
off = session.indexOf('/');
if (off == -1) {
if (!session.equals(""))
portStr = session;
} else {
portStr = session.substring(0, off);
session = session.substring(off + 1);
// Now see if there's a ttl specified
off = session.indexOf('/');
if (off == -1) {
if (!session.equals(""))
ttlStr = session;
} else {
ttlStr = session.substring(0, off);
}
}
}
}
if (addr == null)
throw new IllegalArgumentException();
if (portStr != null) {
try {
Integer integer = Integer.valueOf(portStr);
if (integer != null)
port = integer.intValue();
} catch (Throwable t) {
throw new IllegalArgumentException();
}
} else
throw new IllegalArgumentException();
if (ttlStr != null) {
try {
Integer integer = Integer.valueOf(ttlStr);
if (integer != null)
ttl = integer.intValue();
} catch (Throwable t) {
throw new IllegalArgumentException();
}
}
}
}
class PlayerWindow extends Frame {
Player player;
ReceiveStream stream;
PlayerWindow(Player p, ReceiveStream strm) {
player = p;
stream = strm;
}
|
synchronized void function(ControllerEvent ce) { Player p = (Player)ce.getSourceController(); if (p == null) return; if (ce instanceof RealizeCompleteEvent) { PlayerWindow pw = find(p); if (pw == null) { System.err.println(STR); System.exit(-1); } pw.initialize(); pw.setVisible(true); p.start(); } if (ce instanceof ControllerErrorEvent) { p.removeControllerListener(this); PlayerWindow pw = find(p); if (pw != null) { pw.close(); playerWindows.removeElement(pw); } System.err.println(STR + ce); } } class SessionLabel { public String addr = null; public int port; public int ttl = 1; SessionLabel(String session) throws IllegalArgumentException { int off; String portStr = null, ttlStr = null; if (session != null && session.length() > 0) { while (session.length() > 1 && session.charAt(0) == '/') session = session.substring(1); off = session.indexOf('/'); if (off == -1) { if (!session.equals(STRSTR")) ttlStr = session; } else { ttlStr = session.substring(0, off); } } } } if (addr == null) throw new IllegalArgumentException(); if (portStr != null) { try { Integer integer = Integer.valueOf(portStr); if (integer != null) port = integer.intValue(); } catch (Throwable t) { throw new IllegalArgumentException(); } } else throw new IllegalArgumentException(); if (ttlStr != null) { try { Integer integer = Integer.valueOf(ttlStr); if (integer != null) ttl = integer.intValue(); } catch (Throwable t) { throw new IllegalArgumentException(); } } } } class PlayerWindow extends Frame { Player player; ReceiveStream stream; PlayerWindow(Player p, ReceiveStream strm) { player = p; stream = strm; }
|
/**
* ControllerListener for the Players.
*/
|
ControllerListener for the Players
|
controllerUpdate
|
{
"repo_name": "champtar/fmj-sourceforge-mirror",
"path": "src.examples.jmf/rtp/avreceive/AVReceive2.java",
"license": "lgpl-2.1",
"size": 13569
}
|
[
"java.awt.Frame",
"javax.media.ControllerErrorEvent",
"javax.media.ControllerEvent",
"javax.media.Player",
"javax.media.RealizeCompleteEvent",
"javax.media.rtp.ReceiveStream"
] |
import java.awt.Frame; import javax.media.ControllerErrorEvent; import javax.media.ControllerEvent; import javax.media.Player; import javax.media.RealizeCompleteEvent; import javax.media.rtp.ReceiveStream;
|
import java.awt.*; import javax.media.*; import javax.media.rtp.*;
|
[
"java.awt",
"javax.media"
] |
java.awt; javax.media;
| 1,552,113
|
public void startEffect(Effect effect) {
}
|
void function(Effect effect) { }
|
/**
* Start effect on effected
*
* @param effect
*/
|
Start effect on effected
|
startEffect
|
{
"repo_name": "GiGatR00n/Aion-Core-v4.7.5",
"path": "AL-EventEngine/EventEngine/src/com/aionemu/gameserver/skillengine/effect/EffectTemplate.java",
"license": "gpl-2.0",
"size": 20721
}
|
[
"com.aionemu.gameserver.skillengine.model.Effect"
] |
import com.aionemu.gameserver.skillengine.model.Effect;
|
import com.aionemu.gameserver.skillengine.model.*;
|
[
"com.aionemu.gameserver"
] |
com.aionemu.gameserver;
| 1,766,052
|
@Test public void testPFTableRefusesFilterCooperative() throws Exception {
final StringBuilder buf = new StringBuilder();
final Table table = new BeatlesProjectableFilterableTable(buf, false);
final String explain = "PLAN=EnumerableInterpreter\n"
+ " BindableTableScan(table=[[s, beatles2]], filters=[[=($0, 4)]], projects=[[2]])";
CalciteAssert.that()
.with(newSchema("s", "beatles2", table))
.query("select \"k\" from \"s\".\"beatles2\" where \"i\" = 4")
.explainContains(explain)
.returnsUnordered("k=1940",
"k=1942");
assertThat(buf.toString(),
is("returnCount=4, projects=[2, 0]"));
}
|
@Test void function() throws Exception { final StringBuilder buf = new StringBuilder(); final Table table = new BeatlesProjectableFilterableTable(buf, false); final String explain = STR + STR; CalciteAssert.that() .with(newSchema("s", STR, table)) .query(STRk\STRs\".\"beatles2\STRi\STR) .explainContains(explain) .returnsUnordered(STR, STR); assertThat(buf.toString(), is(STR)); }
|
/** A filter and project on a
* {@link org.apache.calcite.schema.ProjectableFilterableTable}. The table
* refuses to execute the filter, so Calcite should add a pull up and
* transform the filter (projecting the column needed by the filter). */
|
A filter and project on a <code>org.apache.calcite.schema.ProjectableFilterableTable</code>. The table refuses to execute the filter, so Calcite should add a pull up and
|
testPFTableRefusesFilterCooperative
|
{
"repo_name": "b-slim/calcite",
"path": "core/src/test/java/org/apache/calcite/test/ScannableTableTest.java",
"license": "apache-2.0",
"size": 23681
}
|
[
"org.apache.calcite.schema.Table",
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"org.junit.Test"
] |
import org.apache.calcite.schema.Table; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.junit.Test;
|
import org.apache.calcite.schema.*; import org.hamcrest.*; import org.junit.*;
|
[
"org.apache.calcite",
"org.hamcrest",
"org.junit"
] |
org.apache.calcite; org.hamcrest; org.junit;
| 864,323
|
public void snapToKeyboard(MTKeyboard mtKeyboard){
//OLD WAY
// this.translate(new Vector3D(30, -(getFont().getFontAbsoluteHeight() * (getLineCount())) + getFont().getFontMaxDescent() - borderHeight, 0));
mtKeyboard.addChild(this);
this.setPositionRelativeToParent(new Vector3D(40, -this.getHeightXY(TransformSpace.LOCAL)*0.5f));
}
|
void function(MTKeyboard mtKeyboard){ mtKeyboard.addChild(this); this.setPositionRelativeToParent(new Vector3D(40, -this.getHeightXY(TransformSpace.LOCAL)*0.5f)); }
|
/**
* Snap to keyboard.
*
* @param mtKeyboard the mt keyboard
*/
|
Snap to keyboard
|
snapToKeyboard
|
{
"repo_name": "rjmarsan/GestureSound",
"path": "src/org/mt4j/components/visibleComponents/widgets/MTTextArea.java",
"license": "gpl-2.0",
"size": 24828
}
|
[
"org.mt4j.components.TransformSpace",
"org.mt4j.components.visibleComponents.widgets.keyboard.MTKeyboard",
"org.mt4j.util.math.Vector3D"
] |
import org.mt4j.components.TransformSpace; import org.mt4j.components.visibleComponents.widgets.keyboard.MTKeyboard; import org.mt4j.util.math.Vector3D;
|
import org.mt4j.components.*; import org.mt4j.util.math.*;
|
[
"org.mt4j.components",
"org.mt4j.util"
] |
org.mt4j.components; org.mt4j.util;
| 47,755
|
public Observable<ServiceResponse<Void>> paramDatetimeWithServiceResponseAsync(String scenario, DateTime value) {
if (scenario == null) {
throw new IllegalArgumentException("Parameter scenario is required and cannot be null.");
}
if (value == null) {
throw new IllegalArgumentException("Parameter value is required and cannot be null.");
}
|
Observable<ServiceResponse<Void>> function(String scenario, DateTime value) { if (scenario == null) { throw new IllegalArgumentException(STR); } if (value == null) { throw new IllegalArgumentException(STR); }
|
/**
* Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z".
*
* @param scenario Send a post request with header values "scenario": "valid" or "min"
* @param value Send a post request with header values "2010-01-01T12:34:56Z" or "0001-01-01T00:00:00Z"
* @return the {@link ServiceResponse} object if successful.
*/
|
Send a post request with header values "scenario": "valid", "value": "2010-01-01T12:34:56Z" or "scenario": "min", "value": "0001-01-01T00:00:00Z"
|
paramDatetimeWithServiceResponseAsync
|
{
"repo_name": "yugangw-msft/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/header/implementation/HeadersImpl.java",
"license": "mit",
"size": 118072
}
|
[
"com.microsoft.rest.ServiceResponse",
"org.joda.time.DateTime"
] |
import com.microsoft.rest.ServiceResponse; import org.joda.time.DateTime;
|
import com.microsoft.rest.*; import org.joda.time.*;
|
[
"com.microsoft.rest",
"org.joda.time"
] |
com.microsoft.rest; org.joda.time;
| 397,231
|
protected Object interpolate(final Object value) {
final ConfigurationInterpolator interpolator = getConfiguration().getInterpolator();
return interpolator != null ? interpolator.interpolate(value) : value;
}
|
Object function(final Object value) { final ConfigurationInterpolator interpolator = getConfiguration().getInterpolator(); return interpolator != null ? interpolator.interpolate(value) : value; }
|
/**
* Performs interpolation for the specified value. This implementation will interpolate against the current subnode
* configuration's parent. If sub classes need a different interpolation mechanism, they should override this method.
*
* @param value the value that is to be interpolated
* @return the interpolated value
*/
|
Performs interpolation for the specified value. This implementation will interpolate against the current subnode configuration's parent. If sub classes need a different interpolation mechanism, they should override this method
|
interpolate
|
{
"repo_name": "apache/commons-configuration",
"path": "src/main/java/org/apache/commons/configuration2/beanutils/XMLBeanDeclaration.java",
"license": "apache-2.0",
"size": 25968
}
|
[
"org.apache.commons.configuration2.interpol.ConfigurationInterpolator"
] |
import org.apache.commons.configuration2.interpol.ConfigurationInterpolator;
|
import org.apache.commons.configuration2.interpol.*;
|
[
"org.apache.commons"
] |
org.apache.commons;
| 882,427
|
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<ResourceNameAvailabilityInner> checkNameAvailabilityAsync(ResourceNameAvailabilityRequest request);
|
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ResourceNameAvailabilityInner> checkNameAvailabilityAsync(ResourceNameAvailabilityRequest request);
|
/**
* Description for Check if a resource name is available.
*
* @param request Name availability request.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException thrown if the request is
* rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return information regarding availability of a resource name on successful completion of {@link Mono}.
*/
|
Description for Check if a resource name is available
|
checkNameAvailabilityAsync
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java",
"license": "mit",
"size": 48714
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.appservice.fluent.models.ResourceNameAvailabilityInner",
"com.azure.resourcemanager.appservice.models.ResourceNameAvailabilityRequest"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.appservice.fluent.models.ResourceNameAvailabilityInner; import com.azure.resourcemanager.appservice.models.ResourceNameAvailabilityRequest;
|
import com.azure.core.annotation.*; import com.azure.resourcemanager.appservice.fluent.models.*; import com.azure.resourcemanager.appservice.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 210,411
|
private void consumeFromQueue(C consumer, AMQShortString queueName,
AMQProtocolHandler protocolHandler, boolean nowait, String messageSelector) throws AMQException, FailoverException
{
int tagId = _nextTag++;
consumer.setConsumerTag(tagId);
// we must register the consumer in the map before we actually start listening
_consumers.put(tagId, consumer);
synchronized (consumer.getDestination())
{
_destinationConsumerCount.putIfAbsent(consumer.getDestination(), new AtomicInteger());
_destinationConsumerCount.get(consumer.getDestination()).incrementAndGet();
}
try
{
sendConsume(consumer, queueName, protocolHandler, nowait, messageSelector, tagId);
consumer.readyToConsume();
}
catch (AMQException e)
{
// clean-up the map in the event of an error
_consumers.remove(tagId);
throw e;
}
}
|
void function(C consumer, AMQShortString queueName, AMQProtocolHandler protocolHandler, boolean nowait, String messageSelector) throws AMQException, FailoverException { int tagId = _nextTag++; consumer.setConsumerTag(tagId); _consumers.put(tagId, consumer); synchronized (consumer.getDestination()) { _destinationConsumerCount.putIfAbsent(consumer.getDestination(), new AtomicInteger()); _destinationConsumerCount.get(consumer.getDestination()).incrementAndGet(); } try { sendConsume(consumer, queueName, protocolHandler, nowait, messageSelector, tagId); consumer.readyToConsume(); } catch (AMQException e) { _consumers.remove(tagId); throw e; } }
|
/**
* Register to consume from the queue.
*
* @param queueName
*/
|
Register to consume from the queue
|
consumeFromQueue
|
{
"repo_name": "hastef88/andes",
"path": "modules/andes-core/client/src/main/java/org/wso2/andes/client/AMQSession.java",
"license": "apache-2.0",
"size": 137151
}
|
[
"java.util.concurrent.atomic.AtomicInteger",
"org.wso2.andes.AMQException",
"org.wso2.andes.client.failover.FailoverException",
"org.wso2.andes.client.protocol.AMQProtocolHandler",
"org.wso2.andes.framing.AMQShortString"
] |
import java.util.concurrent.atomic.AtomicInteger; import org.wso2.andes.AMQException; import org.wso2.andes.client.failover.FailoverException; import org.wso2.andes.client.protocol.AMQProtocolHandler; import org.wso2.andes.framing.AMQShortString;
|
import java.util.concurrent.atomic.*; import org.wso2.andes.*; import org.wso2.andes.client.failover.*; import org.wso2.andes.client.protocol.*; import org.wso2.andes.framing.*;
|
[
"java.util",
"org.wso2.andes"
] |
java.util; org.wso2.andes;
| 23,909
|
private NdTypeSignature createTypeSignature(SignatureWrapper genericSignature, char[] fieldDescriptorIfVariable)
throws CoreException {
char[] signature = genericSignature.signature;
if (signature == null || signature.length == 0) {
return null;
}
char firstChar = genericSignature.charAtStart();
switch (firstChar) {
case 'T': {
// Skip the 'T' prefix
genericSignature.start++;
NdComplexTypeSignature typeSignature = new NdComplexTypeSignature(getNd());
char[] fieldDescriptor = fieldDescriptorIfVariable;
if (fieldDescriptor == null) {
fieldDescriptor = JAVA_LANG_OBJECT_FIELD_DESCRIPTOR;
}
typeSignature.setRawType(createTypeIdFromFieldDescriptor(fieldDescriptor));
typeSignature.setVariableIdentifier(genericSignature.nextWord());
// Skip the trailing semicolon
skipChar(genericSignature, ';');
return typeSignature;
}
case '[': {
// Skip the '[' prefix
genericSignature.start++;
char[] nestedFieldDescriptor = null;
if (fieldDescriptorIfVariable != null && fieldDescriptorIfVariable.length > 0
&& fieldDescriptorIfVariable[0] == '[') {
nestedFieldDescriptor = CharArrayUtils.subarray(fieldDescriptorIfVariable, 1);
}
// Determine the array argument type
NdTypeSignature elementType = createTypeSignature(genericSignature, nestedFieldDescriptor);
char[] computedFieldDescriptor = CharArrayUtils.concat(ARRAY_FIELD_DESCRIPTOR_PREFIX,
elementType.getRawType().getFieldDescriptor().getChars());
NdTypeId rawType = createTypeIdFromFieldDescriptor(computedFieldDescriptor);
// We encode signatures as though they were a one-argument generic type whose element
// type is the generic argument.
NdComplexTypeSignature typeSignature = new NdComplexTypeSignature(getNd());
typeSignature.setRawType(rawType);
NdTypeArgument typeArgument = new NdTypeArgument(getNd(), typeSignature);
typeArgument.setType(elementType);
return typeSignature;
}
case 'V':
genericSignature.start++;
return null;
case 'B':
case 'C':
case 'D':
case 'F':
case 'I':
case 'J':
case 'S':
case 'Z':
genericSignature.start++;
return createTypeIdFromFieldDescriptor(new char[] { firstChar });
case 'L':
return parseClassTypeSignature(null, genericSignature);
case '+':
case '-':
case '*':
throw new CoreException(Package.createStatus("Unexpected wildcard in top-level of generic signature: " //$NON-NLS-1$
+ genericSignature.toString()));
default:
throw new CoreException(Package.createStatus("Generic signature starts with unknown character: " //$NON-NLS-1$
+ genericSignature.toString()));
}
}
|
NdTypeSignature function(SignatureWrapper genericSignature, char[] fieldDescriptorIfVariable) throws CoreException { char[] signature = genericSignature.signature; if (signature == null signature.length == 0) { return null; } char firstChar = genericSignature.charAtStart(); switch (firstChar) { case 'T': { genericSignature.start++; NdComplexTypeSignature typeSignature = new NdComplexTypeSignature(getNd()); char[] fieldDescriptor = fieldDescriptorIfVariable; if (fieldDescriptor == null) { fieldDescriptor = JAVA_LANG_OBJECT_FIELD_DESCRIPTOR; } typeSignature.setRawType(createTypeIdFromFieldDescriptor(fieldDescriptor)); typeSignature.setVariableIdentifier(genericSignature.nextWord()); skipChar(genericSignature, ';'); return typeSignature; } case '[': { genericSignature.start++; char[] nestedFieldDescriptor = null; if (fieldDescriptorIfVariable != null && fieldDescriptorIfVariable.length > 0 && fieldDescriptorIfVariable[0] == '[') { nestedFieldDescriptor = CharArrayUtils.subarray(fieldDescriptorIfVariable, 1); } NdTypeSignature elementType = createTypeSignature(genericSignature, nestedFieldDescriptor); char[] computedFieldDescriptor = CharArrayUtils.concat(ARRAY_FIELD_DESCRIPTOR_PREFIX, elementType.getRawType().getFieldDescriptor().getChars()); NdTypeId rawType = createTypeIdFromFieldDescriptor(computedFieldDescriptor); NdComplexTypeSignature typeSignature = new NdComplexTypeSignature(getNd()); typeSignature.setRawType(rawType); NdTypeArgument typeArgument = new NdTypeArgument(getNd(), typeSignature); typeArgument.setType(elementType); return typeSignature; } case 'V': genericSignature.start++; return null; case 'B': case 'C': case 'D': case 'F': case 'I': case 'J': case 'S': case 'Z': genericSignature.start++; return createTypeIdFromFieldDescriptor(new char[] { firstChar }); case 'L': return parseClassTypeSignature(null, genericSignature); case '+': case '-': case '*': throw new CoreException(Package.createStatus(STR + genericSignature.toString())); default: throw new CoreException(Package.createStatus(STR + genericSignature.toString())); } }
|
/**
* Reads a type signature from the given {@link SignatureWrapper}, starting at the character pointed to by
* wrapper.start. On return, wrapper.start will point to the first character following the type signature. Returns
* null if given an empty signature or the signature for the void type.
*
* @param genericSignature
* the generic signature to parse
* @param fieldDescriptorIfVariable
* the field descriptor to use if the type is a type variable -- or null if unknown (the field descriptor
* for java.lang.Object will be used)
* @throws CoreException
*/
|
Reads a type signature from the given <code>SignatureWrapper</code>, starting at the character pointed to by wrapper.start. On return, wrapper.start will point to the first character following the type signature. Returns null if given an empty signature or the signature for the void type
|
createTypeSignature
|
{
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.core/src/org/eclipse/jdt/internal/core/nd/indexer/ClassFileToIndexConverter.java",
"license": "epl-1.0",
"size": 35011
}
|
[
"org.eclipse.core.runtime.CoreException",
"org.eclipse.jdt.internal.compiler.lookup.SignatureWrapper",
"org.eclipse.jdt.internal.core.nd.java.NdComplexTypeSignature",
"org.eclipse.jdt.internal.core.nd.java.NdTypeArgument",
"org.eclipse.jdt.internal.core.nd.java.NdTypeId",
"org.eclipse.jdt.internal.core.nd.java.NdTypeSignature",
"org.eclipse.jdt.internal.core.nd.util.CharArrayUtils"
] |
import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.internal.compiler.lookup.SignatureWrapper; import org.eclipse.jdt.internal.core.nd.java.NdComplexTypeSignature; import org.eclipse.jdt.internal.core.nd.java.NdTypeArgument; import org.eclipse.jdt.internal.core.nd.java.NdTypeId; import org.eclipse.jdt.internal.core.nd.java.NdTypeSignature; import org.eclipse.jdt.internal.core.nd.util.CharArrayUtils;
|
import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.compiler.lookup.*; import org.eclipse.jdt.internal.core.nd.java.*; import org.eclipse.jdt.internal.core.nd.util.*;
|
[
"org.eclipse.core",
"org.eclipse.jdt"
] |
org.eclipse.core; org.eclipse.jdt;
| 2,272,849
|
public DhcpOptions dhcpOptions() {
return this.dhcpOptions;
}
|
DhcpOptions function() { return this.dhcpOptions; }
|
/**
* Get the dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network.
*
* @return the dhcpOptions value
*/
|
Get the dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network
|
dhcpOptions
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/VirtualNetworkInner.java",
"license": "mit",
"size": 9813
}
|
[
"com.microsoft.azure.management.network.v2019_11_01.DhcpOptions"
] |
import com.microsoft.azure.management.network.v2019_11_01.DhcpOptions;
|
import com.microsoft.azure.management.network.v2019_11_01.*;
|
[
"com.microsoft.azure"
] |
com.microsoft.azure;
| 916,830
|
public ImmutableMultimap<K, V> build() {
if (valueComparator != null) {
for (Collection<V> values : builderMultimap.asMap().values()) {
List<V> list = (List <V>) values;
Collections.sort(list, valueComparator);
}
}
|
ImmutableMultimap<K, V> function() { if (valueComparator != null) { for (Collection<V> values : builderMultimap.asMap().values()) { List<V> list = (List <V>) values; Collections.sort(list, valueComparator); } }
|
/**
* Returns a newly-created immutable multimap.
*/
|
Returns a newly-created immutable multimap
|
build
|
{
"repo_name": "mkeesey/guava-for-small-classpaths",
"path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMultimap.java",
"license": "apache-2.0",
"size": 18826
}
|
[
"java.util.Collection",
"java.util.Collections",
"java.util.List"
] |
import java.util.Collection; import java.util.Collections; import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,566,248
|
@Nonnull
ProcessGroupDTO update(@Nonnull ProcessGroupDTO processGroup);
|
ProcessGroupDTO update(@Nonnull ProcessGroupDTO processGroup);
|
/**
* Updates a process group.
*
* @param processGroup the process group
* @return the updated process group
* @throws NifiComponentNotFoundException if the process group does not exist
*/
|
Updates a process group
|
update
|
{
"repo_name": "claudiu-stanciu/kylo",
"path": "integrations/nifi/nifi-rest/nifi-rest-client/nifi-rest-client-api/src/main/java/com/thinkbiganalytics/nifi/rest/client/NiFiProcessGroupsRestClient.java",
"license": "apache-2.0",
"size": 9155
}
|
[
"javax.annotation.Nonnull",
"org.apache.nifi.web.api.dto.ProcessGroupDTO"
] |
import javax.annotation.Nonnull; import org.apache.nifi.web.api.dto.ProcessGroupDTO;
|
import javax.annotation.*; import org.apache.nifi.web.api.dto.*;
|
[
"javax.annotation",
"org.apache.nifi"
] |
javax.annotation; org.apache.nifi;
| 115,698
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
}
|
void function(int requestCode, int resultCode, Intent data) { }
|
/**
* Tell extension that one activity exists so that it can know the result
* of the exit code.
*/
|
Tell extension that one activity exists so that it can know the result of the exit code
|
onActivityResult
|
{
"repo_name": "seanlong/crosswalk",
"path": "runtime/android/java/src/org/xwalk/runtime/extension/XWalkExtension.java",
"license": "bsd-3-clause",
"size": 3818
}
|
[
"android.content.Intent"
] |
import android.content.Intent;
|
import android.content.*;
|
[
"android.content"
] |
android.content;
| 2,415,492
|
public void testEdgeCases(ResultList<T> list, ResultList<T> list2, T object1,
T object2) throws Exception {
// add and remove null
list.addObject(null);
assertTrue(list.getObjects().size() == 1);
assertTrue(list.getCount() == 1);
list.removeObject(null);
assertTrue(list.getObjects().size() == 0);
assertTrue(list.getCount() == 0);
// add the same thing multiple times and remove it multiple times
list.addObject(object1);
assertTrue(list.getObjects().size() == 1);
assertTrue(list.getCount() == 1);
list.addObject(object1);
assertTrue(list.getObjects().size() == 2);
assertTrue(list.getCount() == 2);
list.removeObject(object1);
assertTrue(list.getObjects().size() == 1);
assertTrue(list.getCount() == 1);
list.removeObject(object1);
assertTrue(list.getObjects().size() == 0);
assertTrue(list.getCount() == 0);
// add once and remove multiple times
list.addObject(object1);
assertTrue(list.getObjects().size() == 1);
assertTrue(list.getCount() == 1);
list.removeObject(object1);
assertTrue(list.getObjects().size() == 0);
assertTrue(list.getCount() == 0);
list.removeObject(object1);
assertTrue(list.getObjects().size() == 0);
assertTrue(list.getCount() == 0);
// contains null
assertFalse(list.contains(null));
list.addObject(null);
assertTrue(list.contains(null));
list.removeObject(null);
assertFalse(list.contains(null));
// total count is managed by user, any value is allowed
list.setTotalCount(-1);
assertTrue(list.getTotalCount() == -1);
}
|
void function(ResultList<T> list, ResultList<T> list2, T object1, T object2) throws Exception { list.addObject(null); assertTrue(list.getObjects().size() == 1); assertTrue(list.getCount() == 1); list.removeObject(null); assertTrue(list.getObjects().size() == 0); assertTrue(list.getCount() == 0); list.addObject(object1); assertTrue(list.getObjects().size() == 1); assertTrue(list.getCount() == 1); list.addObject(object1); assertTrue(list.getObjects().size() == 2); assertTrue(list.getCount() == 2); list.removeObject(object1); assertTrue(list.getObjects().size() == 1); assertTrue(list.getCount() == 1); list.removeObject(object1); assertTrue(list.getObjects().size() == 0); assertTrue(list.getCount() == 0); list.addObject(object1); assertTrue(list.getObjects().size() == 1); assertTrue(list.getCount() == 1); list.removeObject(object1); assertTrue(list.getObjects().size() == 0); assertTrue(list.getCount() == 0); list.removeObject(object1); assertTrue(list.getObjects().size() == 0); assertTrue(list.getCount() == 0); assertFalse(list.contains(null)); list.addObject(null); assertTrue(list.contains(null)); list.removeObject(null); assertFalse(list.contains(null)); list.setTotalCount(-1); assertTrue(list.getTotalCount() == -1); }
|
/**
* Test edge cases of a list.
*
* @param list the list
* @param list2 the list2
* @param object1 the object1
* @param object2 the object2
* @throws Exception the exception
*/
|
Test edge cases of a list
|
testEdgeCases
|
{
"repo_name": "WestCoastInformatics/ihtsdo-refset-tool",
"path": "jpa-model/src/test/java/org/ihtsdo/otf/refset/lists/AbstractListUnit.java",
"license": "apache-2.0",
"size": 6363
}
|
[
"org.ihtsdo.otf.refset.helpers.ResultList",
"org.junit.Assert"
] |
import org.ihtsdo.otf.refset.helpers.ResultList; import org.junit.Assert;
|
import org.ihtsdo.otf.refset.helpers.*; import org.junit.*;
|
[
"org.ihtsdo.otf",
"org.junit"
] |
org.ihtsdo.otf; org.junit;
| 126,917
|
protected void onImpact(MovingObjectPosition p_70227_1_) {
if (!this.worldObj.isRemote) {
if (p_70227_1_.entityHit != null) {
if (this.shootingEntity != null) {
if (p_70227_1_.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.shootingEntity), 8.0F) && !p_70227_1_.entityHit.isEntityAlive()) {
this.shootingEntity.heal(5.0F);
}
} else {
p_70227_1_.entityHit.attackEntityFrom(DamageSource.magic, 5.0F);
}
if (p_70227_1_.entityHit instanceof EntityLivingBase) {
byte b0 = 40;
if (this.worldObj.difficultySetting == EnumDifficulty.NORMAL) {
b0 = 40;
} else if (this.worldObj.difficultySetting == EnumDifficulty.HARD) {
b0 = 40;
}
if (b0 > 10) {
((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.wither.id, 20 * b0, 0));
((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20 * b0, 0));
((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.weakness.id, 20 * b0, 0));
}
}
}
this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 5.0F, false, this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"));
this.setDead();
}
}
|
void function(MovingObjectPosition p_70227_1_) { if (!this.worldObj.isRemote) { if (p_70227_1_.entityHit != null) { if (this.shootingEntity != null) { if (p_70227_1_.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.shootingEntity), 8.0F) && !p_70227_1_.entityHit.isEntityAlive()) { this.shootingEntity.heal(5.0F); } } else { p_70227_1_.entityHit.attackEntityFrom(DamageSource.magic, 5.0F); } if (p_70227_1_.entityHit instanceof EntityLivingBase) { byte b0 = 40; if (this.worldObj.difficultySetting == EnumDifficulty.NORMAL) { b0 = 40; } else if (this.worldObj.difficultySetting == EnumDifficulty.HARD) { b0 = 40; } if (b0 > 10) { ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.wither.id, 20 * b0, 0)); ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20 * b0, 0)); ((EntityLivingBase) p_70227_1_.entityHit).addPotionEffect(new PotionEffect(Potion.weakness.id, 20 * b0, 0)); } } } this.worldObj.newExplosion(this, this.posX, this.posY, this.posZ, 5.0F, false, this.worldObj.getGameRules().getGameRuleBooleanValue(STR)); this.setDead(); } }
|
/**
* Called when this EntityFireball hits a block or entity.
*/
|
Called when this EntityFireball hits a block or entity
|
onImpact
|
{
"repo_name": "Nath99000/Mods",
"path": "src/main/java/com/nath99000/quasarcraft/entity/EntityInterBall.java",
"license": "lgpl-3.0",
"size": 5161
}
|
[
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.potion.Potion",
"net.minecraft.potion.PotionEffect",
"net.minecraft.util.DamageSource",
"net.minecraft.util.MovingObjectPosition",
"net.minecraft.world.EnumDifficulty"
] |
import net.minecraft.entity.EntityLivingBase; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.EnumDifficulty;
|
import net.minecraft.entity.*; import net.minecraft.potion.*; import net.minecraft.util.*; import net.minecraft.world.*;
|
[
"net.minecraft.entity",
"net.minecraft.potion",
"net.minecraft.util",
"net.minecraft.world"
] |
net.minecraft.entity; net.minecraft.potion; net.minecraft.util; net.minecraft.world;
| 2,081,150
|
public Context newInitialContext(Map<?,?> environment) throws NamingException;
|
Context function(Map<?,?> environment) throws NamingException;
|
/**
* Creates a new JNDI initial context with the specified JNDI environment
* properties.
*
* @param environment JNDI environment properties specified by caller
* @return an instance of javax.naming.Context
* @throws NamingException upon any error that occurs during context
* creation
*/
|
Creates a new JNDI initial context with the specified JNDI environment properties
|
newInitialContext
|
{
"repo_name": "WouterBanckenACA/aries",
"path": "jndi/jndi-api/src/main/java/org/osgi/service/jndi/JNDIContextManager.java",
"license": "apache-2.0",
"size": 2544
}
|
[
"java.util.Map",
"javax.naming.Context",
"javax.naming.NamingException"
] |
import java.util.Map; import javax.naming.Context; import javax.naming.NamingException;
|
import java.util.*; import javax.naming.*;
|
[
"java.util",
"javax.naming"
] |
java.util; javax.naming;
| 1,911,986
|
public void setRuleFileCollection(
final List<String> ruleFileList) {
this._ruleFileList = ruleFileList;
}
|
void function( final List<String> ruleFileList) { this._ruleFileList = ruleFileList; }
|
/**
* Sets the value of '_ruleFileList' by setting it to the given
* Vector. No type checking is performed.
* @deprecated
*
* @param ruleFileList the Vector to set.
*/
|
Sets the value of '_ruleFileList' by setting it to the given Vector. No type checking is performed
|
setRuleFileCollection
|
{
"repo_name": "tdefilip/opennms",
"path": "opennms-correlation/drools-correlation-engine/src/main/java/org/opennms/netmgt/correlation/drools/config/RuleSet.java",
"license": "agpl-3.0",
"size": 26206
}
|
[
"java.util.List"
] |
import java.util.List;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,420,020
|
public Iterable<Entry<K, V>> localEntries(CachePeekMode... peekModes) throws CacheException;
|
Iterable<Entry<K, V>> function(CachePeekMode... peekModes) throws CacheException;
|
/**
* Allows for iteration over local cache entries.
*
* @param peekModes Peek modes.
* @return Iterable over local cache entries.
* @throws CacheException If failed.
*/
|
Allows for iteration over local cache entries
|
localEntries
|
{
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/IgniteCache.java",
"license": "apache-2.0",
"size": 77739
}
|
[
"javax.cache.CacheException",
"org.apache.ignite.cache.CachePeekMode"
] |
import javax.cache.CacheException; import org.apache.ignite.cache.CachePeekMode;
|
import javax.cache.*; import org.apache.ignite.cache.*;
|
[
"javax.cache",
"org.apache.ignite"
] |
javax.cache; org.apache.ignite;
| 2,790,961
|
public byte[][] getEndKeys() throws IOException {
return getStartEndKeys().getSecond();
}
|
byte[][] function() throws IOException { return getStartEndKeys().getSecond(); }
|
/**
* Gets the ending row key for every region in the currently open table.
* <p>
* This is mainly useful for the MapReduce integration.
* @return Array of region ending row keys
* @throws IOException if a remote or network exception occurs
*/
|
Gets the ending row key for every region in the currently open table. This is mainly useful for the MapReduce integration
|
getEndKeys
|
{
"repo_name": "intel-hadoop/hbase-rhino",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java",
"license": "apache-2.0",
"size": 66886
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 2,079,044
|
public static LocalizableDocument parse(File pFile) {
try (InputStream istream = new FileInputStream(pFile)) {
final InputSource isource = new InputSource(istream);
isource.setSystemId(pFile.getAbsolutePath());
return parse(isource);
} catch (Throwable t) {
throw Exceptions.show(t);
}
}
|
static LocalizableDocument function(File pFile) { try (InputStream istream = new FileInputStream(pFile)) { final InputSource isource = new InputSource(istream); isource.setSystemId(pFile.getAbsolutePath()); return parse(isource); } catch (Throwable t) { throw Exceptions.show(t); } }
|
/**
* Parses the given {@link File}, and returns a document
* with localization info.
* @param pFile The file, from which the parsed XML document
* is being read.
* @return A document with localization info.
*/
|
Parses the given <code>File</code>, and returns a document with localization info
|
parse
|
{
"repo_name": "jochenw/afw",
"path": "afw-core/src/main/java/com/github/jochenw/afw/core/util/LocalizableDocument.java",
"license": "apache-2.0",
"size": 8896
}
|
[
"java.io.File",
"java.io.FileInputStream",
"java.io.InputStream",
"org.xml.sax.InputSource"
] |
import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import org.xml.sax.InputSource;
|
import java.io.*; import org.xml.sax.*;
|
[
"java.io",
"org.xml.sax"
] |
java.io; org.xml.sax;
| 1,803,144
|
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<BillingPropertyInner> getAsync() {
return getWithResponseAsync()
.flatMap(
(Response<BillingPropertyInner> res) -> {
if (res.getValue() != null) {
return Mono.just(res.getValue());
} else {
return Mono.empty();
}
});
}
|
@ServiceMethod(returns = ReturnType.SINGLE) Mono<BillingPropertyInner> function() { return getWithResponseAsync() .flatMap( (Response<BillingPropertyInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { return Mono.empty(); } }); }
|
/**
* Get the billing properties for a subscription. This operation is not supported for billing accounts with
* agreement type Enterprise Agreement.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the billing properties for a subscription.
*/
|
Get the billing properties for a subscription. This operation is not supported for billing accounts with agreement type Enterprise Agreement
|
getAsync
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/BillingPropertiesClientImpl.java",
"license": "mit",
"size": 15882
}
|
[
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.billing.fluent.models.BillingPropertyInner"
] |
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.billing.fluent.models.BillingPropertyInner;
|
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.billing.fluent.models.*;
|
[
"com.azure.core",
"com.azure.resourcemanager"
] |
com.azure.core; com.azure.resourcemanager;
| 1,024,662
|
protected NodeFigure createNodeFigure() {
NodeFigure figure = createNodePlate();
figure.setLayoutManager(new StackLayout());
IFigure shape = createNodeShapeForward();
figure.add(shape);
contentPane = setupContentPane(shape);
figure_ = figure;
createNodeShapeReverse();
return figure;
}
|
NodeFigure function() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShapeForward(); figure.add(shape); contentPane = setupContentPane(shape); figure_ = figure; createNodeShapeReverse(); return figure; }
|
/**
* Creates figure for this edit part.
*
* Body of this method does not depend on settings in generation model
* so you may safely remove <i>generated</i> tag and modify it.
*
* @generated NOT
*/
|
Creates figure for this edit part. Body of this method does not depend on settings in generation model so you may safely remove generated tag and modify it
|
createNodeFigure
|
{
"repo_name": "thiliniish/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/EnrichMediatorInputConnectorEditPart.java",
"license": "apache-2.0",
"size": 9063
}
|
[
"org.eclipse.draw2d.IFigure",
"org.eclipse.draw2d.StackLayout",
"org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure"
] |
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.StackLayout; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
|
import org.eclipse.draw2d.*; import org.eclipse.gmf.runtime.gef.ui.figures.*;
|
[
"org.eclipse.draw2d",
"org.eclipse.gmf"
] |
org.eclipse.draw2d; org.eclipse.gmf;
| 1,895,945
|
@Override
public Condition[] multiple(Dataset dataset,
Instance[] instances,
int attribute,
int target) {
// (1) creates the pairing (value,class) for the uncovered examples
Pair[] candidates = new Pair[dataset.size()];
double[] frequency = new double[dataset.classLength()];
int index = 0;
double size = 0;
for (int i = 0; i < dataset.size(); i++) {
// the dynamc discretisation only considers the instances covered
// by the current rule
if (instances[i].flag == RULE_COVERED) {
double v = dataset.value(i, attribute);
if (!Double.isNaN(v)) {
Pair pair = new Pair();
pair.value = v;
pair.classValue = dataset.value(i, dataset.classIndex());
pair.weight = instances[i].weight;
candidates[index] = pair;
frequency[(int) pair.classValue] += pair.weight;
size += pair.weight;
index++;
}
}
}
if (index == 0) {
// there are no candidate threshold values
return null;
}
candidates = Arrays.copyOf(candidates, index);
Arrays.sort(candidates);
// (2) determines the best threshold value
final double minimum = IntervalBuilder.minimumCases(dataset, size);
double accuracy = 0.0;
// 0: lower interval condition
// 1: upper interval condition
Condition[] conditions = new Condition[2];
for (int i = 0; i < conditions.length; i++) {
conditions[i] = new Condition();
conditions[i].attribute = attribute;
conditions[i].relation = 0;
conditions[i].frequency = new double[dataset.classLength()];
conditions[i].length = 0;
}
double[] intervalFrequency = new double[dataset.classLength()];
double intervalSize = 0;
boolean[] evaluated = new boolean[candidates.length];
for (int i = 1; i < candidates.length; i++) {
double weight = candidates[i - 1].weight;
intervalSize += weight;
intervalFrequency[(int) candidates[i - 1].classValue] += weight;
size -= weight;
frequency[(int) candidates[i - 1].classValue] -= weight;
if (candidates[i - 1].classValue != candidates[i].classValue) {
if (candidates[i - 1].value == candidates[i].value) {
// skip backwards
double[] lowerFrequency = new double[dataset.classLength()];
System.arraycopy(intervalFrequency,
0,
lowerFrequency,
0,
lowerFrequency.length);
double lowerSize = intervalSize;
double[] upperFrequency = new double[dataset.classLength()];
System.arraycopy(frequency,
0,
upperFrequency,
0,
upperFrequency.length);
double upperSize = size;
int threshold = i;
while ((threshold > 1) && (candidates[threshold
- 1].value == candidates[threshold].value)) {
weight = candidates[threshold - 1].weight;
lowerSize -= weight;
lowerFrequency[(int) candidates[threshold
- 1].classValue] -= weight;
upperSize += weight;
upperFrequency[(int) candidates[threshold
- 1].classValue] += weight;
threshold--;
}
if (!evaluated[threshold - 1]
&& (lowerSize + PRECISION_10 >= minimum)
&& (upperSize + PRECISION_10 >= minimum)) {
evaluated[threshold - 1] = true;
accuracy = computeAccuracy(accuracy,
target,
dataset.classLength(),
threshold,
candidates,
conditions,
lowerFrequency,
lowerSize,
upperFrequency,
upperSize);
}
// skip forward
System.arraycopy(intervalFrequency,
0,
lowerFrequency,
0,
lowerFrequency.length);
lowerSize = intervalSize;
System.arraycopy(frequency,
0,
upperFrequency,
0,
upperFrequency.length);
upperSize = size;
threshold = i;
while ((threshold < candidates.length)
&& (candidates[threshold
- 1].value == candidates[threshold].value)) {
threshold++;
weight = candidates[threshold - 1].weight;
lowerSize += weight;
lowerFrequency[(int) candidates[threshold
- 1].classValue] += weight;
upperSize -= weight;
upperFrequency[(int) candidates[threshold
- 1].classValue] -= weight;
}
if (!evaluated[threshold - 1]
&& (lowerSize + PRECISION_10 >= minimum)
&& (upperSize + PRECISION_10 >= minimum)) {
evaluated[threshold - 1] = true;
accuracy = computeAccuracy(accuracy,
target,
dataset.classLength(),
threshold,
candidates,
conditions,
lowerFrequency,
lowerSize,
upperFrequency,
upperSize);
}
}
// the boundary point falls between two different values
else if (!evaluated[i - 1]
&& (intervalSize + PRECISION_10 >= minimum)
&& (size + PRECISION_10 >= minimum)) {
evaluated[i - 1] = true;
accuracy = computeAccuracy(accuracy,
target,
dataset.classLength(),
i,
candidates,
conditions,
intervalFrequency,
intervalSize,
frequency,
size);
}
}
}
if (conditions[0].relation == 0) {
// a condition could not be created
return null;
}
return conditions;
}
|
Condition[] function(Dataset dataset, Instance[] instances, int attribute, int target) { Pair[] candidates = new Pair[dataset.size()]; double[] frequency = new double[dataset.classLength()]; int index = 0; double size = 0; for (int i = 0; i < dataset.size(); i++) { if (instances[i].flag == RULE_COVERED) { double v = dataset.value(i, attribute); if (!Double.isNaN(v)) { Pair pair = new Pair(); pair.value = v; pair.classValue = dataset.value(i, dataset.classIndex()); pair.weight = instances[i].weight; candidates[index] = pair; frequency[(int) pair.classValue] += pair.weight; size += pair.weight; index++; } } } if (index == 0) { return null; } candidates = Arrays.copyOf(candidates, index); Arrays.sort(candidates); final double minimum = IntervalBuilder.minimumCases(dataset, size); double accuracy = 0.0; Condition[] conditions = new Condition[2]; for (int i = 0; i < conditions.length; i++) { conditions[i] = new Condition(); conditions[i].attribute = attribute; conditions[i].relation = 0; conditions[i].frequency = new double[dataset.classLength()]; conditions[i].length = 0; } double[] intervalFrequency = new double[dataset.classLength()]; double intervalSize = 0; boolean[] evaluated = new boolean[candidates.length]; for (int i = 1; i < candidates.length; i++) { double weight = candidates[i - 1].weight; intervalSize += weight; intervalFrequency[(int) candidates[i - 1].classValue] += weight; size -= weight; frequency[(int) candidates[i - 1].classValue] -= weight; if (candidates[i - 1].classValue != candidates[i].classValue) { if (candidates[i - 1].value == candidates[i].value) { double[] lowerFrequency = new double[dataset.classLength()]; System.arraycopy(intervalFrequency, 0, lowerFrequency, 0, lowerFrequency.length); double lowerSize = intervalSize; double[] upperFrequency = new double[dataset.classLength()]; System.arraycopy(frequency, 0, upperFrequency, 0, upperFrequency.length); double upperSize = size; int threshold = i; while ((threshold > 1) && (candidates[threshold - 1].value == candidates[threshold].value)) { weight = candidates[threshold - 1].weight; lowerSize -= weight; lowerFrequency[(int) candidates[threshold - 1].classValue] -= weight; upperSize += weight; upperFrequency[(int) candidates[threshold - 1].classValue] += weight; threshold--; } if (!evaluated[threshold - 1] && (lowerSize + PRECISION_10 >= minimum) && (upperSize + PRECISION_10 >= minimum)) { evaluated[threshold - 1] = true; accuracy = computeAccuracy(accuracy, target, dataset.classLength(), threshold, candidates, conditions, lowerFrequency, lowerSize, upperFrequency, upperSize); } System.arraycopy(intervalFrequency, 0, lowerFrequency, 0, lowerFrequency.length); lowerSize = intervalSize; System.arraycopy(frequency, 0, upperFrequency, 0, upperFrequency.length); upperSize = size; threshold = i; while ((threshold < candidates.length) && (candidates[threshold - 1].value == candidates[threshold].value)) { threshold++; weight = candidates[threshold - 1].weight; lowerSize += weight; lowerFrequency[(int) candidates[threshold - 1].classValue] += weight; upperSize -= weight; upperFrequency[(int) candidates[threshold - 1].classValue] -= weight; } if (!evaluated[threshold - 1] && (lowerSize + PRECISION_10 >= minimum) && (upperSize + PRECISION_10 >= minimum)) { evaluated[threshold - 1] = true; accuracy = computeAccuracy(accuracy, target, dataset.classLength(), threshold, candidates, conditions, lowerFrequency, lowerSize, upperFrequency, upperSize); } } else if (!evaluated[i - 1] && (intervalSize + PRECISION_10 >= minimum) && (size + PRECISION_10 >= minimum)) { evaluated[i - 1] = true; accuracy = computeAccuracy(accuracy, target, dataset.classLength(), i, candidates, conditions, intervalFrequency, intervalSize, frequency, size); } } } if (conditions[0].relation == 0) { return null; } return conditions; }
|
/**
* Returns attribute conditions representing the discrete intervals for the
* specified attribute that have provide the higher Laplace accuracy.
*
* @param dataset
* the current dataset.
* @param instances
* the covered instances flags.
* @param attribute
* the index of the continuous attribute.
*
* @return attribute conditions representing discrete intervals for the
* specified attribute.
*/
|
Returns attribute conditions representing the discrete intervals for the specified attribute that have provide the higher Laplace accuracy
|
multiple
|
{
"repo_name": "febo/myra",
"path": "src/main/java/myra/classification/rule/unordered/attribute/BoundaryLaplaceSplit.java",
"license": "apache-2.0",
"size": 14109
}
|
[
"java.util.Arrays"
] |
import java.util.Arrays;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 464,009
|
protected synchronized void mergeFieldTypesFromZk(Document document, XPath xpath)
throws XPathExpressionException
{
Map<String, FieldType> newFieldTypes = new HashMap<String, FieldType>();
FieldTypePluginLoader typeLoader = new FieldTypePluginLoader(this, newFieldTypes, schemaAware);
String expression = getFieldTypeXPathExpressions();
NodeList nodes = (NodeList) xpath.evaluate(expression, document, XPathConstants.NODESET);
typeLoader.load(loader, nodes);
for (String newTypeName : newFieldTypes.keySet())
fieldTypes.put(newTypeName, newFieldTypes.get(newTypeName));
}
|
synchronized void function(Document document, XPath xpath) throws XPathExpressionException { Map<String, FieldType> newFieldTypes = new HashMap<String, FieldType>(); FieldTypePluginLoader typeLoader = new FieldTypePluginLoader(this, newFieldTypes, schemaAware); String expression = getFieldTypeXPathExpressions(); NodeList nodes = (NodeList) xpath.evaluate(expression, document, XPathConstants.NODESET); typeLoader.load(loader, nodes); for (String newTypeName : newFieldTypes.keySet()) fieldTypes.put(newTypeName, newFieldTypes.get(newTypeName)); }
|
/**
* Loads FieldType objects defined in the schema.xml document.
*
* @param document Schema XML document where field types are defined.
* @param xpath Used for evaluating xpath expressions to find field types defined in the schema.xml.
* @throws javax.xml.xpath.XPathExpressionException if an error occurs when finding field type elements in the document.
*/
|
Loads FieldType objects defined in the schema.xml document
|
mergeFieldTypesFromZk
|
{
"repo_name": "cscorley/solr-only-mirror",
"path": "core/src/java/org/apache/solr/schema/ManagedIndexSchema.java",
"license": "apache-2.0",
"size": 35964
}
|
[
"java.util.HashMap",
"java.util.Map",
"javax.xml.xpath.XPath",
"javax.xml.xpath.XPathConstants",
"javax.xml.xpath.XPathExpressionException",
"org.w3c.dom.Document",
"org.w3c.dom.NodeList"
] |
import java.util.HashMap; import java.util.Map; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import org.w3c.dom.Document; import org.w3c.dom.NodeList;
|
import java.util.*; import javax.xml.xpath.*; import org.w3c.dom.*;
|
[
"java.util",
"javax.xml",
"org.w3c.dom"
] |
java.util; javax.xml; org.w3c.dom;
| 2,230,981
|
@SuppressWarnings("try")
public synchronized InstalledCode getCode(final Backend backend) {
if (code == null) {
try (Scope d = Debug.sandbox("CompilingStub", DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) {
final StructuredGraph graph = getGraph();
// Stubs cannot be recompiled so they cannot be compiled with assumptions
assert graph.getAssumptions() == null;
if (!(graph.start() instanceof StubStartNode)) {
StubStartNode newStart = graph.add(new StubStartNode(Stub.this));
newStart.setStateAfter(graph.start().stateAfter());
graph.replaceFixed(graph.start(), newStart);
}
CodeCacheProvider codeCache = providers.getCodeCache();
compResult = new CompilationResult(toString());
try (Scope s0 = Debug.scope("StubCompilation", graph, providers.getCodeCache())) {
Suites defaultSuites = providers.getSuites().getDefaultSuites();
Suites suites = new Suites(new PhaseSuite<>(), defaultSuites.getMidTier(), defaultSuites.getLowTier());
emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites);
LIRSuites lirSuites = createLIRSuites();
emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites);
assert checkStubInvariants();
} catch (Throwable e) {
throw Debug.handle(e);
}
assert destroyedCallerRegisters != null;
try (Scope s = Debug.scope("CodeInstall")) {
HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(null, null, compResult);
code = codeCache.installCode(null, compiledCode, null, null, false);
} catch (Throwable e) {
throw Debug.handle(e);
}
} catch (Throwable e) {
throw Debug.handle(e);
}
assert code != null : "error installing stub " + this;
}
return code;
}
|
@SuppressWarnings("try") synchronized InstalledCode function(final Backend backend) { if (code == null) { try (Scope d = Debug.sandbox(STR, DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) { final StructuredGraph graph = getGraph(); assert graph.getAssumptions() == null; if (!(graph.start() instanceof StubStartNode)) { StubStartNode newStart = graph.add(new StubStartNode(Stub.this)); newStart.setStateAfter(graph.start().stateAfter()); graph.replaceFixed(graph.start(), newStart); } CodeCacheProvider codeCache = providers.getCodeCache(); compResult = new CompilationResult(toString()); try (Scope s0 = Debug.scope(STR, graph, providers.getCodeCache())) { Suites defaultSuites = providers.getSuites().getDefaultSuites(); Suites suites = new Suites(new PhaseSuite<>(), defaultSuites.getMidTier(), defaultSuites.getLowTier()); emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites); LIRSuites lirSuites = createLIRSuites(); emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites); assert checkStubInvariants(); } catch (Throwable e) { throw Debug.handle(e); } assert destroyedCallerRegisters != null; try (Scope s = Debug.scope(STR)) { HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(null, null, compResult); code = codeCache.installCode(null, compiledCode, null, null, false); } catch (Throwable e) { throw Debug.handle(e); } } catch (Throwable e) { throw Debug.handle(e); } assert code != null : STR + this; } return code; }
|
/**
* Gets the code for this stub, compiling it first if necessary.
*/
|
Gets the code for this stub, compiling it first if necessary
|
getCode
|
{
"repo_name": "rschatz/graal-core",
"path": "graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java",
"license": "gpl-2.0",
"size": 10981
}
|
[
"com.oracle.graal.code.CompilationResult",
"com.oracle.graal.compiler.GraalCompiler",
"com.oracle.graal.compiler.target.Backend",
"com.oracle.graal.debug.Debug",
"com.oracle.graal.debug.internal.DebugScope",
"com.oracle.graal.hotspot.HotSpotCompiledCodeBuilder",
"com.oracle.graal.hotspot.nodes.StubStartNode",
"com.oracle.graal.lir.asm.CompilationResultBuilderFactory",
"com.oracle.graal.lir.phases.LIRSuites",
"com.oracle.graal.nodes.StructuredGraph",
"com.oracle.graal.phases.OptimisticOptimizations",
"com.oracle.graal.phases.PhaseSuite",
"com.oracle.graal.phases.tiers.Suites"
] |
import com.oracle.graal.code.CompilationResult; import com.oracle.graal.compiler.GraalCompiler; import com.oracle.graal.compiler.target.Backend; import com.oracle.graal.debug.Debug; import com.oracle.graal.debug.internal.DebugScope; import com.oracle.graal.hotspot.HotSpotCompiledCodeBuilder; import com.oracle.graal.hotspot.nodes.StubStartNode; import com.oracle.graal.lir.asm.CompilationResultBuilderFactory; import com.oracle.graal.lir.phases.LIRSuites; import com.oracle.graal.nodes.StructuredGraph; import com.oracle.graal.phases.OptimisticOptimizations; import com.oracle.graal.phases.PhaseSuite; import com.oracle.graal.phases.tiers.Suites;
|
import com.oracle.graal.code.*; import com.oracle.graal.compiler.*; import com.oracle.graal.compiler.target.*; import com.oracle.graal.debug.*; import com.oracle.graal.debug.internal.*; import com.oracle.graal.hotspot.*; import com.oracle.graal.hotspot.nodes.*; import com.oracle.graal.lir.asm.*; import com.oracle.graal.lir.phases.*; import com.oracle.graal.nodes.*; import com.oracle.graal.phases.*; import com.oracle.graal.phases.tiers.*;
|
[
"com.oracle.graal"
] |
com.oracle.graal;
| 1,979,570
|
protected void start(String[] args) throws Exception
{
log.info("Starting " + JAGORNET_DHCP_SERVER);
log.info(Version.getVersion());
log.info("Arguments: " + Arrays.toString(args));
int cores = Runtime.getRuntime().availableProcessors();
log.info("Number of available core processors: " + cores);
|
void function(String[] args) throws Exception { log.info(STR + JAGORNET_DHCP_SERVER); log.info(Version.getVersion()); log.info(STR + Arrays.toString(args)); int cores = Runtime.getRuntime().availableProcessors(); log.info(STR + cores);
|
/**
* Start the DHCPv6 server. If multicast network interfaces have
* been supplied on startup, then start a NetDhcpServer thread
* on each of those interfaces. Start one NioDhcpServer thread
* which will listen on all IPv6 interfaces on the local host.
*
* @throws Exception the exception
*/
|
Start the DHCPv6 server. If multicast network interfaces have been supplied on startup, then start a NetDhcpServer thread on each of those interfaces. Start one NioDhcpServer thread which will listen on all IPv6 interfaces on the local host
|
start
|
{
"repo_name": "jagornet/dhcp",
"path": "Jagornet-DHCP/dhcp-server/src/main/java/com/jagornet/dhcp/server/JagornetDhcpServer.java",
"license": "gpl-3.0",
"size": 41968
}
|
[
"java.util.Arrays"
] |
import java.util.Arrays;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 451,787
|
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
return new PropertySourcesPlaceholderConfigurer();
}
|
static PropertySourcesPlaceholderConfigurer function() { return new PropertySourcesPlaceholderConfigurer(); }
|
/**
* This lets the "@Value" fields reference properties from the properties file
*/
|
This lets the "@Value" fields reference properties from the properties file
|
propertySourcesPlaceholderConfigurer
|
{
"repo_name": "jamesagnew/hapi-fhir",
"path": "hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/config/TestDstu3Config.java",
"license": "apache-2.0",
"size": 6256
}
|
[
"org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
] |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
import org.springframework.context.support.*;
|
[
"org.springframework.context"
] |
org.springframework.context;
| 1,486,731
|
private static void logHistogramByGesture(boolean wasPanelSeen, boolean wasTap,
String histogramName) {
RecordHistogram.recordEnumeratedHistogram(histogramName,
getPanelSeenByGestureStateCode(wasPanelSeen, wasTap),
RESULTS_BY_GESTURE_BOUNDARY);
}
|
static void function(boolean wasPanelSeen, boolean wasTap, String histogramName) { RecordHistogram.recordEnumeratedHistogram(histogramName, getPanelSeenByGestureStateCode(wasPanelSeen, wasTap), RESULTS_BY_GESTURE_BOUNDARY); }
|
/**
* Logs to a seen-by-gesture histogram of the given name.
* @param wasPanelSeen Whether the panel was seen.
* @param wasTap Whether the gesture that originally caused the panel to show was a Tap.
* @param histogramName The full name of the histogram to log to.
*/
|
Logs to a seen-by-gesture histogram of the given name
|
logHistogramByGesture
|
{
"repo_name": "SaschaMester/delicium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java",
"license": "bsd-3-clause",
"size": 41852
}
|
[
"org.chromium.base.metrics.RecordHistogram"
] |
import org.chromium.base.metrics.RecordHistogram;
|
import org.chromium.base.metrics.*;
|
[
"org.chromium.base"
] |
org.chromium.base;
| 1,566,468
|
Keyword entityToKeyword(KeywordEntity entity);
|
Keyword entityToKeyword(KeywordEntity entity);
|
/**
* This is not API for front end, it should be used only by other services.
* <p>
* Converts entity to keyword.
*
* @param entity (NotNull) Entity to convert.
* @return (NotNull) Converted Keyword.
*/
|
This is not API for front end, it should be used only by other services. Converts entity to keyword
|
entityToKeyword
|
{
"repo_name": "TomasRejent/WhatToEat",
"path": "src/main/java/cz/afrosoft/whattoeat/core/logic/service/KeywordService.java",
"license": "mit",
"size": 2328
}
|
[
"cz.afrosoft.whattoeat.core.data.entity.KeywordEntity",
"cz.afrosoft.whattoeat.core.logic.model.Keyword"
] |
import cz.afrosoft.whattoeat.core.data.entity.KeywordEntity; import cz.afrosoft.whattoeat.core.logic.model.Keyword;
|
import cz.afrosoft.whattoeat.core.data.entity.*; import cz.afrosoft.whattoeat.core.logic.model.*;
|
[
"cz.afrosoft.whattoeat"
] |
cz.afrosoft.whattoeat;
| 2,399,726
|
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
|
void function(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); }
|
/**
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
This removes a listener.
|
removeListener
|
{
"repo_name": "tht-krisztian/EMF-IncQuery-Examples",
"path": "query-driven-soft-interconnections/derivedModels.edit/src/operation/provider/OperationItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 8739
}
|
[
"org.eclipse.emf.edit.provider.INotifyChangedListener"
] |
import org.eclipse.emf.edit.provider.INotifyChangedListener;
|
import org.eclipse.emf.edit.provider.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 1,255,933
|
public FsStatus getStatus() throws IOException {
return getStatus(null);
}
|
FsStatus function() throws IOException { return getStatus(null); }
|
/**
* Returns a status object describing the use and capacity of the
* file system. If the file system has multiple partitions, the
* use and capacity of the root partition is reflected.
*
* @return a FsStatus object
* @throws IOException
* see specific implementation
*/
|
Returns a status object describing the use and capacity of the file system. If the file system has multiple partitions, the use and capacity of the root partition is reflected
|
getStatus
|
{
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java",
"license": "mit",
"size": 110020
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 1,934,270
|
private final void consumeExpected(String expected)
throws javax.xml.transform.TransformerException
{
if (tokenIs(expected))
{
nextToken();
}
else
{
error(XPATHErrorResources.ER_EXPECTED_BUT_FOUND, new Object[]{ expected,
m_token }); //"Expected "+expected+", but found: "+m_token);
// Patch for Christina's gripe. She wants her errorHandler to return from
// this error and continue trying to parse, rather than throwing an exception.
// Without the patch, that put us into an endless loop.
throw new XPathProcessorException(CONTINUE_AFTER_FATAL_ERROR);
}
}
|
final void function(String expected) throws javax.xml.transform.TransformerException { if (tokenIs(expected)) { nextToken(); } else { error(XPATHErrorResources.ER_EXPECTED_BUT_FOUND, new Object[]{ expected, m_token }); throw new XPathProcessorException(CONTINUE_AFTER_FATAL_ERROR); } }
|
/**
* Consume an expected token, throwing an exception if it
* isn't there.
*
* @param expected The string to be expected.
*
* @throws javax.xml.transform.TransformerException
*/
|
Consume an expected token, throwing an exception if it isn't there
|
consumeExpected
|
{
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xpath/internal/compiler/XPathParser.java",
"license": "apache-2.0",
"size": 63995
}
|
[
"com.sun.org.apache.xpath.internal.XPathProcessorException",
"com.sun.org.apache.xpath.internal.res.XPATHErrorResources",
"javax.xml.transform.TransformerException"
] |
import com.sun.org.apache.xpath.internal.XPathProcessorException; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; import javax.xml.transform.TransformerException;
|
import com.sun.org.apache.xpath.internal.*; import com.sun.org.apache.xpath.internal.res.*; import javax.xml.transform.*;
|
[
"com.sun.org",
"javax.xml"
] |
com.sun.org; javax.xml;
| 6,692
|
public void showUnlocked(){
ButtonType ok = new ButtonType("Ok", ButtonBar.ButtonData.OK_DONE);
Alert doorLocked = new Alert(Alert.AlertType.INFORMATION, "", ok);
doorLocked.setTitle("Door");
doorLocked.setHeaderText("The door is now unlocked");
Optional<ButtonType> result = doorLocked.showAndWait();
}
|
void function(){ ButtonType ok = new ButtonType("Ok", ButtonBar.ButtonData.OK_DONE); Alert doorLocked = new Alert(Alert.AlertType.INFORMATION, STRDoorSTRThe door is now unlocked"); Optional<ButtonType> result = doorLocked.showAndWait(); }
|
/**
* Creates an alert box for when you unlock a door
*/
|
Creates an alert box for when you unlock a door
|
showUnlocked
|
{
"repo_name": "kvartborg/1-semesterprojekt",
"path": "src/gui/controllers/SearchController.java",
"license": "mit",
"size": 2994
}
|
[
"java.util.Optional"
] |
import java.util.Optional;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,197,655
|
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
{
if (stack.hasTagCompound())
{
NBTTagCompound tag = stack.getTagCompound();
String size = tag.getString("size");
if (size != null)
{
tooltip.add(TextFormatting.GRAY + "Size: " + size);
}
}
}
public static enum FishType
{
FRESHWATER_COD(0, "freshwater_cod", 90, 10, 2, 0),
SOCKEYE_SALMON(1, "sockeye_salmon", 74, 10, 2, 0),
JELLYFISH(2, "jellyfish", 22.5, 17, 0, 0),
PUFFERFISH(3, "pufferfish", 57, 10, 1, 0),
CLOWNFISH(4, "clownfish", 8, 3, 1, 0),
SUNFISH(5, "sunfish", 450, 20, 4, 0),
ANGLER(6, "angler", 70, 30, 1, 0),
FROG(7, "frog", 8, 2, 0, 0),
ELECTRIC_EEL(8, "electric_eel", 170, 30, 2, 0),
PUPFISH(9, "pupfish", 9, 2, 1, 0),
ARCTIC_CHAR(10, "arctic_char", 90, 13, 1, 0),
PIRANHA(11, "piranha", 20, 6, 1, 0),
TURTLE(12, "turtle", 16, 7, 0, 0),
STINGRAY(13, "stingray", 30, 10, 0, 0),
SALAMANDER(14, "salamander", 200, 66, 0, 0),
GOLDFISH(15, "goldfish", 6, 20, 0, 0),
BLOBFISH(16, "blobfish", 33, 13, 1, 0),
RAINBOW_TROUT(17, "rainbow_trout", 20, 11, 1, 0);
private static final Map<Integer, ItemFish.FishType> META_LOOKUP = Maps.<Integer, ItemFish.FishType>newHashMap();
private final int meta;
private final String unlocalizedName;
private final double averageSize; // standard fish size lore that random value is based around, should vary between fish. based on real life cm.
private final double sizeVariance;
private final int foodAmount; // how much raw_fish crafts from this
private final int baitMeta; // which bug bait is used to attract this fish
private FishType(int meta, String unlocalizedName, double averageSize, double sizeVariance, int foodAmount, int baitMeta)
{
this.meta = meta;
this.unlocalizedName = unlocalizedName;
this.averageSize = averageSize;
this.sizeVariance = sizeVariance;
this.foodAmount = foodAmount;
this.baitMeta = baitMeta;
}
|
@SideOnly(Side.CLIENT) void function(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) { if (stack.hasTagCompound()) { NBTTagCompound tag = stack.getTagCompound(); String size = tag.getString("size"); if (size != null) { tooltip.add(TextFormatting.GRAY + STR + size); } } } public static enum FishType { FRESHWATER_COD(0, STR, 90, 10, 2, 0), SOCKEYE_SALMON(1, STR, 74, 10, 2, 0), JELLYFISH(2, STR, 22.5, 17, 0, 0), PUFFERFISH(3, STR, 57, 10, 1, 0), CLOWNFISH(4, STR, 8, 3, 1, 0), SUNFISH(5, STR, 450, 20, 4, 0), ANGLER(6, STR, 70, 30, 1, 0), FROG(7, "frog", 8, 2, 0, 0), ELECTRIC_EEL(8, STR, 170, 30, 2, 0), PUPFISH(9, STR, 9, 2, 1, 0), ARCTIC_CHAR(10, STR, 90, 13, 1, 0), PIRANHA(11, STR, 20, 6, 1, 0), TURTLE(12, STR, 16, 7, 0, 0), STINGRAY(13, STR, 30, 10, 0, 0), SALAMANDER(14, STR, 200, 66, 0, 0), GOLDFISH(15, STR, 6, 20, 0, 0), BLOBFISH(16, STR, 33, 13, 1, 0), RAINBOW_TROUT(17, STR, 20, 11, 1, 0); private static final Map<Integer, ItemFish.FishType> META_LOOKUP = Maps.<Integer, ItemFish.FishType>newHashMap(); private final int meta; private final String unlocalizedName; private final double averageSize; private final double sizeVariance; private final int foodAmount; private final int baitMeta; private FishType(int meta, String unlocalizedName, double averageSize, double sizeVariance, int foodAmount, int baitMeta) { this.meta = meta; this.unlocalizedName = unlocalizedName; this.averageSize = averageSize; this.sizeVariance = sizeVariance; this.foodAmount = foodAmount; this.baitMeta = baitMeta; }
|
/**
* allows items to add custom lines of information to the mouseover description
*/
|
allows items to add custom lines of information to the mouseover description
|
addInformation
|
{
"repo_name": "epolixa/Bityard",
"path": "src/main/java/com/epolixa/bityard/item/ItemFish.java",
"license": "lgpl-2.1",
"size": 6586
}
|
[
"com.google.common.collect.Maps",
"java.util.List",
"java.util.Map",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.NBTTagCompound",
"net.minecraft.util.text.TextFormatting",
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] |
import com.google.common.collect.Maps; import java.util.List; import java.util.Map; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
|
import com.google.common.collect.*; import java.util.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.nbt.*; import net.minecraft.util.text.*; import net.minecraftforge.fml.relauncher.*;
|
[
"com.google.common",
"java.util",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.nbt",
"net.minecraft.util",
"net.minecraftforge.fml"
] |
com.google.common; java.util; net.minecraft.entity; net.minecraft.item; net.minecraft.nbt; net.minecraft.util; net.minecraftforge.fml;
| 1,832,090
|
private boolean hasLinkToTbLocationMas(final EmployeeBean employee) {
if (employee.getDepid() != null) {
return true;
}
return false;
}
|
boolean function(final EmployeeBean employee) { if (employee.getDepid() != null) { return true; } return false; }
|
/**
* Verify that TbLocationMas id is valid.
* @param TbLocationMas TbLocationMas
* @return boolean
*/
|
Verify that TbLocationMas id is valid
|
hasLinkToTbLocationMas
|
{
"repo_name": "abmindiarepomanager/ABMOpenMainet",
"path": "Mainet1.1/MainetServiceParent/MainetServiceCommon/src/main/java/com/abm/mainet/common/master/mapper/EmployeeServiceMapper.java",
"license": "gpl-3.0",
"size": 7889
}
|
[
"com.abm.mainet.common.master.dto.EmployeeBean"
] |
import com.abm.mainet.common.master.dto.EmployeeBean;
|
import com.abm.mainet.common.master.dto.*;
|
[
"com.abm.mainet"
] |
com.abm.mainet;
| 168,251
|
private Node putInDatabase(final Feature feature, final ObjectId metadataId) {
checkNotNull(feature);
checkNotNull(metadataId);
final RevFeature newFeature = new RevFeatureBuilder().build(feature);
final ObjectId objectId = newFeature.getId();
final Envelope bounds = (ReferencedEnvelope) feature.getBounds();
final String nodeName = feature.getIdentifier().getID();
indexDatabase.put(newFeature);
Node newObject = Node.create(nodeName, objectId, metadataId, TYPE.FEATURE, bounds);
return newObject;
}
|
Node function(final Feature feature, final ObjectId metadataId) { checkNotNull(feature); checkNotNull(metadataId); final RevFeature newFeature = new RevFeatureBuilder().build(feature); final ObjectId objectId = newFeature.getId(); final Envelope bounds = (ReferencedEnvelope) feature.getBounds(); final String nodeName = feature.getIdentifier().getID(); indexDatabase.put(newFeature); Node newObject = Node.create(nodeName, objectId, metadataId, TYPE.FEATURE, bounds); return newObject; }
|
/**
* Adds a single feature to the staging database.
*
* @param feature the feature to add
* @param metadataId
* @return the Node for the inserted feature
*/
|
Adds a single feature to the staging database
|
putInDatabase
|
{
"repo_name": "rouault/GeoGit",
"path": "src/core/src/main/java/org/geogit/repository/WorkingTree.java",
"license": "bsd-3-clause",
"size": 27765
}
|
[
"com.google.common.base.Preconditions",
"com.vividsolutions.jts.geom.Envelope",
"org.geogit.api.Node",
"org.geogit.api.ObjectId",
"org.geogit.api.RevFeature",
"org.geogit.api.RevFeatureBuilder",
"org.geotools.geometry.jts.ReferencedEnvelope",
"org.opengis.feature.Feature"
] |
import com.google.common.base.Preconditions; import com.vividsolutions.jts.geom.Envelope; import org.geogit.api.Node; import org.geogit.api.ObjectId; import org.geogit.api.RevFeature; import org.geogit.api.RevFeatureBuilder; import org.geotools.geometry.jts.ReferencedEnvelope; import org.opengis.feature.Feature;
|
import com.google.common.base.*; import com.vividsolutions.jts.geom.*; import org.geogit.api.*; import org.geotools.geometry.jts.*; import org.opengis.feature.*;
|
[
"com.google.common",
"com.vividsolutions.jts",
"org.geogit.api",
"org.geotools.geometry",
"org.opengis.feature"
] |
com.google.common; com.vividsolutions.jts; org.geogit.api; org.geotools.geometry; org.opengis.feature;
| 1,745,133
|
private void enqueueRequest(HttpServletRequest request) {
HttpSession session = request.getSession();
// Put this request in the queue, replacing whoever was there before
session.setAttribute(REQUEST_QUEUE, request);
// if another request was waiting, notify it so it can discover that
// it was replaced
getSynchronizationObject(session).notify();
}
|
void function(HttpServletRequest request) { HttpSession session = request.getSession(); session.setAttribute(REQUEST_QUEUE, request); getSynchronizationObject(session).notify(); }
|
/**
* Put a new request in the queue. This new request will replace any other
* requests that were waiting.
*
* @param request
* The request to queue
*/
|
Put a new request in the queue. This new request will replace any other requests that were waiting
|
enqueueRequest
|
{
"repo_name": "idega/com.idega.core",
"path": "src/java/com/idega/servlet/filter/RequestControlFilter.java",
"license": "gpl-3.0",
"size": 11996
}
|
[
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession"
] |
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession;
|
import javax.servlet.http.*;
|
[
"javax.servlet"
] |
javax.servlet;
| 24,676
|
public static void getProperties(Properties properties, String className) {
try {
ResourceBundle source = ResourceBundle.getBundle(className);
if (source != null) {
Enumeration<String> keys = source.getKeys();
while (keys.hasMoreElements()) {
String key = keys.nextElement();
properties.put(key, source.getString(key));
}
}
} catch (MissingResourceException e) {
//in case no properties for class found, ignore
//it's not exactly that class should have property file
}
}
|
static void function(Properties properties, String className) { try { ResourceBundle source = ResourceBundle.getBundle(className); if (source != null) { Enumeration<String> keys = source.getKeys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); properties.put(key, source.getString(key)); } } } catch (MissingResourceException e) { } }
|
/**
* Get properties from file
* @param properties - properties object
* @param className - file with properties className.properties
*/
|
Get properties from file
|
getProperties
|
{
"repo_name": "satheeshjogi/learning",
"path": "gga-selenium-framework-logging/src/main/java/com/ggasoftware/uitest/utils/PropertyReader.java",
"license": "gpl-3.0",
"size": 1766
}
|
[
"java.util.Enumeration",
"java.util.MissingResourceException",
"java.util.Properties",
"java.util.ResourceBundle"
] |
import java.util.Enumeration; import java.util.MissingResourceException; import java.util.Properties; import java.util.ResourceBundle;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,233,458
|
public Field<T> getField() {
return knots[0].getField();
}
|
Field<T> function() { return knots[0].getField(); }
|
/** Get the {@link Field} to which the instance belongs.
* @return {@link Field} to which the instance belongs
*/
|
Get the <code>Field</code> to which the instance belongs
|
getField
|
{
"repo_name": "sdinot/hipparchus",
"path": "hipparchus-core/src/main/java/org/hipparchus/analysis/polynomials/FieldPolynomialSplineFunction.java",
"license": "apache-2.0",
"size": 9208
}
|
[
"org.hipparchus.Field"
] |
import org.hipparchus.Field;
|
import org.hipparchus.*;
|
[
"org.hipparchus"
] |
org.hipparchus;
| 1,699,136
|
private void initialize() {
frame = new JFrame();
frame.setTitle("MOOC Student Application");
Dimension dim = frame.getToolkit().getScreenSize();
frame.setMinimumSize(new Dimension(dim.width / 2, dim.height / 2));
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
frame.setJMenuBar(menuBar);
JMenu mnStudent = new JMenu("Student");
menuBar.add(mnStudent);
|
void function() { frame = new JFrame(); frame.setTitle(STR); Dimension dim = frame.getToolkit().getScreenSize(); frame.setMinimumSize(new Dimension(dim.width / 2, dim.height / 2)); frame.setExtendedState(JFrame.MAXIMIZED_BOTH); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JMenuBar menuBar = new JMenuBar(); frame.setJMenuBar(menuBar); JMenu mnStudent = new JMenu(STR); menuBar.add(mnStudent);
|
/**
* Initialize the contents of the frame.
*/
|
Initialize the contents of the frame
|
initialize
|
{
"repo_name": "pdev-mooc/mooc",
"path": "mooc-gui/src/main/java/com/mooc/gui/student/StudentMainApplication.java",
"license": "mit",
"size": 2037
}
|
[
"java.awt.Dimension",
"javax.swing.JFrame",
"javax.swing.JMenu",
"javax.swing.JMenuBar"
] |
import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar;
|
import java.awt.*; import javax.swing.*;
|
[
"java.awt",
"javax.swing"
] |
java.awt; javax.swing;
| 2,749,985
|
public HTable createTable(TableName tableName, byte[][] families,
int numVersions, int blockSize) throws IOException {
HTableDescriptor desc = new HTableDescriptor(tableName);
for (byte[] family : families) {
HColumnDescriptor hcd = new HColumnDescriptor(family)
.setMaxVersions(numVersions)
.setBlocksize(blockSize);
desc.addFamily(hcd);
}
getHBaseAdmin().createTable(desc);
// HBaseAdmin only waits for regions to appear in hbase:meta we should wait until they are assigned
waitUntilAllRegionsAssigned(tableName);
return (HTable) getConnection().getTable(tableName);
}
|
HTable function(TableName tableName, byte[][] families, int numVersions, int blockSize) throws IOException { HTableDescriptor desc = new HTableDescriptor(tableName); for (byte[] family : families) { HColumnDescriptor hcd = new HColumnDescriptor(family) .setMaxVersions(numVersions) .setBlocksize(blockSize); desc.addFamily(hcd); } getHBaseAdmin().createTable(desc); waitUntilAllRegionsAssigned(tableName); return (HTable) getConnection().getTable(tableName); }
|
/**
* Create a table.
* @param tableName
* @param families
* @param numVersions
* @param blockSize
* @return An HTable instance for the created table.
* @throws IOException
*/
|
Create a table
|
createTable
|
{
"repo_name": "joshelser/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 143118
}
|
[
"java.io.IOException",
"org.apache.hadoop.hbase.client.HTable"
] |
import java.io.IOException; import org.apache.hadoop.hbase.client.HTable;
|
import java.io.*; import org.apache.hadoop.hbase.client.*;
|
[
"java.io",
"org.apache.hadoop"
] |
java.io; org.apache.hadoop;
| 1,915,544
|
public ByteBuffer get(ByteBuffer buffer) {
return get(buffer.position(), buffer);
}
|
ByteBuffer function(ByteBuffer buffer) { return get(buffer.position(), buffer); }
|
/**
* Store this vector into the supplied {@link ByteBuffer} at the current
* buffer {@link ByteBuffer#position() position}.
* <p>
* This method will not increment the position of the given ByteBuffer.
* <p>
* In order to specify the offset into the ByteBuffer at which
* the vector is stored, use {@link #get(int, ByteBuffer)}, taking
* the absolute position as parameter.
*
* @param buffer
* will receive the values of this vector in <tt>x, y</tt> order
* @return the passed in buffer
* @see #get(int, ByteBuffer)
*/
|
Store this vector into the supplied <code>ByteBuffer</code> at the current buffer <code>ByteBuffer#position() position</code>. This method will not increment the position of the given ByteBuffer. In order to specify the offset into the ByteBuffer at which the vector is stored, use <code>#get(int, ByteBuffer)</code>, taking the absolute position as parameter
|
get
|
{
"repo_name": "RogueLogic/Big-Fusion",
"path": "src/main/java/org/joml/Vector2d.java",
"license": "mit",
"size": 26964
}
|
[
"java.nio.ByteBuffer"
] |
import java.nio.ByteBuffer;
|
import java.nio.*;
|
[
"java.nio"
] |
java.nio;
| 2,565,577
|
@Override
public void init(IEditorSite site, IEditorInput editorInput) {
setSite(site);
setInputWithNotify(editorInput);
setPartName(editorInput.getName());
site.setSelectionProvider(this);
site.getPage().addPartListener(partListener);
ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
}
|
void function(IEditorSite site, IEditorInput editorInput) { setSite(site); setInputWithNotify(editorInput); setPartName(editorInput.getName()); site.setSelectionProvider(this); site.getPage().addPartListener(partListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); }
|
/**
* This is called during startup.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
This is called during startup.
|
init
|
{
"repo_name": "FTSRG/mondo-collab-framework",
"path": "archive/workspaceTracker/VA/ikerlanEMF.editor/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/presentation/WTSpecEditor.java",
"license": "epl-1.0",
"size": 55795
}
|
[
"org.eclipse.core.resources.IResourceChangeEvent",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.ui.IEditorInput",
"org.eclipse.ui.IEditorSite"
] |
import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite;
|
import org.eclipse.core.resources.*; import org.eclipse.ui.*;
|
[
"org.eclipse.core",
"org.eclipse.ui"
] |
org.eclipse.core; org.eclipse.ui;
| 1,048,271
|
OutputStream bufferStream(final OutputStream stream, final int bufferSize) {
if (bufferSize > 0) {
return new BufferedOutputStream(stream, bufferSize);
}
return stream;
}
|
OutputStream bufferStream(final OutputStream stream, final int bufferSize) { if (bufferSize > 0) { return new BufferedOutputStream(stream, bufferSize); } return stream; }
|
/**
* Return the given stream wrapped as a {@link BufferedOutputStream} with the given buffer size
* if the buffer size is greater than 0, or return the original stream otherwise.
*/
|
Return the given stream wrapped as a <code>BufferedOutputStream</code> with the given buffer size if the buffer size is greater than 0, or return the original stream otherwise
|
bufferStream
|
{
"repo_name": "ivakegg/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java",
"license": "apache-2.0",
"size": 25646
}
|
[
"java.io.BufferedOutputStream",
"java.io.OutputStream"
] |
import java.io.BufferedOutputStream; import java.io.OutputStream;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 1,372,303
|
public Subject getSubject() {
return this.subject;
}
|
Subject function() { return this.subject; }
|
/**
* Gets the subject.
*
* @return the subject
*/
|
Gets the subject
|
getSubject
|
{
"repo_name": "vimil/waffle",
"path": "Source/JNA/waffle-shiro/src/main/java/waffle/shiro/negotiate/NegotiateToken.java",
"license": "epl-1.0",
"size": 6449
}
|
[
"javax.security.auth.Subject"
] |
import javax.security.auth.Subject;
|
import javax.security.auth.*;
|
[
"javax.security"
] |
javax.security;
| 2,637,893
|
public FeatureResultSet queryFeaturesForChunk(String[] columns,
BoundingBox boundingBox, Projection projection, String where,
String[] whereArgs, String orderBy, int limit) {
return queryFeaturesForChunk(false, columns, boundingBox, projection,
where, whereArgs, orderBy, limit);
}
|
FeatureResultSet function(String[] columns, BoundingBox boundingBox, Projection projection, String where, String[] whereArgs, String orderBy, int limit) { return queryFeaturesForChunk(false, columns, boundingBox, projection, where, whereArgs, orderBy, limit); }
|
/**
* Query for features within the bounding box in the provided projection,
* starting at the offset and returning no more than the limit
*
* @param columns
* columns
* @param boundingBox
* bounding box
* @param projection
* projection
* @param where
* where clause
* @param whereArgs
* where arguments
* @param orderBy
* order by
* @param limit
* chunk limit
* @return feature results
* @since 6.2.0
*/
|
Query for features within the bounding box in the provided projection, starting at the offset and returning no more than the limit
|
queryFeaturesForChunk
|
{
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java",
"license": "mit",
"size": 349361
}
|
[
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.features.user.FeatureResultSet",
"mil.nga.proj.Projection"
] |
import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet; import mil.nga.proj.Projection;
|
import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*;
|
[
"mil.nga.geopackage",
"mil.nga.proj"
] |
mil.nga.geopackage; mil.nga.proj;
| 1,962,626
|
public static void w(String tag, String msg, Object... args) {
if (sLevel > LEVEL_WARNING) {
return;
}
if (args.length > 0) {
msg = String.format(msg, args);
}
Log.w(tag, msg);
}
|
static void function(String tag, String msg, Object... args) { if (sLevel > LEVEL_WARNING) { return; } if (args.length > 0) { msg = String.format(msg, args); } Log.w(tag, msg); }
|
/**
* Send a WARNING log message
*
* @param tag
* @param msg
* @param args
*/
|
Send a WARNING log message
|
w
|
{
"repo_name": "JNDX25219/XiaoShangXing",
"path": "app/src/main/java/com/xiaoshangxing/utils/customView/pull_refresh/PtrCLog.java",
"license": "apache-2.0",
"size": 6161
}
|
[
"android.util.Log"
] |
import android.util.Log;
|
import android.util.*;
|
[
"android.util"
] |
android.util;
| 786,785
|
public void testNoSuchAlgorithmException08() {
NoSuchAlgorithmException tE = new NoSuchAlgorithmException(null, tCause);
if (tE.getMessage() != null) {
String toS = tCause.toString();
String getM = tE.getMessage();
assertTrue("getMessage() must should ".concat(toS), (getM
.indexOf(toS) != -1));
}
assertNotNull("getCause() must not return null", tE.getCause());
assertEquals("getCause() must return ".concat(tCause.toString()), tE
.getCause(), tCause);
}
|
void function() { NoSuchAlgorithmException tE = new NoSuchAlgorithmException(null, tCause); if (tE.getMessage() != null) { String toS = tCause.toString(); String getM = tE.getMessage(); assertTrue(STR.concat(toS), (getM .indexOf(toS) != -1)); } assertNotNull(STR, tE.getCause()); assertEquals(STR.concat(tCause.toString()), tE .getCause(), tCause); }
|
/**
* Test for <code>NoSuchAlgorithmException(String, Throwable)</code>
* constructor Assertion: constructs NoSuchAlgorithmException when
* <code>cause</code> is not null <code>msg</code> is null
*/
|
Test for <code>NoSuchAlgorithmException(String, Throwable)</code> constructor Assertion: constructs NoSuchAlgorithmException when <code>cause</code> is not null <code>msg</code> is null
|
testNoSuchAlgorithmException08
|
{
"repo_name": "JSDemos/android-sdk-20",
"path": "src/org/apache/harmony/security/tests/java/security/NoSuchAlgorithmExceptionTest.java",
"license": "apache-2.0",
"size": 7242
}
|
[
"java.security.NoSuchAlgorithmException"
] |
import java.security.NoSuchAlgorithmException;
|
import java.security.*;
|
[
"java.security"
] |
java.security;
| 1,855,033
|
@Override
public final CrossOrigin getCrossOrigin()
{
return null;
}
|
final CrossOrigin function() { return null; }
|
/**
* Unsupported for source tag
*/
|
Unsupported for source tag
|
getCrossOrigin
|
{
"repo_name": "mosoft521/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/markup/html/image/ExternalSource.java",
"license": "apache-2.0",
"size": 3146
}
|
[
"org.apache.wicket.markup.html.CrossOrigin"
] |
import org.apache.wicket.markup.html.CrossOrigin;
|
import org.apache.wicket.markup.html.*;
|
[
"org.apache.wicket"
] |
org.apache.wicket;
| 2,100,261
|
public void setEngine(ProcessingEngine engine);
|
void function(ProcessingEngine engine);
|
/**
* Called internally by COPPER during initialization
*/
|
Called internally by COPPER during initialization
|
setEngine
|
{
"repo_name": "benfortuna/copper-engine",
"path": "projects/copper-coreengine/src/main/java/org/copperengine/core/common/ProcessorPool.java",
"license": "apache-2.0",
"size": 1451
}
|
[
"org.copperengine.core.ProcessingEngine"
] |
import org.copperengine.core.ProcessingEngine;
|
import org.copperengine.core.*;
|
[
"org.copperengine.core"
] |
org.copperengine.core;
| 2,494,611
|
EClass getFieldMetaData();
|
EClass getFieldMetaData();
|
/**
* Returns the meta object for class '{@link org.fusesource.camel.component.sap.model.rfc.FieldMetaData <em>Field Meta Data</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Field Meta Data</em>'.
* @see org.fusesource.camel.component.sap.model.rfc.FieldMetaData
* @generated
*/
|
Returns the meta object for class '<code>org.fusesource.camel.component.sap.model.rfc.FieldMetaData Field Meta Data</code>'.
|
getFieldMetaData
|
{
"repo_name": "janstey/fuse",
"path": "components/camel-sap/org.fusesource.camel.component.sap.model/src/org/fusesource/camel/component/sap/model/rfc/RfcPackage.java",
"license": "apache-2.0",
"size": 158488
}
|
[
"org.eclipse.emf.ecore.EClass"
] |
import org.eclipse.emf.ecore.EClass;
|
import org.eclipse.emf.ecore.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 2,714,262
|
public void setImage(BufferedImage image) {
this.image = image;
}
|
void function(BufferedImage image) { this.image = image; }
|
/**
* Set the image
* @param image the sel_image to set
*/
|
Set the image
|
setImage
|
{
"repo_name": "eliasnogueira/selenium-java-evidence",
"path": "src/main/java/com/eliasnogueira/selenium/evidence/SeleniumEvidence.java",
"license": "gpl-3.0",
"size": 2527
}
|
[
"java.awt.image.BufferedImage"
] |
import java.awt.image.BufferedImage;
|
import java.awt.image.*;
|
[
"java.awt"
] |
java.awt;
| 585,342
|
@Nullable
public ViewHolder getRecycledView(int viewType) {
final ScrapData scrapData = mScrap.get(viewType);
if (scrapData != null && !scrapData.mScrapHeap.isEmpty()) {
final ArrayList<ViewHolder> scrapHeap = scrapData.mScrapHeap;
return scrapHeap.remove(scrapHeap.size() - 1);
}
return null;
}
|
ViewHolder function(int viewType) { final ScrapData scrapData = mScrap.get(viewType); if (scrapData != null && !scrapData.mScrapHeap.isEmpty()) { final ArrayList<ViewHolder> scrapHeap = scrapData.mScrapHeap; return scrapHeap.remove(scrapHeap.size() - 1); } return null; }
|
/**
* Acquire a ViewHolder of the specified type from the pool, or {@code null} if none are
* present.
*
* @param viewType ViewHolder type.
* @return ViewHolder of the specified type acquired from the pool, or {@code null} if none
* are present.
*/
|
Acquire a ViewHolder of the specified type from the pool, or null if none are present
|
getRecycledView
|
{
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java",
"license": "apache-2.0",
"size": 582575
}
|
[
"java.util.ArrayList"
] |
import java.util.ArrayList;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,942,951
|
public Observable<ServiceResponse<DeletedSiteInner>> getDeletedWebAppByLocationWithServiceResponseAsync(String location, String deletedSiteId) {
if (location == null) {
throw new IllegalArgumentException("Parameter location is required and cannot be null.");
}
if (deletedSiteId == null) {
throw new IllegalArgumentException("Parameter deletedSiteId is required and cannot be null.");
}
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
|
Observable<ServiceResponse<DeletedSiteInner>> function(String location, String deletedSiteId) { if (location == null) { throw new IllegalArgumentException(STR); } if (deletedSiteId == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); }
|
/**
* Get deleted app for a subscription at location.
* Get deleted app for a subscription at location.
*
* @param location the String value
* @param deletedSiteId The numeric ID of the deleted app, e.g. 12345
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DeletedSiteInner object
*/
|
Get deleted app for a subscription at location. Get deleted app for a subscription at location
|
getDeletedWebAppByLocationWithServiceResponseAsync
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DeletedWebAppsInner.java",
"license": "mit",
"size": 34501
}
|
[
"com.microsoft.rest.ServiceResponse"
] |
import com.microsoft.rest.ServiceResponse;
|
import com.microsoft.rest.*;
|
[
"com.microsoft.rest"
] |
com.microsoft.rest;
| 2,877,201
|
protected String getLabel(String typeName) {
try {
return East_adlEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
}
catch(MissingResourceException mre) {
East_adlEditorPlugin.INSTANCE.log(mre);
}
return typeName;
}
|
String function(String typeName) { try { return East_adlEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); } catch(MissingResourceException mre) { East_adlEditorPlugin.INSTANCE.log(mre); } return typeName; }
|
/**
* Returns the label for the specified type name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
|
Returns the label for the specified type name.
|
getLabel
|
{
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl.editor/src/org/obeonetwork/dsl/east_adl/variant_handling/presentation/Variant_handlingModelWizard.java",
"license": "epl-1.0",
"size": 18193
}
|
[
"java.util.MissingResourceException"
] |
import java.util.MissingResourceException;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 145,734
|
public void setOfferedCapabilities(List<Symbol> offeredCapabilities) {
if (offeredCapabilities != null) {
offeredCapabilities = Collections.emptyList();
}
this.offeredCapabilities = offeredCapabilities;
}
|
void function(List<Symbol> offeredCapabilities) { if (offeredCapabilities != null) { offeredCapabilities = Collections.emptyList(); } this.offeredCapabilities = offeredCapabilities; }
|
/**
* Sets the offered capabilities that should be used when a new connection attempt
* is made.
*
* @param offeredCapabilities
* the list of capabilities to offer when connecting.
*/
|
Sets the offered capabilities that should be used when a new connection attempt is made
|
setOfferedCapabilities
|
{
"repo_name": "chirino/activemq",
"path": "activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpClient.java",
"license": "apache-2.0",
"size": 9578
}
|
[
"java.util.Collections",
"java.util.List",
"org.apache.qpid.proton.amqp.Symbol"
] |
import java.util.Collections; import java.util.List; import org.apache.qpid.proton.amqp.Symbol;
|
import java.util.*; import org.apache.qpid.proton.amqp.*;
|
[
"java.util",
"org.apache.qpid"
] |
java.util; org.apache.qpid;
| 1,784,132
|
public List<File> getProfileBackups() {
return ((PersistenceServiceImpl) fPersistenceService).getProfileBackups();
}
|
List<File> function() { return ((PersistenceServiceImpl) fPersistenceService).getProfileBackups(); }
|
/**
* Provides a list of available backups for the user to restore from in case
* of an unrecoverable error.
*
* @return a list of available backups for the user to restore from in case of
* an unrecoverable error.
*/
|
Provides a list of available backups for the user to restore from in case of an unrecoverable error
|
getProfileBackups
|
{
"repo_name": "rssowl/RSSOwl",
"path": "org.rssowl.core/src/org/rssowl/core/internal/InternalOwl.java",
"license": "epl-1.0",
"size": 16228
}
|
[
"java.io.File",
"java.util.List",
"org.rssowl.core.internal.persist.service.PersistenceServiceImpl"
] |
import java.io.File; import java.util.List; import org.rssowl.core.internal.persist.service.PersistenceServiceImpl;
|
import java.io.*; import java.util.*; import org.rssowl.core.internal.persist.service.*;
|
[
"java.io",
"java.util",
"org.rssowl.core"
] |
java.io; java.util; org.rssowl.core;
| 2,667,486
|
public List<Person> getPersonsWithRoleByOrganisation(Integer organisationId, String roleName);
|
List<Person> function(Integer organisationId, String roleName);
|
/**
* Return a list of person from a given organization,
* that has a certain role
*
* @author Adelina
*
* @param organisationId
* @param roleName
* @return
*/
|
Return a list of person from a given organization, that has a certain role
|
getPersonsWithRoleByOrganisation
|
{
"repo_name": "CodeSphere/termitaria",
"path": "TermitariaOM/JavaSource/ro/cs/om/model/dao/IDaoPerson.java",
"license": "agpl-3.0",
"size": 11283
}
|
[
"java.util.List",
"ro.cs.om.entity.Person"
] |
import java.util.List; import ro.cs.om.entity.Person;
|
import java.util.*; import ro.cs.om.entity.*;
|
[
"java.util",
"ro.cs.om"
] |
java.util; ro.cs.om;
| 2,491,947
|
protected void paintThumb(Graphics g, JComponent c, Rectangle thumbBounds)
{
g.setColor(thumbColor);
g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width,
thumbBounds.height);
BasicGraphicsUtils.drawBezel(g, thumbBounds.x, thumbBounds.y,
thumbBounds.width, thumbBounds.height,
false, false, thumbDarkShadowColor,
thumbDarkShadowColor, thumbHighlightColor,
thumbHighlightColor);
}
|
void function(Graphics g, JComponent c, Rectangle thumbBounds) { g.setColor(thumbColor); g.fillRect(thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height); BasicGraphicsUtils.drawBezel(g, thumbBounds.x, thumbBounds.y, thumbBounds.width, thumbBounds.height, false, false, thumbDarkShadowColor, thumbDarkShadowColor, thumbHighlightColor, thumbHighlightColor); }
|
/**
* This method paints the thumb.
*
* @param g The Graphics object to paint with.
* @param c The Component that is being painted.
* @param thumbBounds The thumb bounds.
*/
|
This method paints the thumb
|
paintThumb
|
{
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java",
"license": "bsd-3-clause",
"size": 41982
}
|
[
"java.awt.Graphics",
"java.awt.Rectangle",
"javax.swing.JComponent"
] |
import java.awt.Graphics; import java.awt.Rectangle; import javax.swing.JComponent;
|
import java.awt.*; import javax.swing.*;
|
[
"java.awt",
"javax.swing"
] |
java.awt; javax.swing;
| 968,958
|
void trigger(String executionId, Map<String, Object> processVariables, Map<String, Object> transientVariables);
|
void trigger(String executionId, Map<String, Object> processVariables, Map<String, Object> transientVariables);
|
/**
* Similar to {@link #trigger(String, Map)}, but with an extra parameter that allows to pass transient variables.
*/
|
Similar to <code>#trigger(String, Map)</code>, but with an extra parameter that allows to pass transient variables
|
trigger
|
{
"repo_name": "paulstapleton/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/flowable/engine/RuntimeService.java",
"license": "apache-2.0",
"size": 63251
}
|
[
"java.util.Map"
] |
import java.util.Map;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 177,222
|
public void setStylesheetFile(File stylesheetFile) {
this.stylesheetFile = stylesheetFile;
}
|
void function(File stylesheetFile) { this.stylesheetFile = stylesheetFile; }
|
/**
* Sets the CSS stylesheet file.
*
* @param stylesheetFile The stylesheet file.
*/
|
Sets the CSS stylesheet file
|
setStylesheetFile
|
{
"repo_name": "Abnaxos/pegdown-doclet",
"path": "doclet/jdk8/src/main/java/ch/raffael/mddoclet/Options.java",
"license": "gpl-3.0",
"size": 20529
}
|
[
"java.io.File"
] |
import java.io.File;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 95,774
|
@Override
public boolean matches(VEvent event) {
throw new UnsupportedOperationException(this + " does not participate in filtering");
}
|
boolean function(VEvent event) { throw new UnsupportedOperationException(this + STR); }
|
/**
* Default implementation is to throw an UnsupportedOperationException.
*
* @see edu.wisc.wisccal.calendarkey.ISharePreference#matches(net.fortuna.ical4j.model.component.VEvent)
*/
|
Default implementation is to throw an UnsupportedOperationException
|
matches
|
{
"repo_name": "nblair/shareurl",
"path": "src/main/java/edu/wisc/wisccal/shareurl/domain/AbstractSharePreference.java",
"license": "apache-2.0",
"size": 4067
}
|
[
"net.fortuna.ical4j.model.component.VEvent"
] |
import net.fortuna.ical4j.model.component.VEvent;
|
import net.fortuna.ical4j.model.component.*;
|
[
"net.fortuna.ical4j"
] |
net.fortuna.ical4j;
| 377,781
|
@Nullable
public WorkbookOperation get() throws ClientException {
return send(HttpMethod.GET, null);
}
|
WorkbookOperation function() throws ClientException { return send(HttpMethod.GET, null); }
|
/**
* Gets the WorkbookOperation from the service
*
* @return the WorkbookOperation from the request
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/
|
Gets the WorkbookOperation from the service
|
get
|
{
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookOperationRequest.java",
"license": "mit",
"size": 6047
}
|
[
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.WorkbookOperation"
] |
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookOperation;
|
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*;
|
[
"com.microsoft.graph"
] |
com.microsoft.graph;
| 206,000
|
void reloadProfiles() throws IOException;
|
void reloadProfiles() throws IOException;
|
/**
* Reload profiles based on updated configuration.
* @throws IOException when invalid resource profile names are loaded
*/
|
Reload profiles based on updated configuration
|
reloadProfiles
|
{
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/resource/ResourceProfilesManager.java",
"license": "apache-2.0",
"size": 3101
}
|
[
"java.io.IOException"
] |
import java.io.IOException;
|
import java.io.*;
|
[
"java.io"
] |
java.io;
| 1,367,163
|
public void setYesterday() {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, -1);
m_innards = NotesDateTimeUtils.calendarToInnards(cal, true, false);
m_guessedTimezone = null;
}
|
void function() { Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -1); m_innards = NotesDateTimeUtils.calendarToInnards(cal, true, false); m_guessedTimezone = null; }
|
/**
* Sets the date part of this timedate to yesterday and the time part to ALLDAY
*/
|
Sets the date part of this timedate to yesterday and the time part to ALLDAY
|
setYesterday
|
{
"repo_name": "klehmann/domino-jna",
"path": "domino-jna/src/main/java/com/mindoo/domino/jna/NotesTimeDate.java",
"license": "apache-2.0",
"size": 30999
}
|
[
"com.mindoo.domino.jna.utils.NotesDateTimeUtils",
"java.util.Calendar"
] |
import com.mindoo.domino.jna.utils.NotesDateTimeUtils; import java.util.Calendar;
|
import com.mindoo.domino.jna.utils.*; import java.util.*;
|
[
"com.mindoo.domino",
"java.util"
] |
com.mindoo.domino; java.util;
| 629,171
|
public static ServletRequest getContextRequest()
{
ServiceContext context = (ServiceContext) _localContext.get();
if (context != null)
return context._request;
else
return null;
}
|
static ServletRequest function() { ServiceContext context = (ServiceContext) _localContext.get(); if (context != null) return context._request; else return null; }
|
/**
* Returns the service request.
*/
|
Returns the service request
|
getContextRequest
|
{
"repo_name": "christianchristensen/resin",
"path": "modules/hessian/src/com/caucho/services/server/ServiceContext.java",
"license": "gpl-2.0",
"size": 6069
}
|
[
"javax.servlet.ServletRequest"
] |
import javax.servlet.ServletRequest;
|
import javax.servlet.*;
|
[
"javax.servlet"
] |
javax.servlet;
| 1,558,244
|
void fireProjectedRndSettingsCreation(List<Integer> indexes,
ImageData image)
{
Renderer rnd = metadataViewer.getRenderer();
if (rnd == null) return;
RndProxyDef def = rnd.getRndSettingsCopy();
RenderingSettingsCreator l = new RenderingSettingsCreator(component,
ctx, image, def, indexes);
l.load();
}
|
void fireProjectedRndSettingsCreation(List<Integer> indexes, ImageData image) { Renderer rnd = metadataViewer.getRenderer(); if (rnd == null) return; RndProxyDef def = rnd.getRndSettingsCopy(); RenderingSettingsCreator l = new RenderingSettingsCreator(component, ctx, image, def, indexes); l.load(); }
|
/**
* Starts an asynchronous creation of the rendering settings
* for the pixels set.
*
* @param indexes The indexes of the projected channels.
* @param image The projected image.
*/
|
Starts an asynchronous creation of the rendering settings for the pixels set
|
fireProjectedRndSettingsCreation
|
{
"repo_name": "MontpellierRessourcesImagerie/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerModel.java",
"license": "gpl-2.0",
"size": 85080
}
|
[
"java.util.List",
"org.openmicroscopy.shoola.agents.imviewer.RenderingSettingsCreator",
"org.openmicroscopy.shoola.agents.metadata.rnd.Renderer",
"org.openmicroscopy.shoola.env.rnd.RndProxyDef"
] |
import java.util.List; import org.openmicroscopy.shoola.agents.imviewer.RenderingSettingsCreator; import org.openmicroscopy.shoola.agents.metadata.rnd.Renderer; import org.openmicroscopy.shoola.env.rnd.RndProxyDef;
|
import java.util.*; import org.openmicroscopy.shoola.agents.imviewer.*; import org.openmicroscopy.shoola.agents.metadata.rnd.*; import org.openmicroscopy.shoola.env.rnd.*;
|
[
"java.util",
"org.openmicroscopy.shoola"
] |
java.util; org.openmicroscopy.shoola;
| 2,881,906
|
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING,
defaultValue = "")
@SimpleProperty
public void DataUri(String dataUri) {
this.dataUri = dataUri.trim();
}
|
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") void function(String dataUri) { this.dataUri = dataUri.trim(); }
|
/**
* Specifies the data URI that will be used to start the activity.
*/
|
Specifies the data URI that will be used to start the activity
|
DataUri
|
{
"repo_name": "mit-cml/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/ActivityStarter.java",
"license": "apache-2.0",
"size": 22562
}
|
[
"com.google.appinventor.components.annotations.DesignerProperty",
"com.google.appinventor.components.common.PropertyTypeConstants"
] |
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
|
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
|
[
"com.google.appinventor"
] |
com.google.appinventor;
| 255,934
|
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
throw new SQLFeatureNotSupportedException("Method not supported");
}
|
void function(Executor executor, int milliseconds) throws SQLException { throw new SQLFeatureNotSupportedException(STR); }
|
/**
* for jdk1.7
*
* @param executor
* @param milliseconds
* @throws SQLException
*/
|
for jdk1.7
|
setNetworkTimeout
|
{
"repo_name": "slayermeng/farmer",
"path": "src/main/java/org/farmer/jdbc/HBaseConnection.java",
"license": "apache-2.0",
"size": 9767
}
|
[
"java.sql.SQLException",
"java.sql.SQLFeatureNotSupportedException",
"java.util.concurrent.Executor"
] |
import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.concurrent.Executor;
|
import java.sql.*; import java.util.concurrent.*;
|
[
"java.sql",
"java.util"
] |
java.sql; java.util;
| 2,755,193
|
@Test
public void testProjectViewReconciliation() throws Exception{
String projectId = project.getId();
Long projectIdLong = KeyFactory.stringToKey(projectId);
List<String> scope = Lists.newArrayList(projectId);
String viewId = createView(ViewType.project, scope);
// wait for the view.
waitForEntityReplication(viewId, projectId);
// query the view as a user that does not permission
String sql = "select * from "+viewId+" where id ="+projectId;
int rowCount = 1;
waitForConsistentQuery(adminUserInfo, sql, rowCount);
// manually delete the replicated data of the project to simulate a data loss.
TableIndexDAO indexDao = tableConnectionFactory.getConnection(viewId);
indexDao.truncateReplicationSyncExpiration();
indexDao.deleteEntityData(mockProgressCallbackVoid, Lists.newArrayList(projectIdLong));
// This query should trigger the reconciliation to repair the lost data.
// If the query returns a single row, then the deleted data was restored.
waitForConsistentQuery(adminUserInfo, sql, rowCount);
}
|
void function() throws Exception{ String projectId = project.getId(); Long projectIdLong = KeyFactory.stringToKey(projectId); List<String> scope = Lists.newArrayList(projectId); String viewId = createView(ViewType.project, scope); waitForEntityReplication(viewId, projectId); String sql = STR+viewId+STR+projectId; int rowCount = 1; waitForConsistentQuery(adminUserInfo, sql, rowCount); TableIndexDAO indexDao = tableConnectionFactory.getConnection(viewId); indexDao.truncateReplicationSyncExpiration(); indexDao.deleteEntityData(mockProgressCallbackVoid, Lists.newArrayList(projectIdLong)); waitForConsistentQuery(adminUserInfo, sql, rowCount); }
|
/**
* The fix for PLFM-4399 involved adding a worker to reconcile
* entity replication with the truth. This test ensure that when
* replication data is missing for a ProjectView, a query of the
* view triggers the reconciliation.
* @throws Exception
*
*/
|
The fix for PLFM-4399 involved adding a worker to reconcile entity replication with the truth. This test ensure that when replication data is missing for a ProjectView, a query of the view triggers the reconciliation
|
testProjectViewReconciliation
|
{
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/workers/src/test/java/org/sagebionetworks/table/worker/TableViewIntegrationTest.java",
"license": "apache-2.0",
"size": 52421
}
|
[
"com.google.common.collect.Lists",
"java.util.List",
"org.sagebionetworks.repo.model.jdo.KeyFactory",
"org.sagebionetworks.repo.model.table.ViewType",
"org.sagebionetworks.table.cluster.TableIndexDAO"
] |
import com.google.common.collect.Lists; import java.util.List; import org.sagebionetworks.repo.model.jdo.KeyFactory; import org.sagebionetworks.repo.model.table.ViewType; import org.sagebionetworks.table.cluster.TableIndexDAO;
|
import com.google.common.collect.*; import java.util.*; import org.sagebionetworks.repo.model.jdo.*; import org.sagebionetworks.repo.model.table.*; import org.sagebionetworks.table.cluster.*;
|
[
"com.google.common",
"java.util",
"org.sagebionetworks.repo",
"org.sagebionetworks.table"
] |
com.google.common; java.util; org.sagebionetworks.repo; org.sagebionetworks.table;
| 476,542
|
interface WithTags {
Update withTags(Map<String, String> tags);
}
}
|
interface WithTags { Update withTags(Map<String, String> tags); } }
|
/**
* Specifies tags.
* @param tags The resource tags
* @return the next update stage
*/
|
Specifies tags
|
withTags
|
{
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/IntegrationAccountAgreement.java",
"license": "mit",
"size": 9394
}
|
[
"java.util.Map"
] |
import java.util.Map;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,999,924
|
public SubResource virtualWan() {
return this.innerProperties() == null ? null : this.innerProperties().virtualWan();
}
|
SubResource function() { return this.innerProperties() == null ? null : this.innerProperties().virtualWan(); }
|
/**
* Get the virtualWan property: The VirtualWAN to which the VirtualHub belongs.
*
* @return the virtualWan value.
*/
|
Get the virtualWan property: The VirtualWAN to which the VirtualHub belongs
|
virtualWan
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/VirtualHubInner.java",
"license": "mit",
"size": 9351
}
|
[
"com.azure.core.management.SubResource"
] |
import com.azure.core.management.SubResource;
|
import com.azure.core.management.*;
|
[
"com.azure.core"
] |
com.azure.core;
| 1,296,936
|
public static <T> boolean isNotEmpty(final Collection<T> parameter) {
return !isEmpty(parameter);
}
|
static <T> boolean function(final Collection<T> parameter) { return !isEmpty(parameter); }
|
/**
* Checks if the collection is not null and not empty.
* @param <T> a type of element of collection
* @param parameter the collection
* @return true if the collection is not null nor empty
*/
|
Checks if the collection is not null and not empty
|
isNotEmpty
|
{
"repo_name": "yunseong/reef",
"path": "lang/java/reef-common/src/main/java/org/apache/reef/util/CollectionUtils.java",
"license": "apache-2.0",
"size": 1664
}
|
[
"java.util.Collection"
] |
import java.util.Collection;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 390,096
|
Camera.Parameters parameters = camera.getCamera().getParameters();
WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = manager.getDefaultDisplay();
int displayRotation = display.getRotation();
int cwRotationFromNaturalToDisplay;
switch (displayRotation) {
case Surface.ROTATION_0:
cwRotationFromNaturalToDisplay = 0;
break;
case Surface.ROTATION_90:
cwRotationFromNaturalToDisplay = 90;
break;
case Surface.ROTATION_180:
cwRotationFromNaturalToDisplay = 180;
break;
case Surface.ROTATION_270:
cwRotationFromNaturalToDisplay = 270;
break;
default:
// Have seen this return incorrect values like -90
if (displayRotation % 90 == 0) {
cwRotationFromNaturalToDisplay = (360 + displayRotation) % 360;
} else {
throw new IllegalArgumentException("Bad rotation: " + displayRotation);
}
}
Log.i(TAG, "Display at: " + cwRotationFromNaturalToDisplay);
int cwRotationFromNaturalToCamera = camera.getOrientation();
Log.i(TAG, "Camera at: " + cwRotationFromNaturalToCamera);
// Still not 100% sure about this. But acts like we need to flip this:
if (camera.getFacing() == CameraFacing.FRONT) {
cwRotationFromNaturalToCamera = (360 - cwRotationFromNaturalToCamera) % 360;
Log.i(TAG, "Front camera overriden to: " + cwRotationFromNaturalToCamera);
}
cwRotationFromDisplayToCamera = (360 + cwRotationFromNaturalToCamera - cwRotationFromNaturalToDisplay) % 360;
Log.i(TAG, "Final display orientation: " + cwRotationFromDisplayToCamera);
if (camera.getFacing() == CameraFacing.FRONT) {
Log.i(TAG, "Compensating rotation for front camera");
cwNeededRotation = (360 - cwRotationFromDisplayToCamera) % 360;
} else {
cwNeededRotation = cwRotationFromDisplayToCamera;
}
Log.i(TAG, "Clockwise rotation from display to camera: " + cwNeededRotation);
Point theScreenResolution = new Point();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
display.getSize(theScreenResolution);
screenResolution = theScreenResolution;
} else {
int screenWidth = display.getWidth();
int screenHeight = display.getHeight();
screenResolution = new Point(screenWidth, screenHeight);
}
Log.i(TAG, "Screen resolution in current orientation: " + screenResolution);
cameraResolution = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);
Log.i(TAG, "Camera resolution: " + cameraResolution);
bestPreviewSize = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution);
Log.i(TAG, "Best available preview size: " + bestPreviewSize);
boolean isScreenPortrait = screenResolution.x < screenResolution.y;
boolean isPreviewSizePortrait = bestPreviewSize.x < bestPreviewSize.y;
if (isScreenPortrait == isPreviewSizePortrait) {
previewSizeOnScreen = bestPreviewSize;
} else {
previewSizeOnScreen = new Point(bestPreviewSize.y, bestPreviewSize.x);
}
Log.i(TAG, "Preview size on screen: " + previewSizeOnScreen);
}
|
Camera.Parameters parameters = camera.getCamera().getParameters(); WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); int displayRotation = display.getRotation(); int cwRotationFromNaturalToDisplay; switch (displayRotation) { case Surface.ROTATION_0: cwRotationFromNaturalToDisplay = 0; break; case Surface.ROTATION_90: cwRotationFromNaturalToDisplay = 90; break; case Surface.ROTATION_180: cwRotationFromNaturalToDisplay = 180; break; case Surface.ROTATION_270: cwRotationFromNaturalToDisplay = 270; break; default: if (displayRotation % 90 == 0) { cwRotationFromNaturalToDisplay = (360 + displayRotation) % 360; } else { throw new IllegalArgumentException(STR + displayRotation); } } Log.i(TAG, STR + cwRotationFromNaturalToDisplay); int cwRotationFromNaturalToCamera = camera.getOrientation(); Log.i(TAG, STR + cwRotationFromNaturalToCamera); if (camera.getFacing() == CameraFacing.FRONT) { cwRotationFromNaturalToCamera = (360 - cwRotationFromNaturalToCamera) % 360; Log.i(TAG, STR + cwRotationFromNaturalToCamera); } cwRotationFromDisplayToCamera = (360 + cwRotationFromNaturalToCamera - cwRotationFromNaturalToDisplay) % 360; Log.i(TAG, STR + cwRotationFromDisplayToCamera); if (camera.getFacing() == CameraFacing.FRONT) { Log.i(TAG, STR); cwNeededRotation = (360 - cwRotationFromDisplayToCamera) % 360; } else { cwNeededRotation = cwRotationFromDisplayToCamera; } Log.i(TAG, STR + cwNeededRotation); Point theScreenResolution = new Point(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { display.getSize(theScreenResolution); screenResolution = theScreenResolution; } else { int screenWidth = display.getWidth(); int screenHeight = display.getHeight(); screenResolution = new Point(screenWidth, screenHeight); } Log.i(TAG, STR + screenResolution); cameraResolution = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution); Log.i(TAG, STR + cameraResolution); bestPreviewSize = CameraConfigurationUtils.findBestPreviewSizeValue(parameters, screenResolution); Log.i(TAG, STR + bestPreviewSize); boolean isScreenPortrait = screenResolution.x < screenResolution.y; boolean isPreviewSizePortrait = bestPreviewSize.x < bestPreviewSize.y; if (isScreenPortrait == isPreviewSizePortrait) { previewSizeOnScreen = bestPreviewSize; } else { previewSizeOnScreen = new Point(bestPreviewSize.y, bestPreviewSize.x); } Log.i(TAG, STR + previewSizeOnScreen); }
|
/**
* Reads, one time, values from the camera that are needed by the app.
*/
|
Reads, one time, values from the camera that are needed by the app
|
initFromCameraParameters
|
{
"repo_name": "xiong-it/PortraitZXing",
"path": "Eclipse/PortraitZXing/src/com/google/zxing/client/android/camera/CameraConfigurationManager.java",
"license": "apache-2.0",
"size": 9820
}
|
[
"android.content.Context",
"android.graphics.Point",
"android.hardware.Camera",
"android.os.Build",
"android.util.Log",
"android.view.Display",
"android.view.Surface",
"android.view.WindowManager",
"com.google.zxing.client.android.camera.open.CameraFacing"
] |
import android.content.Context; import android.graphics.Point; import android.hardware.Camera; import android.os.Build; import android.util.Log; import android.view.Display; import android.view.Surface; import android.view.WindowManager; import com.google.zxing.client.android.camera.open.CameraFacing;
|
import android.content.*; import android.graphics.*; import android.hardware.*; import android.os.*; import android.util.*; import android.view.*; import com.google.zxing.client.android.camera.open.*;
|
[
"android.content",
"android.graphics",
"android.hardware",
"android.os",
"android.util",
"android.view",
"com.google.zxing"
] |
android.content; android.graphics; android.hardware; android.os; android.util; android.view; com.google.zxing;
| 312,164
|
EAttribute getPassenger_DistanceWalked();
|
EAttribute getPassenger_DistanceWalked();
|
/**
* Returns the meta object for the attribute '{@link com.paxelerate.model.agent.Passenger#getDistanceWalked <em>Distance Walked</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Distance Walked</em>'.
* @see com.paxelerate.model.agent.Passenger#getDistanceWalked()
* @see #getPassenger()
* @generated
*/
|
Returns the meta object for the attribute '<code>com.paxelerate.model.agent.Passenger#getDistanceWalked Distance Walked</code>'.
|
getPassenger_DistanceWalked
|
{
"repo_name": "BauhausLuftfahrt/PAXelerate",
"path": "com.paxelerate.model/src/com/paxelerate/model/agent/AgentPackage.java",
"license": "epl-1.0",
"size": 45860
}
|
[
"org.eclipse.emf.ecore.EAttribute"
] |
import org.eclipse.emf.ecore.EAttribute;
|
import org.eclipse.emf.ecore.*;
|
[
"org.eclipse.emf"
] |
org.eclipse.emf;
| 793,579
|
public List<Avaliacao> getAvaliacoesByCrm(String crm) throws ParseException{
List<ParseObject> avaliacoes = null;
if(!isCrmUnico(crm)){
ParseQuery query = new ParseQuery(AvaliacaoTableEnum.NOME_CLASSE.toString());
query.whereEqualTo(AvaliacaoTableEnum.COLUNA_CRM.toString(), crm);
query.setLimit(50);
try {
avaliacoes = query.find();
} catch (ParseException e) {
throw e;
}
}
return montarAvaliacao(avaliacoes);
}
|
List<Avaliacao> function(String crm) throws ParseException{ List<ParseObject> avaliacoes = null; if(!isCrmUnico(crm)){ ParseQuery query = new ParseQuery(AvaliacaoTableEnum.NOME_CLASSE.toString()); query.whereEqualTo(AvaliacaoTableEnum.COLUNA_CRM.toString(), crm); query.setLimit(50); try { avaliacoes = query.find(); } catch (ParseException e) { throw e; } } return montarAvaliacao(avaliacoes); }
|
/**
* Metodo responsavel por retorna todas as avaliacoes de um medico especifico
* @param String crm
* @return List<Avaliacao> avaliacoes
* @throws ParseException
*/
|
Metodo responsavel por retorna todas as avaliacoes de um medico especifico
|
getAvaliacoesByCrm
|
{
"repo_name": "luucasAlbuq/doto",
"path": "SeuDoto/src/dao/DAOParse.java",
"license": "apache-2.0",
"size": 23472
}
|
[
"com.parse.ParseException",
"com.parse.ParseObject",
"com.parse.ParseQuery",
"java.util.List"
] |
import com.parse.ParseException; import com.parse.ParseObject; import com.parse.ParseQuery; import java.util.List;
|
import com.parse.*; import java.util.*;
|
[
"com.parse",
"java.util"
] |
com.parse; java.util;
| 641,095
|
protected void sequence_OperatorEqual(EObject context, OperatorEqual semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
|
void function(EObject context, OperatorEqual semanticObject) { genericSequencer.createSequence(context, semanticObject); }
|
/**
* Constraint:
* (equal='==' | notequal='!=')
*/
|
Constraint: (equal='==' | notequal='!=')
|
sequence_OperatorEqual
|
{
"repo_name": "niksavis/mm-dsl",
"path": "org.xtext.nv.dsl/src-gen/org/xtext/nv/dsl/serializer/MMDSLSemanticSequencer.java",
"license": "epl-1.0",
"size": 190481
}
|
[
"org.eclipse.emf.ecore.EObject",
"org.xtext.nv.dsl.mMDSL.OperatorEqual"
] |
import org.eclipse.emf.ecore.EObject; import org.xtext.nv.dsl.mMDSL.OperatorEqual;
|
import org.eclipse.emf.ecore.*; import org.xtext.nv.dsl.*;
|
[
"org.eclipse.emf",
"org.xtext.nv"
] |
org.eclipse.emf; org.xtext.nv;
| 1,125,890
|
public void logInfo(String origin, String msg) throws RemoteException;
|
void function(String origin, String msg) throws RemoteException;
|
/**
* Convenience method to send an information LogMessage to the LogManager.
*
* @param origin of the LogMessage.
* @param msg the message.
*/
|
Convenience method to send an information LogMessage to the LogManager
|
logInfo
|
{
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jserver/rmi/remote/RemoteSubComponent.java",
"license": "apache-2.0",
"size": 14573
}
|
[
"java.rmi.RemoteException"
] |
import java.rmi.RemoteException;
|
import java.rmi.*;
|
[
"java.rmi"
] |
java.rmi;
| 459,255
|
@BeforeEach
void setUp() throws ServletException {
this.filter = new NegotiateSecurityFilter();
this.filter.setAuth(new WindowsAuthProviderImpl());
this.filter.init(null);
}
|
void setUp() throws ServletException { this.filter = new NegotiateSecurityFilter(); this.filter.setAuth(new WindowsAuthProviderImpl()); this.filter.init(null); }
|
/**
* Sets the up.
*
* @throws ServletException
* the servlet exception
*/
|
Sets the up
|
setUp
|
{
"repo_name": "hazendaz/waffle",
"path": "Source/JNA/waffle-tests/src/test/java/waffle/servlet/NegotiateSecurityFilterTest.java",
"license": "mit",
"size": 19878
}
|
[
"javax.servlet.ServletException"
] |
import javax.servlet.ServletException;
|
import javax.servlet.*;
|
[
"javax.servlet"
] |
javax.servlet;
| 801,351
|
private static String convertLatin1ToUtf8(String latin1) {
return new String(latin1.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
}
|
static String function(String latin1) { return new String(latin1.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); }
|
/**
* Returns the proper UTF-8 representation of a String that was erroneously read using Latin1.
*
* @param latin1 Input string
* @return The input string, UTF8 encoded
*/
|
Returns the proper UTF-8 representation of a String that was erroneously read using Latin1
|
convertLatin1ToUtf8
|
{
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkActionFactory.java",
"license": "apache-2.0",
"size": 26370
}
|
[
"java.nio.charset.StandardCharsets"
] |
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.*;
|
[
"java.nio"
] |
java.nio;
| 629,104
|
public FormatType getFormatType( Element element )
throws XMLParsingException {
String[] tmp = new String[3];
URI[] uris = new URI[3];
tmp[0] = XMLTools.getNodeAsString( element, "@deegreewfs:inFilter", nsContext, null );
tmp[1] = XMLTools.getNodeAsString( element, "@deegreewfs:outFilter", nsContext, null );
tmp[2] = XMLTools.getNodeAsString( element, "@deegreewfs:schemaLocation", nsContext, null );
for ( int i = 0; i < tmp.length; i++ ) {
try {
if ( tmp[i] != null && !"".equals( tmp[i].trim() ) ) {
if ( !( tmp[i].toLowerCase().startsWith( "file:/" ) ) ) {
tmp[i] = this.resolve( tmp[i] ).toExternalForm();
LOG.logDebug( "Found format "
+ ( ( i == 0 ) ? "inFilter" : ( ( i == 1 ) ? "outFilter" : "schemaLocation" ) )
+ " at location: " + tmp[i] );
}
uris[i] = new URI( tmp[i] );
}
} catch ( MalformedURLException e ) {
throw new XMLParsingException( "Could not resolve relative path:" + tmp[i] );
} catch ( URISyntaxException e ) {
throw new XMLParsingException( "Not a valid URI:" + tmp[i] );
}
}
String value = XMLTools.getRequiredNodeAsString( element, "text()", nsContext );
return new FormatType( uris[0], uris[1], uris[2], value );
}
|
FormatType function( Element element ) throws XMLParsingException { String[] tmp = new String[3]; URI[] uris = new URI[3]; tmp[0] = XMLTools.getNodeAsString( element, STR, nsContext, null ); tmp[1] = XMLTools.getNodeAsString( element, STR, nsContext, null ); tmp[2] = XMLTools.getNodeAsString( element, STR, nsContext, null ); for ( int i = 0; i < tmp.length; i++ ) { try { if ( tmp[i] != null && !STRfile:/STRFound format STRinFilterSTRoutFilterSTRschemaLocationSTR at location: STRCould not resolve relative path:STRNot a valid URI:STRtext()", nsContext ); return new FormatType( uris[0], uris[1], uris[2], value ); }
|
/**
* Returns the object representation for an <code>wfs:OutputFormat</code> -element.
*
* @param element
* @return object representation for the element
* @throws XMLParsingException
*/
|
Returns the object representation for an <code>wfs:OutputFormat</code> -element
|
getFormatType
|
{
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/wfs/capabilities/WFSCapabilitiesDocument_1_1_0.java",
"license": "lgpl-2.1",
"size": 26274
}
|
[
"org.deegree.framework.xml.XMLParsingException",
"org.deegree.framework.xml.XMLTools",
"org.w3c.dom.Element"
] |
import org.deegree.framework.xml.XMLParsingException; import org.deegree.framework.xml.XMLTools; import org.w3c.dom.Element;
|
import org.deegree.framework.xml.*; import org.w3c.dom.*;
|
[
"org.deegree.framework",
"org.w3c.dom"
] |
org.deegree.framework; org.w3c.dom;
| 1,336,870
|
@Override
public boolean equals(final Object object) {
if(object == this) {
return true;
} else if(!(object instanceof TorranceSparrowBTDF)) {
return false;
} else if(!Objects.equals(this.transmittanceScale, TorranceSparrowBTDF.class.cast(object).transmittanceScale)) {
return false;
} else if(!Objects.equals(this.fresnel, TorranceSparrowBTDF.class.cast(object).fresnel)) {
return false;
} else if(!Objects.equals(this.microfacetDistribution, TorranceSparrowBTDF.class.cast(object).microfacetDistribution)) {
return false;
} else if(!Objects.equals(this.transportMode, TorranceSparrowBTDF.class.cast(object).transportMode)) {
return false;
} else if(!equal(this.etaA, TorranceSparrowBTDF.class.cast(object).etaA)) {
return false;
} else if(!equal(this.etaB, TorranceSparrowBTDF.class.cast(object).etaB)) {
return false;
} else {
return true;
}
}
/**
* Evaluates the probability density function (PDF).
* <p>
* Returns a {@code float} with the probability density function (PDF) value.
* <p>
* If either {@code outgoing}, {@code normal} or {@code incoming} are {@code null}, a {@code NullPointerException} will be thrown.
*
* @param outgoing the outgoing direction
* @param normal the normal
* @param incoming the incoming direction
* @return a {@code float} with the probability density function (PDF) value
* @throws NullPointerException thrown if, and only if, either {@code outgoing}, {@code normal} or {@code incoming} are {@code null}
|
boolean function(final Object object) { if(object == this) { return true; } else if(!(object instanceof TorranceSparrowBTDF)) { return false; } else if(!Objects.equals(this.transmittanceScale, TorranceSparrowBTDF.class.cast(object).transmittanceScale)) { return false; } else if(!Objects.equals(this.fresnel, TorranceSparrowBTDF.class.cast(object).fresnel)) { return false; } else if(!Objects.equals(this.microfacetDistribution, TorranceSparrowBTDF.class.cast(object).microfacetDistribution)) { return false; } else if(!Objects.equals(this.transportMode, TorranceSparrowBTDF.class.cast(object).transportMode)) { return false; } else if(!equal(this.etaA, TorranceSparrowBTDF.class.cast(object).etaA)) { return false; } else if(!equal(this.etaB, TorranceSparrowBTDF.class.cast(object).etaB)) { return false; } else { return true; } } /** * Evaluates the probability density function (PDF). * <p> * Returns a {@code float} with the probability density function (PDF) value. * <p> * If either {@code outgoing}, {@code normal} or {@code incoming} are {@code null}, a {@code NullPointerException} will be thrown. * * @param outgoing the outgoing direction * @param normal the normal * @param incoming the incoming direction * @return a {@code float} with the probability density function (PDF) value * @throws NullPointerException thrown if, and only if, either {@code outgoing}, {@code normal} or {@code incoming} are {@code null}
|
/**
* Compares {@code object} to this {@code TorranceSparrowBTDF} instance for equality.
* <p>
* Returns {@code true} if, and only if, {@code object} is an instance of {@code TorranceSparrowBTDF}, and their respective values are equal, {@code false} otherwise.
*
* @param object the {@code Object} to compare to this {@code TorranceSparrowBTDF} instance for equality
* @return {@code true} if, and only if, {@code object} is an instance of {@code TorranceSparrowBTDF}, and their respective values are equal, {@code false} otherwise
*/
|
Compares object to this TorranceSparrowBTDF instance for equality. Returns true if, and only if, object is an instance of TorranceSparrowBTDF, and their respective values are equal, false otherwise
|
equals
|
{
"repo_name": "macroing/Dayflower",
"path": "src/main/java/org/dayflower/scene/bxdf/TorranceSparrowBTDF.java",
"license": "lgpl-3.0",
"size": 16310
}
|
[
"java.util.Objects"
] |
import java.util.Objects;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 988,231
|
public ValidationActivity withSleep(Object sleep) {
if (this.innerTypeProperties() == null) {
this.innerTypeProperties = new ValidationActivityTypeProperties();
}
this.innerTypeProperties().withSleep(sleep);
return this;
}
|
ValidationActivity function(Object sleep) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new ValidationActivityTypeProperties(); } this.innerTypeProperties().withSleep(sleep); return this; }
|
/**
* Set the sleep property: A delay in seconds between validation attempts. If no value is specified, 10 seconds will
* be used as the default. Type: integer (or Expression with resultType integer).
*
* @param sleep the sleep value to set.
* @return the ValidationActivity object itself.
*/
|
Set the sleep property: A delay in seconds between validation attempts. If no value is specified, 10 seconds will be used as the default. Type: integer (or Expression with resultType integer)
|
withSleep
|
{
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/ValidationActivity.java",
"license": "mit",
"size": 7887
}
|
[
"com.azure.resourcemanager.datafactory.fluent.models.ValidationActivityTypeProperties"
] |
import com.azure.resourcemanager.datafactory.fluent.models.ValidationActivityTypeProperties;
|
import com.azure.resourcemanager.datafactory.fluent.models.*;
|
[
"com.azure.resourcemanager"
] |
com.azure.resourcemanager;
| 2,211,722
|
@Component
public Task scheduleTaskAsynchronously(CommandBackend backend, Runnable runnable, int delay) {
return this.scheduleTask(backend, runnable, delay, 0, true);
}
|
Task function(CommandBackend backend, Runnable runnable, int delay) { return this.scheduleTask(backend, runnable, delay, 0, true); }
|
/**
* Schedules a new synchronous task.
* @param backend The backend the task runs on.
* @param runnable The runnable to schedule.
* @param delay The time to wait in milliseconds.
* @return The task.
*/
|
Schedules a new synchronous task
|
scheduleTaskAsynchronously
|
{
"repo_name": "StuxSoftware/SimpleDev",
"path": "Commands/src/main/java/net/stuxcrystal/simpledev/commands/contrib/scheduler/fallback/TaskComponent.java",
"license": "apache-2.0",
"size": 7139
}
|
[
"net.stuxcrystal.simpledev.commands.CommandBackend",
"net.stuxcrystal.simpledev.commands.contrib.scheduler.Task"
] |
import net.stuxcrystal.simpledev.commands.CommandBackend; import net.stuxcrystal.simpledev.commands.contrib.scheduler.Task;
|
import net.stuxcrystal.simpledev.commands.*; import net.stuxcrystal.simpledev.commands.contrib.scheduler.*;
|
[
"net.stuxcrystal.simpledev"
] |
net.stuxcrystal.simpledev;
| 21,852
|
public int compareTo(Object o) {
return new Integer(round).compareTo(new Integer(((CandidateKeyPart) o).round));
}
}
private class MatchingKeyPart extends CandidateKeyPart {
int remoteRound;
int remoteCandidateNumber;
MatchingKeyPart(CandidateKeyPart candidateBase, int remoteRound, int remoteCandidateNumber) throws InternalApplicationException {
super(candidateBase.keyPart, candidateBase.round, candidateBase.candidateNumber, candidateBase.entropy);
this.remoteRound = remoteRound;
this.remoteCandidateNumber = remoteCandidateNumber;
if (logger.isTraceEnabled())
logger.trace("Created new matching key part object out of a candidate key part for local " +
this.round + "/" + this.candidateNumber + ", remote "+
this.remoteRound + "/" + this.remoteCandidateNumber + ": " +
new String(Hex.encodeHex(this.keyPart)) + " with hash " +
new String(Hex.encodeHex(this.hash)) +
(remoteIdentifier != null ? " [" + remoteIdentifier + "]" : ""));
}
}
public static class CandidateKey {
public int numParts;
public byte[] key;
public byte[] hash;
public int[][] localIndices;
public int[][] remoteIndices;
|
int function(Object o) { return new Integer(round).compareTo(new Integer(((CandidateKeyPart) o).round)); } } private class MatchingKeyPart extends CandidateKeyPart { int remoteRound; int remoteCandidateNumber; MatchingKeyPart(CandidateKeyPart candidateBase, int remoteRound, int remoteCandidateNumber) throws InternalApplicationException { super(candidateBase.keyPart, candidateBase.round, candidateBase.candidateNumber, candidateBase.entropy); this.remoteRound = remoteRound; this.remoteCandidateNumber = remoteCandidateNumber; if (logger.isTraceEnabled()) logger.trace(STR + this.round + "/" + this.candidateNumber + STR+ this.remoteRound + "/" + this.remoteCandidateNumber + STR + new String(Hex.encodeHex(this.keyPart)) + STR + new String(Hex.encodeHex(this.hash)) + (remoteIdentifier != null ? STR + remoteIdentifier + "]" : "")); } } public static class CandidateKey { public int numParts; public byte[] key; public byte[] hash; public int[][] localIndices; public int[][] remoteIndices;
|
/** Implementation of comparable so that an array of these objects can be sorted
* by round number. Used by CandidateKeyProtocol#generateKey
*/
|
Implementation of comparable so that an array of these objects can be sorted by round number. Used by CandidateKeyProtocol#generateKey
|
compareTo
|
{
"repo_name": "mobilesec/openuat",
"path": "src/org/openuat/authentication/CandidateKeyProtocol.java",
"license": "lgpl-3.0",
"size": 92128
}
|
[
"org.apache.commons.codec.binary.Hex",
"org.openuat.authentication.exceptions.InternalApplicationException"
] |
import org.apache.commons.codec.binary.Hex; import org.openuat.authentication.exceptions.InternalApplicationException;
|
import org.apache.commons.codec.binary.*; import org.openuat.authentication.exceptions.*;
|
[
"org.apache.commons",
"org.openuat.authentication"
] |
org.apache.commons; org.openuat.authentication;
| 2,407,052
|
@Test
public void postRegionKey() {
// Test an unknown user - 401 error
assertResponse(restClient.doPost("/" + REGION_NAME + "?key9", "user", "wrongPswd",
"{ \"key9\" : \"foo\" }"))
.hasStatusCode(401);
// Test a user with insufficient rights - 403
assertResponse(restClient.doPost("/" + REGION_NAME + "?key9", "dataRead", "dataRead",
"{ \"key9\" : \"foo\" }"))
.hasStatusCode(403);
// Test an authorized user - 201
assertResponse(restClient.doPost("/" + REGION_NAME + "?key9", "dataWrite", "dataWrite",
"{ \"key9\" : \"foo\" }"))
.hasStatusCode(201);
}
|
void function() { assertResponse(restClient.doPost("/" + REGION_NAME + "?key9", "user", STR, STRkey9\STRfoo\STR)) .hasStatusCode(401); assertResponse(restClient.doPost("/" + REGION_NAME + "?key9", STR, STR, STRkey9\STRfoo\STR)) .hasStatusCode(403); assertResponse(restClient.doPost("/" + REGION_NAME + "?key9", STR, STR, STRkey9\STRfoo\STR)) .hasStatusCode(201); }
|
/**
* Test permissions on deleting a region's key(s)
*/
|
Test permissions on deleting a region's key(s)
|
postRegionKey
|
{
"repo_name": "smgoller/geode",
"path": "geode-assembly/src/integrationTest/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java",
"license": "apache-2.0",
"size": 14311
}
|
[
"org.apache.geode.test.junit.rules.HttpResponseAssert"
] |
import org.apache.geode.test.junit.rules.HttpResponseAssert;
|
import org.apache.geode.test.junit.rules.*;
|
[
"org.apache.geode"
] |
org.apache.geode;
| 2,826,188
|
public void processParameters(){
Properties map = System.getProperties();
Iterator<Object> iter = map.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
if (key != null && key.startsWith(RunningProperties.PARAM_PREFIX)) {
Parameter param = new Parameter();
String value = map.getProperty(key);
key = key.substring(RunningProperties.PARAM_PREFIX.length());
param.setName(key);
param.setType(ParameterType.STRING);
param.setValue(value);
addParameter(key, param);
}
if(key != null && key.equals(RunningProperties.SCRIPT_TAG)){
configTagName(map.getProperty(key));
}
if(key != null && key.equals(RunningProperties.SCRIPT_PATH)){
configFilePath(map.getProperty(key));
}
}
}
|
void function(){ Properties map = System.getProperties(); Iterator<Object> iter = map.keySet().iterator(); while (iter.hasNext()) { String key = (String) iter.next(); if (key != null && key.startsWith(RunningProperties.PARAM_PREFIX)) { Parameter param = new Parameter(); String value = map.getProperty(key); key = key.substring(RunningProperties.PARAM_PREFIX.length()); param.setName(key); param.setType(ParameterType.STRING); param.setValue(value); addParameter(key, param); } if(key != null && key.equals(RunningProperties.SCRIPT_TAG)){ configTagName(map.getProperty(key)); } if(key != null && key.equals(RunningProperties.SCRIPT_PATH)){ configFilePath(map.getProperty(key)); } } }
|
/**
* process the parameter from the the system environment varables.
* @throws Exception
*/
|
process the parameter from the the system environment varables
|
processParameters
|
{
"repo_name": "Top-Q/jsystem",
"path": "jsystem-core-projects/jsystemCore/src/main/java/jsystem/framework/scripts/ScriptExecutor.java",
"license": "apache-2.0",
"size": 5677
}
|
[
"java.util.Iterator",
"java.util.Properties"
] |
import java.util.Iterator; import java.util.Properties;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 1,810,780
|
public static void main(String[] args) {
EventQueue.invokeLater(new Client());
}
|
static void function(String[] args) { EventQueue.invokeLater(new Client()); }
|
/**
* Invoca o mundo magico do java
*
* @param args
*/
|
Invoca o mundo magico do java
|
main
|
{
"repo_name": "arthurgregorio/exemplos",
"path": "JChat/src/jchat/Client.java",
"license": "apache-2.0",
"size": 3641
}
|
[
"java.awt.EventQueue"
] |
import java.awt.EventQueue;
|
import java.awt.*;
|
[
"java.awt"
] |
java.awt;
| 1,473,175
|
public List<MilestoneStatusDTO> getAllMilestoneStatus() {
if (this.generalStatusManager
.findByTable(APConstants.REPORT_SYNTHESYS_FLAGSHIPS_PROGRESS_MILESTONES_TABLE) != null) {
List<GeneralStatus> statuses =
this.generalStatusManager.findByTable(APConstants.REPORT_SYNTHESYS_FLAGSHIPS_PROGRESS_MILESTONES_TABLE);
List<MilestoneStatusDTO> milestoneStatusDTOs = statuses.stream()
.map(statusEntity -> this.milestoneStatusMapper.generalStatusToMilestoneStatusDTO(statusEntity))
.collect(Collectors.toList());
return milestoneStatusDTOs;
} else {
return null;
}
}
|
List<MilestoneStatusDTO> function() { if (this.generalStatusManager .findByTable(APConstants.REPORT_SYNTHESYS_FLAGSHIPS_PROGRESS_MILESTONES_TABLE) != null) { List<GeneralStatus> statuses = this.generalStatusManager.findByTable(APConstants.REPORT_SYNTHESYS_FLAGSHIPS_PROGRESS_MILESTONES_TABLE); List<MilestoneStatusDTO> milestoneStatusDTOs = statuses.stream() .map(statusEntity -> this.milestoneStatusMapper.generalStatusToMilestoneStatusDTO(statusEntity)) .collect(Collectors.toList()); return milestoneStatusDTOs; } else { return null; } }
|
/**
* Get All the milestone status Items *
*
* @return a List of MilestoneStatusDTO with all the milestone status Items.
*/
|
Get All the milestone status Items
|
getAllMilestoneStatus
|
{
"repo_name": "CCAFS/MARLO",
"path": "marlo-web/src/main/java/org/cgiar/ccafs/marlo/rest/controller/v2/controllist/items/arcontrollists/MilestoneStatusItem.java",
"license": "gpl-3.0",
"size": 3427
}
|
[
"java.util.List",
"java.util.stream.Collectors",
"org.cgiar.ccafs.marlo.config.APConstants",
"org.cgiar.ccafs.marlo.data.model.GeneralStatus",
"org.cgiar.ccafs.marlo.rest.dto.MilestoneStatusDTO"
] |
import java.util.List; import java.util.stream.Collectors; import org.cgiar.ccafs.marlo.config.APConstants; import org.cgiar.ccafs.marlo.data.model.GeneralStatus; import org.cgiar.ccafs.marlo.rest.dto.MilestoneStatusDTO;
|
import java.util.*; import java.util.stream.*; import org.cgiar.ccafs.marlo.config.*; import org.cgiar.ccafs.marlo.data.model.*; import org.cgiar.ccafs.marlo.rest.dto.*;
|
[
"java.util",
"org.cgiar.ccafs"
] |
java.util; org.cgiar.ccafs;
| 451,847
|
public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().single().body();
}
|
NetworkSecurityGroupInner function(String resourceGroupName, String networkSecurityGroupName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().single().body(); }
|
/**
* Updates a network security group tags.
*
* @param resourceGroupName The name of the resource group.
* @param networkSecurityGroupName The name of the network security group.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the NetworkSecurityGroupInner object if successful.
*/
|
Updates a network security group tags
|
updateTags
|
{
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/NetworkSecurityGroupsInner.java",
"license": "mit",
"size": 72299
}
|
[
"java.util.Map"
] |
import java.util.Map;
|
import java.util.*;
|
[
"java.util"
] |
java.util;
| 2,014,400
|
public @Nonnull Iterable<ResourceStatus> listFirewallStatus() throws InternalException, CloudException;
|
@Nonnull Iterable<ResourceStatus> function() throws InternalException, CloudException;
|
/**
* Lists the status for all network firewalls in the current provider context.
* @return the status for all network firewalls in the current account
* @throws InternalException an error occurred locally independent of any events in the cloud
* @throws CloudException an error occurred with the cloud provider while performing the operation
*/
|
Lists the status for all network firewalls in the current provider context
|
listFirewallStatus
|
{
"repo_name": "OSS-TheWeatherCompany/dasein-cloud-core",
"path": "src/main/java/org/dasein/cloud/network/NetworkFirewallSupport.java",
"license": "apache-2.0",
"size": 21262
}
|
[
"javax.annotation.Nonnull",
"org.dasein.cloud.CloudException",
"org.dasein.cloud.InternalException",
"org.dasein.cloud.ResourceStatus"
] |
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; import org.dasein.cloud.ResourceStatus;
|
import javax.annotation.*; import org.dasein.cloud.*;
|
[
"javax.annotation",
"org.dasein.cloud"
] |
javax.annotation; org.dasein.cloud;
| 469,910
|
protected Script[] queryAllowedTemplateScriptsInternal(UUID templateId) {
Set<Script> scriptSet = new LinkedHashSet<Script>();
Connection conn = null;
PreparedStatement pstm = null;
ResultSet rs = null;
try
{
conn = DbPoolConnection.getInstance().getReadConnection();
String sql = "select * from script_new where (allowed_template_ids like '%"+templateId.toString()+"%' ) or (allowed_template_ids = '*')";
pstm = conn.prepareStatement(sql);
rs = pstm.executeQuery();
String scriptImportStr = getScriptImportStr();
while(rs.next())
{
UUID id = DataAccessFactory.getInstance().createUUID(rs.getObject("id").toString());
Timestamp createTime = rs.getTimestamp("create_time");
Script script = new ScriptImpl(id, rs.getString("create_user"), createTime);
script.setName(rs.getString("name"));
script.setTemplateTypeIds(ArrayUtil.string2IdArray(rs.getString("template_type_ids")));
script.setTemplateIds(ArrayUtil.string2IdArray(rs.getString("template_ids")));
script.setFlowIds(ArrayUtil.string2IdArray(rs.getString("flow_ids")));
script.setBeginStatIds(ArrayUtil.string2IdArray(rs.getString("begin_stat_ids")));
script.setEndStatIds(ArrayUtil.string2IdArray(rs.getString("end_stat_ids")));
script.setActionIds(ArrayUtil.string2IdArray(rs.getString("action_ids")));
script.setAsync(rs.getBoolean("is_async"));
script.setBeforeCommit(rs.getBoolean("is_before_commit"));
script.setAfterSuccess(rs.getBoolean("is_after_success"));
script.setAfterFail(rs.getBoolean("is_after_fail"));
script.setAfterQuery(rs.getBoolean("is_after_query"));
script.setScript(scriptImportStr + rs.getString("xml"));
script.setStatEdit(rs.getBoolean("is_stat_edit"));
script.setActionEdit(rs.getBoolean("is_action_edit"));
script.setValid(rs.getBoolean("is_valid"));
script.setAllowedTemplateIds(ArrayUtil.string2IdArray(rs.getString("allowed_template_ids")));
scriptSet.add(script);
}
}catch(Exception e)
{
logger.error("",e);
}finally
{
DbPoolConnection.getInstance().closeAll(rs, pstm, conn);
}
return scriptSet.toArray(new Script[0]);
}
|
Script[] function(UUID templateId) { Set<Script> scriptSet = new LinkedHashSet<Script>(); Connection conn = null; PreparedStatement pstm = null; ResultSet rs = null; try { conn = DbPoolConnection.getInstance().getReadConnection(); String sql = STR+templateId.toString()+STR; pstm = conn.prepareStatement(sql); rs = pstm.executeQuery(); String scriptImportStr = getScriptImportStr(); while(rs.next()) { UUID id = DataAccessFactory.getInstance().createUUID(rs.getObject("id").toString()); Timestamp createTime = rs.getTimestamp(STR); Script script = new ScriptImpl(id, rs.getString(STR), createTime); script.setName(rs.getString("name")); script.setTemplateTypeIds(ArrayUtil.string2IdArray(rs.getString(STR))); script.setTemplateIds(ArrayUtil.string2IdArray(rs.getString(STR))); script.setFlowIds(ArrayUtil.string2IdArray(rs.getString(STR))); script.setBeginStatIds(ArrayUtil.string2IdArray(rs.getString(STR))); script.setEndStatIds(ArrayUtil.string2IdArray(rs.getString(STR))); script.setActionIds(ArrayUtil.string2IdArray(rs.getString(STR))); script.setAsync(rs.getBoolean(STR)); script.setBeforeCommit(rs.getBoolean(STR)); script.setAfterSuccess(rs.getBoolean(STR)); script.setAfterFail(rs.getBoolean(STR)); script.setAfterQuery(rs.getBoolean(STR)); script.setScript(scriptImportStr + rs.getString("xml")); script.setStatEdit(rs.getBoolean(STR)); script.setActionEdit(rs.getBoolean(STR)); script.setValid(rs.getBoolean(STR)); script.setAllowedTemplateIds(ArrayUtil.string2IdArray(rs.getString(STR))); scriptSet.add(script); } }catch(Exception e) { logger.error("",e); }finally { DbPoolConnection.getInstance().closeAll(rs, pstm, conn); } return scriptSet.toArray(new Script[0]); }
|
/**
* (non-Javadoc)
* <p> Title:queryAllowedTemplateScriptsInternal</p>
* @param templateId
* @return
* @see com.sogou.qadev.service.cynthia.service.impl.AbstractScriptAccessSession#queryAllowedTemplateScriptsInternal(com.sogou.qadev.service.cynthia.bean.UUID)
*/
|
(non-Javadoc) Title:queryAllowedTemplateScriptsInternal
|
queryAllowedTemplateScriptsInternal
|
{
"repo_name": "wb1991/Cynthia_Maven",
"path": "src/main/java/com/sogou/qadev/service/cynthia/dao/ScriptAccessSessionMySQL.java",
"license": "gpl-2.0",
"size": 32016
}
|
[
"com.sogou.qadev.service.cynthia.bean.Script",
"com.sogou.qadev.service.cynthia.bean.impl.ScriptImpl",
"com.sogou.qadev.service.cynthia.factory.DataAccessFactory",
"com.sogou.qadev.service.cynthia.service.DbPoolConnection",
"com.sogou.qadev.service.cynthia.util.ArrayUtil",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.Timestamp",
"java.util.LinkedHashSet",
"java.util.Set"
] |
import com.sogou.qadev.service.cynthia.bean.Script; import com.sogou.qadev.service.cynthia.bean.impl.ScriptImpl; import com.sogou.qadev.service.cynthia.factory.DataAccessFactory; import com.sogou.qadev.service.cynthia.service.DbPoolConnection; import com.sogou.qadev.service.cynthia.util.ArrayUtil; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.LinkedHashSet; import java.util.Set;
|
import com.sogou.qadev.service.cynthia.bean.*; import com.sogou.qadev.service.cynthia.bean.impl.*; import com.sogou.qadev.service.cynthia.factory.*; import com.sogou.qadev.service.cynthia.service.*; import com.sogou.qadev.service.cynthia.util.*; import java.sql.*; import java.util.*;
|
[
"com.sogou.qadev",
"java.sql",
"java.util"
] |
com.sogou.qadev; java.sql; java.util;
| 2,284,121
|
public static Set<Pair<Text,Text>> getFetchedColumns(Class<?> implementingClass,
Configuration conf) {
checkArgument(conf != null, "conf is null");
String confValue = conf.get(enumToConfKey(implementingClass, ScanOpts.COLUMNS));
List<String> serialized = new ArrayList<>();
if (confValue != null) {
// Split and include any trailing empty strings to allow empty column families
Collections.addAll(serialized, confValue.split(",", -1));
}
return deserializeFetchedColumns(serialized);
}
|
static Set<Pair<Text,Text>> function(Class<?> implementingClass, Configuration conf) { checkArgument(conf != null, STR); String confValue = conf.get(enumToConfKey(implementingClass, ScanOpts.COLUMNS)); List<String> serialized = new ArrayList<>(); if (confValue != null) { Collections.addAll(serialized, confValue.split(",", -1)); } return deserializeFetchedColumns(serialized); }
|
/**
* Gets the columns to be mapped over from this job.
*
* @param implementingClass
* the class whose name will be used as a prefix for the property configuration key
* @param conf
* the Hadoop configuration object to configure
* @return a set of columns
* @since 1.6.0
* @see #fetchColumns(Class, Configuration, Collection)
*/
|
Gets the columns to be mapped over from this job
|
getFetchedColumns
|
{
"repo_name": "ivakegg/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/InputConfigurator.java",
"license": "apache-2.0",
"size": 38120
}
|
[
"com.google.common.base.Preconditions",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Set",
"org.apache.accumulo.core.util.Pair",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.io.Text"
] |
import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.accumulo.core.util.Pair; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text;
|
import com.google.common.base.*; import java.util.*; import org.apache.accumulo.core.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*;
|
[
"com.google.common",
"java.util",
"org.apache.accumulo",
"org.apache.hadoop"
] |
com.google.common; java.util; org.apache.accumulo; org.apache.hadoop;
| 2,421,766
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.