__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/33280531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getScriptCode() {
final Iterable<DomNode> textNodes = getChildren();
final StringBuilder scriptCode = new StringBuilder();
for (final DomNode node : textNodes) {
if (node instanceof DomText) {
final DomText domText = (DomText) node;
scriptCode.append(domText.getData());
}
}
return scriptCode.toString();
}
COM: <s> gets the script held within the script tag </s>
|
funcom_train/24130796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLinkedToApplication(String applicationName) {
boolean result = false;
Set<ApplicationRole> applicationRoles = getApplicationRoles();
for (ApplicationRole applicationRole : applicationRoles) {
if (applicationRole.getApplication() != null && applicationRole.getApplication().getNaam().equals(applicationName)) {
result = true;
break;
}
}
return result;
}
COM: <s> see whether this role is linked to an application </s>
|
funcom_train/1152576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getHelpCommand() {
if (helpCommand == null) {//GEN-END:|447-getter|0|447-preInit
// write pre-init user code here
helpCommand = new Command("Info", Command.HELP, 0);//GEN-LINE:|447-getter|1|447-postInit
// write post-init user code here
}//GEN-BEGIN:|447-getter|2|
return helpCommand;
}
COM: <s> returns an initiliazed instance of help command component </s>
|
funcom_train/39949397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExceptDate(long date) {
Date newDate = new Date(date);
for (int i = 0; i < exceptDates.size(); i++) {
// make sure the new exception date is not already contained.
if (isSameDay((Date)exceptDates.elementAt(i), newDate))
return;
}
exceptDates.addElement(newDate);
}
COM: <s> add a date for which this repeat rule should not occur </s>
|
funcom_train/7614202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRect(int x1, int y1, int x2, int y2) {
int i = rect[0];
rect = MultiRectAreaOp.checkBufSize(rect, 4);
rect[i++] = x1;
rect[i++] = y1;
rect[i++] = x2;
rect[i++] = y2;
}
COM: <s> add rectangle to the buffer without any checking </s>
|
funcom_train/20269837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scope getScope() {
Scope scope = scopes.isEmpty() ? null : scopes.peek();
if (scopeRoots.isEmpty()) {
return scope;
}
Iterator<Node> it = scopeRoots.descendingIterator();
while (it.hasNext()) {
scope = scopeCreator.createScope(it.next(), scope);
scopes.push(scope);
}
scopeRoots.clear();
return scope;
}
COM: <s> gets the current scope </s>
|
funcom_train/37401467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while(go) {
Object elem;
synchronized(this) {
if(queue.isEmpty()) {
try{wait();} catch(InterruptedException e) {Util.printStackTrace(e);}
}
if(queue.isEmpty()) continue;
elem = queue.removeFirst();
if(queue.isEmpty() && flushing)
notify();
}
go = handle(elem);
}
}
COM: <s> the read from queue loop </s>
|
funcom_train/17544259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateData(FileLock dataLock, boolean modify) {
updating++;
try {
updateDataFromModel(getModel(), dataLock, modify);
timeStamp = dataCache.getTimeStamp();
} finally {
updating--;
if (dataLock != null && dataLock.isValid()){
dataLock.releaseLock();
}
}
}
COM: <s> updates data from model and updates time stamp field </s>
|
funcom_train/8357521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtT() {
if (txtT == null) {
txtT = new JTextField();
if(laplacian.getT() != 0)
{
txtT.setText(String.valueOf(laplacian.getT()));
}
else
{
txtT.setText("infinity");
}
txtT.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
txtT.selectAll();
}
});
}
return txtT;
}
COM: <s> this method initializes txt t </s>
|
funcom_train/10628459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstrBIScale() {
String a = "1231212478987482988429808779810457634781384756794987";
BigInteger bA = new BigInteger(a);
int aScale = 10;
BigDecimal aNumber = new BigDecimal(bA, aScale);
assertEquals("incorrect value", bA, aNumber.unscaledValue());
assertEquals("incorrect scale", aScale, aNumber.scale());
}
COM: <s> new big decimal big integer value int scale </s>
|
funcom_train/9049235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean acceptRow() {
Filter<Object> currentFilter;
// String currentCell;
Object data;
for (String dbid : parent.filterCriteria.keySet()) {
data = parent.model.getDataAt(modelIndex, dbid);
// currentCell = (data != null ? data.toString() : "");
currentFilter = parent.filterCriteria.get(dbid);
if (!currentFilter.accept(data)) {
return false;
}
}
return true;
}
COM: <s> decides whether a row should be included in the filtered dataset </s>
|
funcom_train/50919093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String output(Writer writer) throws CMLException, IOException {
/*
* -- StringWriter w = new StringWriter();
* PMRDOMUtil.outputEventStream(outputCML, w, PMRDOMUtil.PRETTY, 0); if
* (mdlMol != null) mdlMol.output(writer); writeData(writer); --
*/
// return writer.toString();
return null;
}
COM: <s> outputs cml as an rxn if possible </s>
|
funcom_train/48406313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addArtifactusePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ArtifactFragmentUseRelationship_artifactuse_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ArtifactFragmentUseRelationship_artifactuse_feature", "_UI_ArtifactFragmentUseRelationship_type"),
SpemxtcompletePackage.eINSTANCE.getArtifactFragmentUseRelationship_Artifactuse(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the artifactuse feature </s>
|
funcom_train/28427173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRounds(int rounds) {
if (getState() != UNINITIALIZED)
throw new IllegalStateException(getAlgorithm() +
": Cipher not in UNINITIALIZED state");
if (rounds < MIN_NOF_ROUNDS || rounds % 4 != 0)
throw new IllegalArgumentException(getAlgorithm() +
": Invalid number of rounds");
this.rounds = rounds;
}
COM: <s> sets the number of rounds for this cipher </s>
|
funcom_train/8477932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect(){
log(0, "Calling SDS.disconnect()...");
try{
if(logFileConn!=null){
logFileConn.close();
}
stopRead = true;
stopDownload = true;
stopTimer = true;
streamingPlayer.closeConnection();
if(feedToPlayer!=null){
feedToPlayer.close();
feedToPlayer = null;
}
log(0, "SDS.disconnect() - Successful");
} catch(Throwable t){
log(0, "FAILED! SDS.disconnect() - " + t.toString());
}
}
COM: <s> closes and cleans up connection media istream and feed to player </s>
|
funcom_train/21502454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMatrixPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ArrayType_matrix_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ArrayType_matrix_feature", "_UI_ArrayType_type"),
TypeSystemPackage.Literals.ARRAY_TYPE__MATRIX,
false,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the matrix feature </s>
|
funcom_train/32363236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toFront() {
control.toFront();
try {
control.setIcon(false);
} catch (PropertyVetoException x) {
log.warn(x);
}
try {
control.setSelected(true);
} catch (PropertyVetoException x) {
log.warn(x);
}
control.scrollRectToVisible(new Rectangle(0, 0, control.getWidth(), control.getHeight()));
}
COM: <s> brings undelying window on top of other windows </s>
|
funcom_train/21847807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackgroundDrawing(Boolean drawing) {
if (!isBackgroundDrawing().equals(drawing)) {
putProp(PROP_BACKGROUND_DRAWING, drawing);
firePropertyChange(PROP_BACKGROUND_DRAWING, null, null);
// force repaint of all documents
Settings.touchValue(null, null);
saveSetting(PROP_BACKGROUND_DRAWING, drawing);
}
}
COM: <s> setter for the background drawing property </s>
|
funcom_train/51346934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public boolean isMatch(ISPO spo) {
return ((p.isVar() || IVUtility.equals(p.get(), spo.p())) &&
(o.isVar() || IVUtility.equals(o.get(), spo.o())));
}
COM: <s> tests the p and o of the supplied spo against the constraint </s>
|
funcom_train/1344119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleGameEnding() {
mainFrame.getMainMenuBar().setGameState( GameStates.PLAYER_COLLECTING_CONNECTED ); // This has to be done first
gameSceneMainComponentHandler.getGameSceneComponent().setModelProvider( null );
gameCoreHandler = null;
gameManager.setMainComponentHandler( waitingAnimationMainComponentHandler );
}
COM: <s> handles ending of the game </s>
|
funcom_train/47139484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit (DataBasketCondition dbc) {
synchronized (getChildrenLock()) {
synchronized (getLogLock()) {
for (Iterator i = m_mpsdbChildren.values().iterator(); i.hasNext();) {
((SubDataBasket) i.next()).commit (dbc);
}
clean();
}
}
}
COM: <s> commit all items in all subbaskets that do match the given condition </s>
|
funcom_train/33134030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printResults() {
StringBuilder line = new StringBuilder();
addDatum(line, "Clients");
addDatum(line, numberOfClients);
endLine(line);
addDatum(line, "Amount");
addDatum(line, amount);
endLine(line);
addDatum(line, "Duration");
addDatum(line, duration);
endLine(line);
addDatum(line, "Total Throughput (b/s)");
addDatum(line, throughput(duration, numberOfClients * amount));
endLine(line);
System.out.println();
buildTaskHeader(line);
endLine(line);
for (EchoTask t : tasks) {
buildTaskLine(line, t);
endLine(line);
}
}
COM: <s> print benchmark results </s>
|
funcom_train/8065030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(int x, int y) {
if (!super.contains(x, y)) {
return false;
}
double dx = (double) (_x + _w / 2 - x) * 2 / _w;
double dy = (double) (_y + _h / 2 - y) * 2 / _h;
double distSquared = dx * dx + dy * dy;
return distSquared <= 1.01;
}
COM: <s> reply true if the given coordinates are inside the circle </s>
|
funcom_train/22213462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetEvent(AbstractTimerEvent ate) {
synchronized(ate) {
TimerQueue tq = ate.getTimerQueue() ;
// is it ours?
if (tq != this) {
// This will do the right thing...
ate.reset() ;
} else {
// re-program the event
timerQueueThread.resetEvent(ate) ;
}
}
}
COM: <s> reset an event </s>
|
funcom_train/14330189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resolver getBestResolver(ID id) throws ResolverException {
synchronized ( resolverMutex ) {
for ( int i = 0; i < resolvers.length; i++ )
if ( resolvers[i].isIDValid(id) )
return resolvers[i];
}
throw new ResolverException("No Resolver for '"+id+"'");
}
COM: <s> get best resolver returns the most appropriate resolver for the </s>
|
funcom_train/35285067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Geometry createWaterGeometry(float width, float height) {
Quad quad = new Quad(width, height);
Geometry geom = new Geometry("WaterGeometry", quad);
geom.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
geom.setMaterial(material);
return geom;
}
COM: <s> creates a quad with the water material applied to it </s>
|
funcom_train/10749206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThread_NotDaemon() {
ThreadRunningAnotherThread t = new ThreadRunningAnotherThread();
t.setDaemon(false);
t.start();
t.stop = true;
try {
t.join();
} catch (InterruptedException e) {
fail(INTERRUPTED_MESSAGE);
}
assertFalse("the child thread of a non-daemon thread is daemon",
t.childIsDaemon);
}
COM: <s> verify that a thread created by a non daemon thread is not daemon </s>
|
funcom_train/4403447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public LightSensor addLightSensor(Agent agent) {
double agentHeight = agent.getHeight();
LightSensor sensor = new LightSensor();
sensor.setUpdatePerSecond(3);
sensor.setName("Light Sensor");
Vector3d pos = new Vector3d(0.0, (agentHeight / 2), 0);
agent.addSensorDevice(sensor, pos, -Math.PI / 2);
return sensor;
}
COM: <s> adds a prebuild light sensor to the agent </s>
|
funcom_train/39479977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PCChoiceGenerator getPreviousPCCG(ChoiceGenerator<?> cg) {
ChoiceGenerator<?> prev_cg;
if (cg == null)
return null;
prev_cg = cg.getPreviousChoiceGenerator();
while (prev_cg != null && !(prev_cg instanceof PCChoiceGenerator)) {
prev_cg = prev_cg.getPreviousChoiceGenerator();
}
return (PCChoiceGenerator) prev_cg;
}
COM: <s> get the program condition choice generator for the state before the </s>
|
funcom_train/3813300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(long time) {
if (startTime != 0L) {
notReliable = true; // start called while timer already running
System.out.println
(getName() + " timer.start() called without a stop()");
}
if (time > System.currentTimeMillis()) {
throw new IllegalStateException
("Start time is later than current time");
}
startTime = time;
}
COM: <s> starts the timer at the given time </s>
|
funcom_train/10660100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNameSpaceFromEncoding_RFC1779() throws Exception {
byte[] mess = { 0x30, 0x0E, 0x31, 0x0C, 0x30, 0x0A, 0x06, 0x03, 0x55,
0x04, 0x03, 0x13, 0x03, 0x20, 0x41, 0x20, };
X500Principal principal = new X500Principal(mess);
String s = principal.getName(X500Principal.RFC1779);
assertEquals("CN=\" A \"", s);
}
COM: <s> inits x500 principal with byte array where there are leading and tailing spaces </s>
|
funcom_train/19617011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(ComponentContext cc) throws ComponentExecutionException, ComponentContextException {
String sObject = cc.getDataComponentFromInput("object").toString();
++lObjectsPrinted;
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if ( bPrintCount )
ps.print("P"+lObjectsPrinted+"\t");
ps.println(sObject);
//ps.flush();
}
COM: <s> this method just pushes a concatenated version of the entry to the </s>
|
funcom_train/943801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createURIFromLabel(String label, String className) {
// append an underscore to prevent it from being same as a class URI
String localName = "_"+maybeLegalizeLocalName(label.trim());
String uri;
if (!isValidLocalNameForURI(localName))
localName = className + InstanceWorld.getRandom();
uri = this.getPersonalNamespace() + localName;
return uri;
}
COM: <s> create a uri from label by prepending the personal namespace uri </s>
|
funcom_train/3107389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean freeUploadSlot(IConnection conn) {
// if the Connection has reserved an upload slot
if (uploadConnections.contains(conn)) {
settings.releaseUploadSlot();
uploadConnections.remove(conn);
logger.debug("Released upload slot for " + conn);
displayInfo();
return true;
// if the Connection has not reserved an upload slot
} else {
logger.debug("Not used as UploadConnection.");
return false;
}
}
COM: <s> free an upload slot which has been reserved for the given connection </s>
|
funcom_train/4193988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onIncomingConnection(TcpServer tcp_server, TcpSocket socket)
{ printLog("incoming connection from "+socket.getAddress()+":"+socket.getPort(),LogLevel.MEDIUM);
ConnectedTransport conn=new TcpTransport(socket,this);
printLog("tcp connection "+conn+" opened",LogLevel.MEDIUM);
addConnection(conn);
}
COM: <s> when a new incoming connection is established </s>
|
funcom_train/51342573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parseValue(String text) {
for (int i = 0; i < formats.length; i++) {
try {
Format f = formats[i];
if (f instanceof DateFormat) {
return ((DateFormat) f).parse(text);
} else if (f instanceof NumberFormat) {
return ((NumberFormat) f).parse(text);
} else
throw new AssertionError();
} catch (NumberFormatException ex) {
// ignore.
} catch (ParseException ex) {
// ignore.
}
}
return text;
}
COM: <s> attempts to interpret the character data as a date time </s>
|
funcom_train/41108064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws PluginException {
_markdownExecution = _servletConfig.getInitParameter(PLUGIN_MARKDOWN_EXECUTION_IP);
if (BlojsomUtils.checkNullOrBlank(_markdownExecution)) {
if (_logger.isErrorEnabled()) {
_logger.error("No Markdown execution string provided. Use initialization parameter: " + PLUGIN_MARKDOWN_EXECUTION_IP);
}
}
}
COM: <s> initialize this plugin </s>
|
funcom_train/9293830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Advisor buildAdvisor(ResultSet results){
Advisor advisor = new Advisor();
try{
advisor.setId(results.getInt(1));
advisor.setUserName(results.getString(2));
advisor.setPassword(results.getString(3));
}
catch(Exception e)
{
System.out.println("error in building the member object + " +e.toString());
}
return advisor;
}
COM: <s> this method builds an advisor object given data from advisor table </s>
|
funcom_train/12180992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateQName(String existingQName, String localName) {
int index;
if ((index = existingQName.indexOf(':')) >= 0) {
StringBuffer sb =
new StringBuffer(index + 1 + localName.length());
sb.append(existingQName.substring(0, index + 1)).append(localName);
localName = sb.toString();
}
return localName;
}
COM: <s> helper method that constructs a qualified name from an existing qname </s>
|
funcom_train/10906421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPageMode() {
PDFName mode = (PDFName)get("PageMode");
if (mode != null) {
for (int i = 0; i < PAGEMODE_NAMES.length; i++) {
if (PAGEMODE_NAMES[i].equals(mode)) {
return i;
}
}
throw new IllegalStateException("Unknown /PageMode encountered: " + mode);
} else {
return PAGEMODE_USENONE;
}
}
COM: <s> returns the currently active page mode </s>
|
funcom_train/27824344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int column) {
switch (column) {
case 0:
return m_oimodelerViewable.getModule().getAppDriver().getLocalizationManager().getPhrase("oimodeler.entityName");
case 1:
return " ";
case 2:
default:
return m_oimodelerViewable.getModule().getAppDriver().getLocalizationManager().getPhrase("oimodeler.value");
}
}
COM: <s> returns the name of the column with given index </s>
|
funcom_train/30006192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getAppearanceCheckBox() {
if (this.appearanceCheckBox == null) {
this.appearanceCheckBox = new JCheckBox();
this.appearanceCheckBox.setText(LanguageController.getInstance().getString(
"Settings_Dialog_Appearance_Checkbox"));
this.appearanceCheckBox.setSelected(MainController.getInstance().isSystemStyle());
}
return this.appearanceCheckBox;
}
COM: <s> gets the appearance check box </s>
|
funcom_train/27835221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newRow() {
if (!_readOnly) {
String sql_query = "INSERT INTO " + _tableName + " ("
+ getPrimaryKey() + ") VALUES ('0')";
if (executeUpdate(sql_query)) {
addRow(new Vector());
super.setValueAt("0", getRowCount() - 1,
getColumnNumber(getPrimaryKey()));
}
}
}
COM: <s> inserts a new row into the table </s>
|
funcom_train/33853889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IMarker marker) {
checkForNull(marker, "marker");
try {
// do NOT inline this method invocation
runInternal(marker);
} catch (BugResolutionException e) {
reportException(e);
} catch (JavaModelException e) {
reportException(e);
} catch (BadLocationException e) {
reportException(e);
} catch (CoreException e) {
reportException(e);
}
}
COM: <s> runs the code bug resolution code on the given code imarker code </s>
|
funcom_train/24365783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePanel() {
// load content if panel was hidden till yet
if(view == null && info.isVisible()) {
loadView();
add(view, BorderLayout.CENTER);
}
titlePanel.setVisible(dockManager.getLayout().isTitleBarVisible());
// update the title bar if necessary
if(dockManager.getLayout().isTitleBarVisible()) {
updateTitleBar();
}
}
COM: <s> update the panel </s>
|
funcom_train/167823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void analyze(double t) {
if (isOpen) {
if (t < onset)
return;
if (offset < t){
if (isOpen) {
end();
}
return;
}
if (t < nextTime - epsilon)
return;
nextTime += interval;
try {
String s = Double.toString(t) + MakeValueLine();
csvFile.write(s);
csvFile.newLine();
log.debug(s);
} catch (IOException e) {
log.error("couldn't write", e);
}
}
}
COM: <s> call make value line to write current value </s>
|
funcom_train/2581827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod next() {
Quarter result;
if (this.quarter < LAST_QUARTER) {
result = new Quarter(this.quarter + 1, this.year);
}
else {
if (this.year < 9999) {
result = new Quarter(FIRST_QUARTER, this.year + 1);
}
else {
result = null;
}
}
return result;
}
COM: <s> returns the quarter following this one </s>
|
funcom_train/46737946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSystemRef(DisplayModel systemRef) {
if (Converter.isDifferent(this.systemRef, systemRef)) {
DisplayModel oldsystemRef= new DisplayModel(this, 100100);
oldsystemRef.copyAllFrom(this.systemRef);
this.systemRef.copyAllFrom(systemRef);
setModified("systemRef");
firePropertyChange(String.valueOf(CUSTOMCONTROLLERS_SYSTEMREFID), oldsystemRef, systemRef);
}
}
COM: <s> identifies the system which originally created this efs on icon </s>
|
funcom_train/18485705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String name, String value) throws DOMException {
if (domNode.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element) domNode;
element.setAttribute(name, value);
fireAttributeChanged(this, name);
} else {
throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
"Only Element Nodes can have attributes");
}
} //}}}
//{{{ getAttribute()
COM: <s> p sets an attribute of this node </s>
|
funcom_train/28209041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CTabItem getResultsTab(/* AbstractSQLExecution sqlExec OHA */) {
// oha
Object sqlExec = null; // oha
CTabItem[] items = tabFolder.getItems();
for (int i = 0; i < items.length; i++)
if (items[i].getData() == sqlExec) {
return items[i];
}
return null;
}
COM: <s> converts an abstract sqlexecution into its tab item </s>
|
funcom_train/27728799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double get_omega_e(Time t){
// Variables
double Mjd_0;
// Mean Sidereal Time
Mjd_0 = Math.floor(t.mjd_ut1());
double Tu = (Mjd_0 - TimeUtils.MJD_J2000)/36525.0;
return 7292115.8553e-11 + 4.3e-15 * Tu;
}
COM: <s> return the dynamic rotation rate of the earth at the given time </s>
|
funcom_train/35725504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stepOnUp() {
int[] newPos = new int[2];
int newWay;
if (direction == 0) {
newWay = -1;
} else newWay = 1;
newPos[0] = position[0] + newWay;
newPos[1] = position[1] + 1;
map.remove(this, position);
map.put(this, newPos);
}
COM: <s> the lemming steps forward and up in old direction </s>
|
funcom_train/17206543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSpaceInfo(Offset size) {
// - sprintf(tmp, "Current Size: %s\n", gcspy_formatSize(size));
Address tmp = GCspy.util.formatSize("Current Size: %s\n", 128, size.toInt());
serverSpace.spaceInfo(tmp);
GCspy.util.free(tmp);
}
COM: <s> set space info </s>
|
funcom_train/36930243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void message(int theStatus) throws InvalidMidiDataException{
// check for valid values
int dataLength = getDataLength(theStatus); // can throw InvalidMidiDataException
if (dataLength != 0){
throw new InvalidMidiDataException("Status byte; " + theStatus + " requires " + dataLength + " data bytes");
}
message(theStatus, 0, 0);
}
COM: <s> sets the parameters for a midi message that takes no data bytes </s>
|
funcom_train/51788065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUpperPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MultiplicityElement_upper_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_upper_feature", "_UI_MultiplicityElement_type"),
UMLPackage.Literals.MULTIPLICITY_ELEMENT__UPPER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the upper feature </s>
|
funcom_train/3609355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char readChar() throws java.io.IOException {
if (inBuf > 0) {
--inBuf;
if (++bufpos == bufsize) {
bufpos = 0;
}
return buffer[bufpos];
}
if (++bufpos >= maxNextCharInd) {
FillBuff();
}
char c = buffer[bufpos];
UpdateLineColumn(c);
return c;
}
COM: <s> read a character </s>
|
funcom_train/18472818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() throws IOException {
// initalize the lookahead
if (lookaheadChar == UNDEFINED) {
lookaheadChar = super.read();
}
lastChar = lookaheadChar;
if (super.ready()) {
lookaheadChar = super.read();
} else {
lookaheadChar = UNDEFINED;
}
if (lastChar == '\n') {
lineCounter++;
}
return lastChar;
}
COM: <s> reads the next char from the input stream </s>
|
funcom_train/28347228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void update() {
synchronized (syncObjInernal) {
stackSize++;
if(stackSize > 100000000){
stackSize = 0;
}
}
if (updateInProgress) {
return;
}
updateInProgress = true;
if (!threadInProgress) {
Thread execThread = new Thread(updateRun);
execThread.start();
}
}
COM: <s> makes necessary action for registered listeners </s>
|
funcom_train/49995285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAxisLabel(String type, List<String> labels, String color) {
this.axisTypes.add(type);
this.axisLabels.add(labels);
this.axisMaxRange.add(new ArrayList<Double>());
this.axisColor.add(color);
}
COM: <s> add a label with given label values </s>
|
funcom_train/4299381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resolveInsertParameterTypes() {
for (int i = 0; i < select.iResultLen; i++) {
Expression colexpr = select.exprColumns[i];
if (colexpr.getDataType() == Types.NULL) {
Column col = targetTable.getColumn(columnMap[i]);
colexpr.setDataType(col.getType());
}
}
}
COM: <s> for parameters in insert values and insert select lists </s>
|
funcom_train/4880305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Ticker getTicker () {
if (ticker == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
ticker = new Ticker ("Ser\u00E3o removidas todas as faltas da mat\u00E9ria");//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return ticker;
}
COM: <s> returns an initiliazed instance of ticker component </s>
|
funcom_train/125036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateColWidthForHeader() {
if (dataTable != null && dataTable.isDynamicColumnWidth()) {
int i = getColumnHeaderDataTable().maxCellLength();
int j = dataTable.maxCellLength();
int max = Math.max(i, j);
dataTable.setColumnWidth(max);
getColumnHeaderDataTable().setColumnWidth(max);
}
}
COM: <s> syncs column width for column header and data </s>
|
funcom_train/3343429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage createCompatibleImage(int w, int h, int transparency) {
if (transparency == Transparency.TRANSLUCENT)
return new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
else
// todo handle Transparency.BITMASK
return new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
}
COM: <s> returns a buffered image that supports the specified transparency and has </s>
|
funcom_train/34044958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLineW(double x1, double y1, double x2, double y2) {
g2d_.drawLine(coords_.xToScreen(x1), coords_.yToScreen(y1),
coords_.xToScreen(x2), coords_.yToScreen(y2));
}
COM: <s> draws a line on the canvas given world rather than screen coordinates </s>
|
funcom_train/48983362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String list() {
//noteList = noteRemote.getByUser(getAuthenticatedUser().getId());
Calendar c = Calendar.getInstance();
month = c.get(Calendar.MONTH) + 1;
day = c.get(Calendar.DAY_OF_MONTH);
year = c.get(Calendar.YEAR);
dateNote = month + "/" + day + "/" + year;
return "list";
}
COM: <s> retrieves a list of notes </s>
|
funcom_train/47183995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkOfficeVisitExists(long ovID, long pid) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("SELECT * FROM OfficeVisits WHERE ID=? AND PatientID=?");
ps.setLong(1, ovID);
ps.setLong(2, pid);
ResultSet rs = ps.executeQuery();
return rs.next();
} catch (SQLException e) {
e.printStackTrace();
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
COM: <s> returns whether or not an office visit actually exists </s>
|
funcom_train/32823605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWebServicePasswordPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Workflow_webServicePassword_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Workflow_webServicePassword_feature", "_UI_Workflow_type"),
ModelPackage.eINSTANCE.getWorkflow_WebServicePassword(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the web service password feature </s>
|
funcom_train/25282334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAllZonesToGUI() {
int zonenumber;
for (final Zone z : data.zones.getAllZones())
if (z != null) {
zonenumber = z.getZoneNumber();
PManager.getDefault().drw_zns.addZoneToTable(
Integer.toString(zonenumber),
Shape.color2String(shape_controller.getShapeByNumber(
zonenumber).getColor()),
ZoneType.zoneType2String(z.getZoneType()));
}
}
COM: <s> adds all zones in the collectoin to the gui table </s>
|
funcom_train/44707922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAssociation() {
m_article.addImage(m_image, "testCaption");
m_article.save();
ImageAssetCollection images = m_article.getImages();
assertTrue(images.next());
ImageAsset i = images.getImage();
assertEquals(m_image, i);
assertTrue(!images.next());
images.close();
}
COM: <s> test basic association </s>
|
funcom_train/40061889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getHolidayRequests(EntityManager entityManager) {
List<HolidayRequest> allHolidayRequests = HolidayRequest.
getHolidaysForEmployeeAndDateRange(entityManager,
employee, dateRange).getResultList();
holidayRequests.clear();
unapprovedHolidayRequests.clear();
for (HolidayRequest holidayRequest : allHolidayRequests) {
if (holidayRequest.isApproved()) {
holidayRequests.add(holidayRequest);
} else {
unapprovedHolidayRequests.add(holidayRequest);
}
}
}
COM: <s> simply get details of any holiday requests that touch the period </s>
|
funcom_train/43372811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String stopTimer(){
long currentTime = System.currentTimeMillis();
long elapsed = currentTime - startTime;
SimpleDateFormat dateFormat = new SimpleDateFormat(strDateFormat);
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
return dateFormat.format(new Date(elapsed))+" ("+strDateFormat+")";
}
COM: <s> stops timer and returns elapsed time </s>
|
funcom_train/205625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("name")){
//label.setText((String) evt.getNewValue());
}
if (evt.getPropertyName().equals("file")){
//label.setText("file: "+(String) evt.getNewValue());
}
}
COM: <s> instead of include file </s>
|
funcom_train/11732909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ISMLockingFactory getISMLockingFactory(final Element parent) {
return new ISMLockingFactory() {
public ISMLocking getISMLocking() throws RepositoryException {
Element element = getElement(parent, ISM_LOCKING_ELEMENT, false);
if (element != null) {
return parseBeanConfig(element).newInstance(ISMLocking.class);
} else {
return new DefaultISMLocking();
}
}
};
}
COM: <s> returns an ism locking factory that creates </s>
|
funcom_train/8113257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateExcessLevel(final int guid, final boolean excess) {
try {
this.getJdbcTemplateWriter().update(
this.getSQL().getValue("rotation/updateRotationExcess"),
new Object[] {excess, guid});
} catch (DataAccessException de) {
dataLogger.error("Error updating excess flag of rotation guid: "
+ guid + ", " + de.getMessage());
}
}
COM: <s> update excess level </s>
|
funcom_train/26515002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage (String performative, String content, String target) {
FIPAPerformative perf = new FIPAPerformative (performative);
perf.setContent(content);
perf.setReceiver (target);
OutTray transport = agentContext.getTransportFactory(target);
javax.agent.Envelope env = msg.jasEnvelope(target,thisAddress);
transport.send(env);
}
COM: <s> send message can be used to send a message to another agent </s>
|
funcom_train/36254479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node assignNode(int posVM, int posNode, short state) {
Node node = null;
if (posVM >= 0 && posNode >= 0) {
String vmId = (String) this.vms.get(posVM);
String posNodeId = onNodes.get(posNode);
node = nodes.get(posNodeId);
node.add(vmId);
vmNode.put(vmId, node.id);
vmState.put(vmId, state);
}
return node;
}
COM: <s> assign a vm to a given node </s>
|
funcom_train/8072912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuilder text(String forTag) throws IOException {
StringBuilder result=new StringBuilder();
while(true) {
int c=read();
if(c==-1) break;
if(c==-2) result.append(forTag);
else result.append((char)c);
}
return(result);
}
COM: <s> returns the entire text </s>
|
funcom_train/7372033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandleSpec getOutputSpec() {
List<HandleSpec> outputSpecs = getHandleSpecs(Handle.OUTPUT);
if (outputSpecs == null || outputSpecs.size() == 0) {
addHandleSpec(Handle.OUTPUT, new HandleSpec("stdout", PigStreaming.class.getName()));
}
return getHandleSpecs(Handle.OUTPUT).get(0);
}
COM: <s> get the specification of the primary output of the </s>
|
funcom_train/9878675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createBtnsPanel(ActionListener listener) {
JPanel panel = new JPanel();
JButton okButton = new JButton("OK");
okButton.setActionCommand("ok-command");
okButton.addActionListener(listener);
panel.add(okButton);
getRootPane().setDefaultButton(okButton);
return panel;
}
COM: <s> creates a panel with ok button </s>
|
funcom_train/18381275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGlassPane(Component glassPane) {
if(root instanceof JFrame)
((JFrame)root).setGlassPane(glassPane);
else if(root instanceof JApplet)
((JApplet)root).setGlassPane(glassPane);
else if(root instanceof JWindow)
((JWindow)root).setGlassPane(glassPane);
else if(root instanceof JDialog)
((JDialog)root).setGlassPane(glassPane);
}
COM: <s> sets the code glass pane code property for the wrapped component </s>
|
funcom_train/16222185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONArray getJSONArray( String key ) {
verifyIsNull();
Object o = get( key );
if( o != null && o instanceof JSONArray ){
return (JSONArray) o;
}
throw new JSONException( "JSONObject[" + JSONUtils.quote( key ) + "] is not a JSONArray." );
}
COM: <s> get the jsonarray value associated with a key </s>
|
funcom_train/49049434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getComment(Locale locale) {
StmtIterator stmtIter = term.listProperties(RDFS.comment);
Statement stmt = findStatementWithLanguage(stmtIter,
locale.getLanguage());
if (stmt == null) {
stmtIter = term.listProperties(RDFS.label);
stmt = findStatementWithLanguage(stmtIter, "en");
}
return stmt.getString();
}
COM: <s> gets the rdf comment of the term given a locale </s>
|
funcom_train/31890762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incommingMessage(BeeMessage message) {
// String sender = getSender(message);
String roompath = message.getBody().getRootElement().element("roompath").getText();
RoomWindow window = (RoomWindow) openWindows.get(roompath);
if(window!=null) {
window.addMessage(message.getBody());
}
}
COM: <s> adds the message to appropriate window </s>
|
funcom_train/3361525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAttribute(String name, int scope) {
switch (scope) {
case ENGINE_SCOPE:
return engineScope.get(name);
case GLOBAL_SCOPE:
if (globalScope != null) {
return globalScope.get(name);
}
return null;
default:
throw new IllegalArgumentException("Illegal scope value.");
}
}
COM: <s> gets the value of an attribute in a given scope </s>
|
funcom_train/2604469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point2D computeLayoutOrigin() {
Dimension size = getPreferredSize();
Point2D.Float origin = new Point2D.Float();
origin.x = (float) (size.width - textLayout.getAdvance()) / 2;
origin.y = (float) (size.height - textLayout.getDescent() + textLayout.getAscent()) / 2;
return origin;
}
COM: <s> compute a location within this component for text layouts origin </s>
|
funcom_train/11705116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toXML(Writer aWriter) throws SAXException, IOException {
XMLSerializer sax2xml = new XMLSerializer(aWriter);
ContentHandler contentHandler = sax2xml.getContentHandler();
contentHandler.startDocument();
toXML(sax2xml.getContentHandler(), true);
contentHandler.endDocument();
}
COM: <s> writes out this objects xml representation </s>
|
funcom_train/26068621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeDepth(int newDepth, float time, GasSource source) throws MaxPo2ExceededException {
final double po2i = source.pO2AtDepth(mDepth, mSurfacePressure, mUnits);
final double po2f = source.pO2AtDepth(mDepth, mSurfacePressure, mUnits);
mCns += getCNSPerMinute(po2i, po2f) * time;
mOtu += getOTUPerMinute(po2i, po2f) * time;
}
COM: <s> execute a depth change on the cns otu model and compute the result </s>
|
funcom_train/45623122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHostInBrowserPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_hostInBrowser_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_hostInBrowser_feature", "_UI_DocumentRoot_type"),
MSBPackage.eINSTANCE.getDocumentRoot_HostInBrowser(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the host in browser feature </s>
|
funcom_train/31668767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double calcXMin() {
double xmin = Double.POSITIVE_INFINITY;
for (int i = 0; i < gridWidth; i++)
for (int j = 0; j < gridHeight; j++)
if(grid[i][j].x < xmin)
xmin = grid[i][j].x;
return xmin;
}
COM: <s> calc xmin finds the minimum x value contained in the </s>
|
funcom_train/1303252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(DataOutput dataOutput) throws IOException {
dataOutput.writeUTF(label == null ? "" : label);
dataOutput.writeInt(n);
dataOutput.writeDouble(sum);
dataOutput.writeDouble(sos);
dataOutput.writeDouble(min);
dataOutput.writeDouble(max);
}
COM: <s> serializes this object to the specified data output </s>
|
funcom_train/18952796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (logger.isDebugEnabled()) {
logger.debug("toString() - start");
}
String returnString = "ValidationErrors " + errors.toString();
if (logger.isDebugEnabled()) {
logger.debug("toString() - end - return value = " + returnString);
}
return returnString;
}
COM: <s> overridden to show you the errors this object contains </s>
|
funcom_train/8525604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePatternMapping(String regexp) {
String existingMapping = serviceMap.remove(Pattern.compile(regexp));
if (existingMapping != null) {
LOG.info("Removed mapping '{}' for service '{}'", regexp, existingMapping);
} else {
LOG.warn("Mapping '{}' wasn't found and can't be removed", regexp);
}
}
COM: <s> remove a mapping for a given regexp </s>
|
funcom_train/40627437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addEvent(Domain aDomain, UserInfo aUserInfo, Event anEvent) {
if(isEventValid(anEvent, aUserInfo.getEventFilter(aDomain))) {
aUserInfo.addEvent(aDomain, anEvent);
LOG.debug(anEvent + " for user \"" + aUserInfo + "\".");
}
}
COM: <s> adds an event to a user in a domain </s>
|
funcom_train/45692234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReservedLongPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GlobalParameters_reservedLong_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GlobalParameters_reservedLong_feature", "_UI_GlobalParameters_type"),
EsxPackage.Literals.GLOBAL_PARAMETERS__RESERVED_LONG,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the reserved long feature </s>
|
funcom_train/18874891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image load(Object s) {
if(s instanceof Landscape){
return mImageLoader.loadImage((Landscape)s);
}
if(s instanceof Unit){
return mImageLoader.loadUnitMapImage((Unit)s);
}
if("sel".equals(s)){
return mImageLoader.loadSelectionImage();
}
if("actionselect".equals(s)){
return mImageLoader.loadActionMarkImage();
}
else return null;
}
COM: <s> helper method to load an image </s>
|
funcom_train/2948292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
if (t == null) {
startTimer();
}
//last_probe= probe;
// probe = "open";
if (DEBUG) {
System.err.println(thisObjectTicket + "DataSource: open()");
}
return getConnectionFromPool(); // is an EnanchedConnection object
}
COM: <s> get a connection from the pool </s>
|
funcom_train/33265021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDisabledImage( Image disabledImage ) {
synchronized(getTreeLock()) {
if ( this.disabledImage != disabledImage ) {
this.disabledImage = disabledImage;
if ( disabledImage == null ) {
disabledImageSet = false;
}
else {
disabledImageSet = true;
}
if ( ! tiled && ! stretched ) {
invalidate();
}
if ( ! isFunctioning() ) {
repaint();
}
}
}
}
COM: <s> set disabled image </s>
|
funcom_train/964959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
CellConstraints c = (CellConstraints) super.clone();
c.insets = (Insets) insets.clone();
return c;
} catch (CloneNotSupportedException e) {
// This shouldn't happen, since we are Cloneable.
throw new InternalError();
}
}
COM: <s> creates a copy of this cell constraints object </s>
|
funcom_train/5668826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetButtonPressed()
{
ListIterator it = params.listIterator();
Parameter p;
while (it.hasNext()) //While the linked list has another element
{
p = (Parameter)it.next();
if (!mainWin.startedRun() || p.isEditable())
p.reset(); //Reset the parameter to the default value;
}
}
COM: <s> resets all the params to their default vals </s>
|
funcom_train/38736853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyMulticast(Message message) {
String nameSource = message.getMessageSource();
String nameDestination = nameSource;
int randomNumber;
if (dataStructure.size() != 1) {
while (nameSource.equals(nameDestination)) {
randomNumber = (int) (Math.random() * dataStructure.size());
nameDestination = names.get(randomNumber);
}
Observer<Message> observer;
observer = dataStructure.get(nameDestination);
observer.update(message);
}
super.notifyMessage(message);
}
COM: <s> notify multicast message </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.