__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46944518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdate() {
System.out.println("testUpdate");
for (int n = 100; n <= 100000; n = n*10) {
for (double p = 0.00001; p <= 0.001; p=p*10) {
for (int d = 1; d <= 10000; d=d*100)
doTest(n, p, d);
}
}
}
COM: <s> test random updates in the dynamic heap </s>
|
funcom_train/18972108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateServerMemberFromSelectedSets() {
// First clear all HarvestTags from the serverMember
serverMember.getHarvestDetails().getHarvestTags().clear();
// Now add back only the Sets selected in the form
Iterator iter = this.availableSetList.iterator();
while (iter.hasNext()) {
AvailableSet availableSet = (AvailableSet) iter.next();
if (availableSet.isSelected()) {
serverMember.getHarvestDetails().getHarvestTags().add(
availableSet.getHarvestTag());
}
}
}
COM: <s> update the forms server member object so it contains only the harvest tags </s>
|
funcom_train/19431255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFirstIndexOfSuit(final Suit suit, final boolean includeJacks) {
int result = -1;
int index = 0;
for (Card card : cards) {
if (result == -1 && card.getSuit() == suit) {
if (card.getRank() != Rank.JACK || (card.getRank() == Rank.JACK && includeJacks)) {
result = index;
}
}
index++;
}
return result;
}
COM: <s> returns the first index of a card with the given suit </s>
|
funcom_train/40543046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSqlRealPathRoot(String type) {
String dbType = serverProperties.getProperty("jdbc.dbtype");
String sqlPath = "/WEB-INF/sql/" + dbType + "/" + type;
// Note: getRealPath may not work in all application servers
return servletContext.getRealPath(sqlPath);
}
COM: <s> get the full path of the databases create upgrade files directory </s>
|
funcom_train/22402314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws Exception {
if( position == null)
throw new NullPointerException( "Position of the Toolbar " + this + " is null");
else if( position != NORTH && position != SOUTH && position != EAST && position != WEST)
throw new Exception( "Unknow position " + position + " of the toolbar " + this);
if( buttons.size() < 1)
throw new Exception( "Toolbar " + this + " hasn't any Button, CheckBox or RadioButton");
}
COM: <s> verifies that all the values of the toolbar are correct </s>
|
funcom_train/3133758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
return name+"="+value+"; version="+
version +(path ==null ?"":"; path="+path)+
(domain ==null ?"": "; domain="+domain)+
(expiry < 0 ? "" : "; max-age="+expiry)+
(secure ? "; secure;" : ";");
}
COM: <s> the code to string code method converts the cookie to the </s>
|
funcom_train/33552809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeKeyActions(KeyEvent e) {
Object source = e.getSource();
// Get the key typed
char keyChar = e.getKeyChar();
KeyStroke keyStroke = KeyStroke.getKeyStroke(keyChar, 0);
// Execute all actions associated with this keyStroke
List<ActionListener> list = this.keyBindings.get(keyStroke);
if ( list != null ) {
for ( ActionListener action : list ) {
executeAction( action, source, null );
}
}
}
COM: <s> invokes all actions that should execute when a specific key is typed </s>
|
funcom_train/8639617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PdfTemplate getLayer(int layer) {
if (layer < 0 || layer >= app.length)
return null;
PdfTemplate t = app[layer];
if (t == null) {
t = app[layer] = new PdfTemplate(writer);
t.setBoundingBox(rect);
writer.addDirectTemplateSimple(t, new PdfName("n" + layer));
}
return t;
}
COM: <s> gets a template layer to create a signature appearance </s>
|
funcom_train/50813674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNextIntBoundSequence() {
testNextDoubleSequence() ;
int[] result = new int[ 3 ] ;
for ( int i = 0 ; i < 3 ; i++ ) {
result[ i ] = deterministicRandom.nextInt() ;
}
boolean theResult = ( result[ 0 ] == 12 ) &&
( result[ 1 ] == 13 ) &&
( result[ 2 ] == 14 ) ;
assertEquals( theResult, true ) ;
}
COM: <s> test the next int int method of the </s>
|
funcom_train/26091612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getMenuFinanceiro() {
if (menuFinanceiro == null) {
menuFinanceiro = new JMenu();
menuFinanceiro.setBounds(new Rectangle(0, 0, 85, 19));
//menuFinanceiro.setVisible(true);
//TODO: Alteracao para a ativ. 3
menuFinanceiro.setText(I18nManager.getInstance().getPropriedadeString("menu.financeiro"));
}
return menuFinanceiro;
}
COM: <s> this method initializes menu financeiro </s>
|
funcom_train/40359620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAuthenticateRepositoryException() throws Exception {
instantiator.addConnector(connectorName, new MockConnector(null,
new ExceptionalAuthenticationManager(new RepositoryException()),
null, null));
AuthenticationResponse response =
manager.authenticate(connectorName, identity);
assertNotNull(response);
assertFalse(response.isValid());
assertNull(response.getData());
assertNull(response.getGroups());
}
COM: <s> test authenticate throws repository exception </s>
|
funcom_train/25421302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCaption() {
if (_caption.length() > 0) {
return _caption;
} else if (getCaptionResourceKey().length() > 0) {
MessageBroker broker = getContextBroker().extractMessageBroker();
return broker.retrieveMessage(getCaptionResourceKey());
} else {
return "???Caption";
}
}
COM: <s> gets the page caption </s>
|
funcom_train/17818170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPoint(Point2D.Double p, int position) {
x.add(p.x, position);
dx.add(p.x, position);
y.add(p.y, position);
dy.add(p.y, position);
createPolygon();
}
COM: <s> sets the posistion in the polygon specified to the point specified </s>
|
funcom_train/13720150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getGainDiffForPID() throws InterruptedException, IOException {
isActive(true);
try{
byte[] response = getSetting(GAINDIFFPID);
// If we got this far, we should have a response
return (byte)MathUtilities.hex2int(response);
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Unable to getGainDIFFForPID", e);
throw e;
}catch(IOException e){
logger.log(Level.SEVERE, "Unable to getGainDIFFForPID", e);
throw e;
}
}
COM: <s> this command requests the current gain diff for pid setting from the </s>
|
funcom_train/7265658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeNodeID() {
KUID newID = KUID.createRandomID();
if (LOG.isInfoEnabled()) {
LOG.info("Changing local Node ID from " + getLocalNodeID() + " to " + newID);
}
setLocalNodeID(newID);
purgeDatabase();
}
COM: <s> generates a new random node id for the local node </s>
|
funcom_train/50328790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure() {
// connect to the traffic controller
JMRIClientTrafficController control = new JMRIClientTrafficController();
control.connectPort(this);
adaptermemo.setJMRIClientTrafficController(control);
adaptermemo.configureManagers();
//adaptermemo.configureCommandStation();
// mark OK for menus
jmri.jmrix.jmriclient.ActiveFlag.setActive();
}
COM: <s> set up all of the other objects to operate with an jmri </s>
|
funcom_train/37263626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRequired() {
if(this.jvmVersion == null && this.classname == null)
return true;
if(this.jvmVersion != null && !JavaVersion.getJavaVersion().isCompliant(this.jvmVersion))
return true;
if(this.classname != null) {
try {
Class.forName(classname);
}catch(Exception e) {
return true;
}
}
return false;
}
COM: <s> checks if the given dependency is required in </s>
|
funcom_train/3087036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element renderSupportElements(Menu parentMenu, Element parent) {
if (parentMenu == null)
return parent;
if (! parentMenu.isHorizontal()) {
Element tr = new Element(ElementNames.TR); parent.add(tr);
parent = tr; tr.setWhitespaceRelevant(true);
}
Element td = new Element(ElementNames.TD); parent.add(td);
td.addAttribute("valign","middle"); td.addAttribute("align","left");
td.setWhitespaceRelevant(true);
return td;
}
COM: <s> assumes that the menu box render left us with a table tr outstanding </s>
|
funcom_train/20748587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void incrementDealerPosition() {
int nbPlayers = this.players.size();
if (getDealerPosition() >= nbPlayers - 1) {
if (logger.isDebugEnabled()) {
logger.debug("next dealerPosition is 0");
}
setDealerPosition(0);
return;
}
if (logger.isDebugEnabled()) {
logger.debug("next dealerPosition is " + (getDealerPosition() + 1));
}
setDealerPosition(getDealerPosition()+1);
}
COM: <s> increment the dealer position </s>
|
funcom_train/9367639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BluetoothPbap(Context context, ServiceListener l) {
mContext = context;
mServiceListener = l;
if (!context.bindService(new Intent(IBluetoothPbap.class.getName()), mConnection, 0)) {
Log.e(TAG, "Could not bind to Bluetooth Pbap Service");
}
}
COM: <s> create a bluetooth pbap proxy object </s>
|
funcom_train/23011346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openDataStorage(boolean withAttributes){
if ((spatialData!=null)&&(spatialData.length>0)) {
bis = new ByteArrayInputStream(spatialData);
is = new DataInputStream(bis);
if(withAttributes){
bisa = new ByteArrayInputStream(attributeData);
isa = new DataInputStream(bisa);
}
}
}
COM: <s> opens the datasorage to read </s>
|
funcom_train/5573093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createServiceURLProperty(Composite composite) {
// **************************************
// * create Property *
// * service URL *
// **************************************
Label label = new Label(composite, SWT.NONE);
label.setText(LABEL_SERVICE_URL);
serviceURL = new Text(composite, SWT.LEFT | SWT.BORDER);
serviceURL.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
serviceURL.addListener(SWT.Modify, this);
}
COM: <s> creates the property to set the service url </s>
|
funcom_train/44011535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCouponList() {
System.out.println("setCouponList");
ArrayList<CouponBO> CouponList = null;
TransactionBO instance = new TransactionBO();
instance.setCouponList(CouponList);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set coupon list method of class edu </s>
|
funcom_train/24531545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object generateObject(String[] classPath, ClassLoader cl, IProgressMonitor pm) throws TemplatesException {
Object newInstance=null;
try {
newInstance = getClass(classPath, cl, pm).newInstance();
tick(pm) ;
}
catch (TemplatesException e) {
throw e ;
}
catch (Exception ex) {
throw new TemplatesException(ex);
}
return newInstance;
}
COM: <s> will create a new object that is associated with this emitters class name </s>
|
funcom_train/1216279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ThirdClick(PacketParser p3){
int X = p3.inStream.readSignedWordBigEndian();
int Y = p3.inStream.readUnsignedWord();
int ID = p3.inStream.readUnsignedWordBigEndianA();
if(p3.playerRights == 3) p3.sendMessage("O-C3 - "+ID+","+X+","+Y);
p3.RotateToPoint(X, Y);
//Handle all of the third click objects (Very uncommon).
}
COM: <s> right clicking an object and selecting the third option </s>
|
funcom_train/46490211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean(IProject project) {
getAdvancedUnitMetrics().cleanResultsForMetric(project, getMetric());
IJavaProject javaProject = JavaCore.create(project);
projectsToMeasure.remove(javaProject);
Iterator<IPackageFragment> nextFragment = fragmentsToMeasure.iterator();
while(nextFragment.hasNext()) {
if(nextFragment.next().getJavaProject().equals(javaProject))
nextFragment.remove();
}
}
COM: <s> cleans the metric using the simple default behavior and also removing all </s>
|
funcom_train/3119257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTemplate(final TemplateDialog template) {
final InteractionGraph oldGraph = template.getInteractionGraph();
if (oldGraph != null) {
oldGraph.remove(template);
}
template.setInteractionGraph(this);
templates.add(template);
fireElementAdded(templates.size() - 1, template);
}
COM: <s> adds the given dialog to the interaction graph as a template </s>
|
funcom_train/16819479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("UtilidadesFachada".equals(portName)) {
setUtilidadesFachadaEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/42956222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged(MouseEvent e) {
int ex = e.getX();
int ey = e.getY();
if (gotOne != null) {
Image i = gotOne.image;
gotOne.x = ex - i.getWidth(vizPanel()) / 2;
gotOne.y = ey - i.getHeight(vizPanel()) / 2;
vizPanel().repaint();
}
}
COM: <s> if an image is being dragged repaint it </s>
|
funcom_train/12245042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadText(String text, boolean male) {
try {
String tmpPhoFile = Emofilt._config.getString("tmpDir")
+ Emofilt._config.getString("tmpPhoFile");
_emoEmofiltPlayer.genPhoFile(text, tmpPhoFile, male);
loadUtterance(tmpPhoFile);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> load from text string requires external phonetization component </s>
|
funcom_train/2581712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod previous() {
Day result;
int serial = this.serialDate.toSerial();
if (serial > SerialDate.SERIAL_LOWER_BOUND) {
SerialDate yesterday = SerialDate.createInstance(serial - 1);
return new Day(yesterday);
}
else {
result = null;
}
return result;
}
COM: <s> returns the day preceding this one </s>
|
funcom_train/28356772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateMPSServiceStatus() {
// copy set to avoid a possible concurrent modification exception
Set services = new HashSet( serviceTable.keySet() );
// if there are services, update the MPS table for each service
Iterator serviceIter = services.iterator();
while ( serviceIter.hasNext() ) {
final String id = (String)serviceIter.next();
final RequestHandler handler = getHandler(id);
final GenericRecord record = getRecord(id);
if ( handler == null ) continue;
new Thread( new Runnable() {
public void run() {
handler.update(record);
}
}).start();
}
}
COM: <s> for each remote service poll the service for fresh information </s>
|
funcom_train/20364777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChangeFire() {
for ( int cycle=0; cycle<TEST_CYCLES; cycle++ ) {
DerivedStat derived = makeRandomDerivedStat();
derived.addChangeListener(this);
lastEvent=null;
String orgDice = derived.getDice() ;
NamedStat ns = derived.getComponentStats()[0];
ns.setValue( ns.getValue()+2 );
assertNotNull( lastEvent );
assertNotSame( orgDice, derived.getDice() );
lastEvent=null;
derived.removeChangeListener( this );
}
}
COM: <s> create random derived stats change 1 component stat and check both </s>
|
funcom_train/13803095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double density(double x, Graph graph, PropertyInfo graphClass) {
GraphStatistics graphStatistics = graph.getOrMakeGraphStatistics(getName());
double minValue = graphStatistics.getMin().magnitude();
double maxValue = graphStatistics.getMax().magnitude();
return (Math.min(Math.max(x, minValue), maxValue) - minValue) / (maxValue - minValue);
}
COM: <s> probability density function for that metric </s>
|
funcom_train/28754193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPath(String newVal) {
if ((newVal != null && this.path != null && (newVal.compareTo(this.path) == 0)) ||
(newVal == null && this.path == null && path_is_initialized)) {
return;
}
this.path = newVal;
path_is_modified = true;
path_is_initialized = true;
}
COM: <s> setter method for path </s>
|
funcom_train/10982954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws ServletException {
super.init();
initServlet();
Map params = new HashMap();
params.put(SERVLET_MAPPINGS_KEY, servletMappings);
ServletConfiguration servletConfiguration = ServletConfiguration.init(getServletContext());
processor = servletConfiguration.createRequestProcessor(getServletContext(), "actionRequestProcessor", params);
}
COM: <s> p initialize this servlet </s>
|
funcom_train/22501458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles) {
checkWidget();
if (isListening(LineGetStyle)) return;
if (ranges == null || styles == null) {
setStyleRanges(start, length, null, null, false);
} else {
setStyleRanges(start, length, ranges, styles, false);
}
}
COM: <s> clears the styles in the range specified by code start code and </s>
|
funcom_train/15399021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Version (int major, int minor) {
if (major < 0) {
throw new IllegalArgumentException ("Major version number must be non-negative");
}
else if (minor < 0) {
throw new IllegalArgumentException ("Minor version number must be non-negative");
}
this.major = major;
this.minor = minor;
}
COM: <s> create a new version object </s>
|
funcom_train/9485139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTargetListClass(Class targetListClass) {
if (targetListClass == null) {
throw new IllegalArgumentException("'targetListClass' must not be null");
}
if (!List.class.isAssignableFrom(targetListClass)) {
throw new IllegalArgumentException("'targetListClass' must implement [java.util.List]");
}
this.targetListClass = targetListClass;
}
COM: <s> set the class to use for the target list </s>
|
funcom_train/27762539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void objectReplaced(FirewallDataEvent event) {
Policy activePolicy = PolicyManager.getInstance().getActivePolicy();
if (event.getSource() == activePolicy) {
if (activePolicy.isModified()) {
this.setTitle(((Policy) event.getSource()).getName() + PropertyManager.getString("common.modified"));
}
}
}
COM: <s> an object was replaced by another object </s>
|
funcom_train/3581615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleStartTag(HTML.Tag t, MutableAttributeSet a, int pos) {
readtitle = false;
if (t == HTML.Tag.TITLE) {
readtitle = true;
}
if (t == HTML.Tag.A) {
// URL
URL url;
try {
url = getUniqueUrl(((String) a.getAttribute(HTML.Attribute.HREF)));
neighbors.add(url);
// System.out.println("Adding " + url);
} catch (MalformedURLException murle) {
url = null;
}
}
}
COM: <s> invoked when a start tag is encountered </s>
|
funcom_train/22827801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeLocalReferences(ForeignKey key, StringBuilder ddl) {
for (int idx = 0; idx < key.getReferenceCount(); idx++) {
if (idx > 0) {
ddl.append(", ");
}
printIdentifier(key.getReference(idx).getLocalColumnName(), ddl);
}
}
COM: <s> writes a list of local references for the given foreign key </s>
|
funcom_train/31028724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityIDCollection getControlledEntities() throws RemoteException {
EntityIDCollection entityIDs = new EntityIDCollection();
synchronized(this.controlledEntities) {
Iterator iter = this.controlledEntities.keySet().iterator();
while (iter.hasNext()) {
entityIDs.addEntityID((EntityID)iter.next());
}
}
return entityIDs;
}
COM: <s> returns a collection of entity ids of all the controlled entities </s>
|
funcom_train/36231477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Response toResponse(EcmException e) {
StringWriter strw = new StringWriter();
//TODO Fault barrier
if (e instanceof FedoraConnectionException){
LOG.warn("caught exception:",e);
} else {
LOG.debug("caught exception",e);
}
JAXB.marshal(new Cleaned(e), strw);
return Response.status(e.getStatusCode()).entity(
strw.toString()).build();
}
COM: <s> maps a ecm exception to a responce </s>
|
funcom_train/28293020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLearnerID() {
if (logger.isDebugEnabled()) {
logger.debug(" :: SeqActivityTree --> BEGIN - getLearnerID");
logger.debug(" ::--> Learner ID : " + mLearnerID);
logger.debug(" :: SeqActivityTree --> END - getLearnerID");
}
return mLearnerID;
}
COM: <s> retrieves id of the learner associated with this activity tree </s>
|
funcom_train/17005567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlDateTime getXmlDateTime(Calendar calendar) {
XmlDateTime xmlDateTime = XmlDateTime.Factory.newInstance();
if (calendar == null) {
/* This should not happen */
System.out.println(moduleName + "The expiresAt value is null.");
return xmlDateTime;
}
xmlDateTime.setCalendarValue(calendar);
return xmlDateTime;
}
COM: <s> get the xmldate time associated with the specified calendar value </s>
|
funcom_train/31905972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJPEGEncodeParam(JPEGEncodeParam jpegEncodeParam) {
if(jpegEncodeParam != null) {
jpegEncodeParam = (JPEGEncodeParam)jpegEncodeParam.clone();
jpegEncodeParam.setTableInfoValid(false);
jpegEncodeParam.setImageInfoValid(true);
}
this.jpegEncodeParam = jpegEncodeParam;
}
COM: <s> sets the jpeg compression parameters </s>
|
funcom_train/21975886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement(String qName, Map attributes) {
if (dirtyHack && "OBJECT".equals(qName)) {
// skip the newline
} else {
printLnIndent();
}
print('<');
print(qName);
if (attributes != null) {
printAttributes(attributes);
}
print('>');
elementLevel++;
}
COM: <s> write a start tag </s>
|
funcom_train/50501323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() {
// class specific
IPropertyInfo[] properties = classInfo.getProperties();
children = new TreeNode[properties.length];
int index = 0;
for(int i=0;i<properties.length;i++){
children[index++] = new PropertyNode(this, properties[i]);
}
}
COM: <s> loads this object </s>
|
funcom_train/16486500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRecipients( Message message ) throws FusionGWException {
List recipient = new List();
try {
Address[] addr = message.getAllRecipients();
for ( int i = 0; i < addr.length; i++ ) {
recipient.add( addr[ i ].toString() );
}
} catch ( MessagingException e ) {
recipient.add( e.toString() );
} catch( Exception e ){
recipient.add( e.toString() );
}
return recipient.toString();
}
COM: <s> gets all the recipients of a message </s>
|
funcom_train/18643602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getEnumValue(EEnum enumval, int index) {
Object ret=null;
try {
String clsName=getEnumClassName(enumval);
Class cls=Class.forName(clsName);
java.lang.reflect.Method met=
cls.getMethod("get", new Class[]{int.class});
ret = met.invoke(null, new Object[]{new Integer(index+1)});
} catch(Exception e) {
// Log error
logger.severe("Failed to get enumeration value: "+e);
}
return(ret);
}
COM: <s> this method returns the enumeration value </s>
|
funcom_train/3698558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(){
if(serverThread != null){
return;
}
setServerStarted(true);
serverThread = new Thread(new Runnable() {
public void run() {
while(isServerStarted()){
try {
processRequest();
} catch(Exception e){
Log.log(Level.WARNING,"Server","start","",e);
}
}
}
});
serverThread.start();
Log.log(Level.CONFIG,"Serveur","start","Java IRC Server Port = " + port + ".");
}
COM: <s> to start the server </s>
|
funcom_train/26483974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
if (cmd.equals(I18N.get("GUI.ascending")))
((SortWinListItem)rightList.getSelectedValue()).sortOrder = 'a';
else if (cmd.equals(I18N.get("GUI.descending")))
((SortWinListItem)rightList.getSelectedValue()).sortOrder = 'd';
else
super.actionPerformed(e);
}
COM: <s> handles ascending and descending sort order buttons </s>
|
funcom_train/3723967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String display() {
StringBuffer sb = new StringBuffer("Registered types:\n");
Iterator i = (types.values()).iterator();
ATLASType t;
while (i.hasNext()) {
t = (ATLASType) i.next();
sb.append("====\n" + t.toString() + "\n");
}
return sb.toString();
}
COM: <s> creates a string suited for the display of the registred atlastypes </s>
|
funcom_train/45116719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParametersString(){
String toReturn = "";
switch (getCompareOption()){
case MATHEMATICAL:
toReturn = getFirstValue() + SEPARATOR + getMathematicalOperator().getSign() + SEPARATOR + getSecondValue();
break;
case STRING:
toReturn = getFirstValue() + SEPARATOR + getStringOperator() + SEPARATOR + getSecondValue() +SEPARATOR + isCaseSensitive();
break;
// case CUSTOM:
// return getParameters();
}
return getCompareOption().getShortName() + SEPARATOR + toReturn;
}
COM: <s> will be saved in scenario file and passed on to the script </s>
|
funcom_train/3378683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (!(other instanceof EDIPartyName))
return false;
String otherAssigner = ((EDIPartyName)other).assigner;
if (this.assigner == null) {
if (otherAssigner != null)
return false;
} else {
if (!(this.assigner.equals(otherAssigner)))
return false;
}
String otherParty = ((EDIPartyName)other).party;
if (this.party == null) {
if (otherParty != null)
return false;
} else {
if (!(this.party.equals(otherParty)))
return false;
}
return true;
}
COM: <s> compare this ediparty name with another </s>
|
funcom_train/28877633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element generateFullClassItemNode(ClassDataItem obj) {
//Element tEl = generateTimeItemNode(obj.getTimeItem());
Element cdiEl = generateClassItemNode(obj);
cdiEl.appendChild(generateTimeItemNode(obj.getTimeItem()));
//cdiEl.appendChild(tEl);
//return generateClassItemNode(obj).appendChild(generateTimeItemNode(obj.getTimeItem()));
return cdiEl;
}
COM: <s> generate a node for a class item with one session time child </s>
|
funcom_train/43278191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPreferences() {
// try {
// // init preferences
// preferenceNode = new FXLPreferenceRootNode(
// "Editor Settings Editor", editor.getModelTree()
// .getTreeContentProvider(), labelProvider, model);
// FeatureConfGuiActivator.getDefault().getPreferenceNode().add(
// preferenceNode);
// } catch (final Exception e) {
// e.printStackTrace();
// }
}
COM: <s> init the preferences page for this variant </s>
|
funcom_train/4369709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getRef() {
if (obj != null)
return obj ;
try {
servant = createServant() ;
byte[] id = idName.getBytes() ;
poa.activate_object_with_id(id, servant) ;
obj = poa.servant_to_reference(servant) ;
return obj ;
}
catch (Exception e) {
logger.log(Level.WARNING,e.getMessage(),e) ;
return null ;
}
}
COM: <s> get the distribued reference of the object </s>
|
funcom_train/13327635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(E element) {
long hash;
String valString = element.toString();
for (int x = 0; x < k; x++) {
hash = createHash(valString + Integer.toString(x));
hash = hash % (long)bitSetSize;
if (!bitset.get(Math.abs((int)hash)))
return false;
}
return true;
}
COM: <s> returns true if the element could have been inserted into the bloom filter </s>
|
funcom_train/18000414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String name, Object value) {
if (value instanceof Object[]) throw new IllegalArgumentException("Arrays not supported");
if (value instanceof Document) throw new IllegalArgumentException("XML docs not supported");
if (value == null) removeProperty(name);
if (properties == null) properties = new HashMap();
properties.put(name, value);
}
COM: <s> set a binder property </s>
|
funcom_train/25192264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getServiceName (AgentDescriptor descriptor) {
DefaultTreeModel model = descriptor.treeModel;
DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot ();
DefaultMutableTreeNode serviceNode = (DefaultMutableTreeNode) root.getChildAt (2);
AgentProperty prop = (AgentProperty) serviceNode.getUserObject ();
return prop.nodeLabel;
}
COM: <s> finds the service object name of the agent from the agents tree model </s>
|
funcom_train/25566370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateAdditionalRandomMatrix() {
for (int i = 0; i < size; i++) {
for (int j = 0; j < getMatrix().getAdditionalTable().getColumnCount(); j++) {
Double value = (max - min)*Math.random() + min;
getMatrix().getAdditionalTable().setValueAt(value.toString(), i, j);
}
}
}
COM: <s> generation of whole additional matrix in random way </s>
|
funcom_train/19407000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getOperation(Node in_Node) throws org.tzi.ugt.main.Exception {
Enumeration e = in_Node.getOutgoingArcs();
boolean found = false;
while (e.hasMoreElements() && !found) {
Node n = (Node) ((Arc) e.nextElement()).getTarget();
if (0 == n.getType().getStringRepr().compareTo("Operation")) {
return n;
}
}
throw new org.tzi.ugt.main.Exception();
}
COM: <s> returns the operation node </s>
|
funcom_train/26317685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int switchMode() {
if (type.hasModes()) {
int nMode = 0;
if (pendingMode > -1) {
nMode = (pendingMode + 1) % type.getModesCount();
} else {
nMode = (mode + 1) % type.getModesCount();
}
setMode(nMode);
return nMode;
}
return -1;
}
COM: <s> switches the equipment mode to the next available </s>
|
funcom_train/22154958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
// save graphics state (restored by dispose)
if(child)
pw.print("q ");
// Set the line width
setDefaultLineWidth();
// now initialise the instance
//setColor(Color.black);
color = Color.black;
// possible: if parent.color is not black, then force black?
// must check to see what AWT does?
// get the page dimensions (needed to get the orientation correct)
media = page.getMedia();
mediaRot = page.getOrientation();
// Finally set the page Orientation
if(!child)
setOrientation();
}
COM: <s> this initialises the stream by saving the current graphics state and </s>
|
funcom_train/27749560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineWidth(int width) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.lineStyle == SWT.LINE_SOLID) {
OS.gdk_gc_set_line_attributes(handle, width, OS.GDK_LINE_SOLID, OS.GDK_CAP_BUTT, OS.GDK_JOIN_MITER);
} else {
OS.gdk_gc_set_line_attributes(handle, width, OS.GDK_LINE_DOUBLE_DASH, OS.GDK_CAP_BUTT, OS.GDK_JOIN_MITER);
}
}
COM: <s> sets the width that will be used when drawing lines </s>
|
funcom_train/25233311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void type(String code) throws IOException {
// Send the type command.
sendCommand(FtpConstants.TYPE + " " + code);
// Make sure the response is ok.
String tmp = getLine(FtpConstants.POSITIVE);
MyFtpConnection.throwErrorIfNecessary( tmp );
// Update our type.
typeNow = code;
}
COM: <s> set type l8 i a for example </s>
|
funcom_train/51651906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (data.cairo == 0 && transform == null) return;
initCairo();
int /*long*/ cairo = data.cairo;
if (transform != null) {
Cairo.cairo_set_matrix(cairo, transform.handle);
} else {
Cairo.cairo_identity_matrix(cairo);
}
}
COM: <s> sets the transform that is currently being used by the receiver </s>
|
funcom_train/13532601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEmpty () {
boolean isEmpty = true;
Iterator it = elements.iterator();
while ( it.hasNext() ) {
XMLElement el = ( XMLElement ) it.next();
isEmpty = isEmpty && el.isEmpty();
}
isEmpty=isEmpty && value.trim().length()==0;
return isEmpty;
}
COM: <s> it is empty if its value is not set and if </s>
|
funcom_train/2389156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemDeleteRole() {
if (menuItemDeleteRole == null) {
menuItemDeleteRole = new JMenuItem();
menuItemDeleteRole.setText("Benutzer löschen");
menuItemDeleteRole
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
GUIDeleteUser gui = new GUIDeleteUser();
gui.show();
}
});
}
return menuItemDeleteRole;
}
COM: <s> this method initializes menu item delete role </s>
|
funcom_train/9082932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeltasArentPropagatedIfNotSubscribedToWavelet() {
OpenListener listener = createMock(OpenListener.class);
replay(listener);
clientFrontend.openRequest(USER, WAVE_ID, ImmutableSet.of("nonexisting-wavelet"),
Integer.MAX_VALUE, listener);
clientFrontend.waveletUpdate(
WAVELET_NAME, DELTAS, DELTAS.getEndVersion(), DOCUMENT_STATE);
verify(listener);
}
COM: <s> tests that if our subscription doesnt involve a matching wavelet id prefix </s>
|
funcom_train/26475056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildTree() {
if (this.isLeaf() || !this.isExpanded())
return;
if (this.childNodes == null || this.childNodes.isEmpty())
this.buildNodes(this.treeModel.getChildren());
else {
Iterator iterator = this.childNodes.iterator();
while (iterator.hasNext()) {
TreeNode element = (TreeNode) iterator.next();
if (element.isExpanded())
element.buildTree();
}
}
}
COM: <s> builds the new branches for this code tree node code </s>
|
funcom_train/18487051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void outPinFired(int pinId, Object[] params) {
/**
* PinXMLPrarserUtil - helper class will convert Object array
* to the XML string in a commont to Buildap way
*/
String eventStr =
org.vcb.util.xml.parser.PinXMLPrarserUtil.arrayToString(
"", params);
System.out.println(eventStr);
}
COM: <s> all out events fired by out pin objects will go through this method </s>
|
funcom_train/40851420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPercDraw() {
if(this.getNbGames()==null || this.getNbGames().intValue()==0) return "N/A";
double perc = ((double)this.getNbDraw().intValue()) / this.getNbGames().intValue();
return NumberUtils.getPrettyPrintForm(perc * 100) + "%";
}
COM: <s> return a pretty print form of the percentage of draw games </s>
|
funcom_train/12694779 | /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, int W, int H) {
int width = _width;
int height = _height;
if (width <= 0 || height <= 0 || W <= 0 || H <= 0) {
return false;
}
int x = _x;
int y = _y;
return (X >= x &&
Y >= y &&
X + W <= x + width &&
Y + H <= y + height);
}
COM: <s> the method veriifies whether a rectangle lies within this rectangle </s>
|
funcom_train/35108579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public interface Importer {
/**
* Read the contour identifier
* @return contour identifier
*/
public ContourID provideID();
/**
* Read the member list of this contour
* @return list of members
*/
public List<ContourMember> provideMembers();
/**
* Provide the contour model of which this contour is a part.
* @return containing model
*/
public ContourModel provideContainingModel();
}
COM: <s> builder for contours </s>
|
funcom_train/34587470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemAddedByClient(SyncItemEvent event) {
if (Logger.isLoggable(Logger.DEBUG)) {
Logger.debug
("SyncItemEvent - Item added by client - sourceUri: " +
event.getSourceUri() +
" - key: " +
event.getItemKey().getKeyAsString() );
}
}
COM: <s> notify an item added by the client </s>
|
funcom_train/22597987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void poolAddToPool(final PhotoEdit photoEdit, final IPhoto photo) {
if (StringUtils.isNotEmpty(photoEdit.getPoolAddId())) {
log.info("add to pool");
poolService.addPhotoToPool(photo.getDisplayId(), photoEdit
.getPoolAddId());
}
}
COM: <s> add the photo to a pool </s>
|
funcom_train/50839653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findColumn(String columnName) {
if (namedJoinColumnExpressions != null
&& namedJoinColumnExpressions.containsKey(columnName)) {
return -1;
}
if (variables != null) {
return variables.getIndex(columnName);
} else if (columnAliases != null) {
return columnAliases.getIndex(columnName);
} else {
return rangeTable.findColumn(columnName);
}
}
COM: <s> retruns index for column </s>
|
funcom_train/4917289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveMiddle() {
Entry first = new Entry();
Entry middle = new Entry();
Entry last = new Entry();
this.assertNotLast(this.linkedList.removeEntry(middle));
this.validateList(first, last);
// Ensure state of entry is reset
assertNull("Entry next should be cleared", middle.getNext());
assertNull("Entry prev should be cleared", middle.getPrev());
}
COM: <s> ensure remove middle entry of many entries </s>
|
funcom_train/11763600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getCDScanner());
reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
dr= new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorManager.getColor(ICDColorConstants.COMMENT))));
reconciler.setDamager(dr, csePartitionScanner.CD_COMMENT);
reconciler.setRepairer(dr, csePartitionScanner.CD_COMMENT);
return reconciler;
}
COM: <s> returns the presentation reconciler ready to </s>
|
funcom_train/48153617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e){
if (e.getSource() == timer){
nextThrow();
diceBoard.setValues(0, u);
diceBoard.setValues(1, v);
diceBoard.setRolled(true);
//playnote(point2);
if (win != CONTINUE){
timer.stop();
super.doExperiment();
profitRV.setValue(win);
recordTable.addRecord(new double[]{getTime(), x, y, u, v, rolls, win});
profitGraph.repaint();
profitTable.repaint();
}
}
else super.actionPerformed(e);
}
COM: <s> this method handles the events associated with the step timer </s>
|
funcom_train/2860656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] b, int off, int len) {
short total = 0;
for (int i= off;i<len;i++) {
total += b[i];
}
// two's complement
total = (short)~total;
total++;
this.value = total;
}
COM: <s> updates the current checksum with the specified array of bytes </s>
|
funcom_train/27822981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Person getPerson(String uri) throws KAONException {
Person person=(Person)m_persons.get(uri);
if (person==null) {
Instance personInstance=m_registryOIModelInstance.getInstance(uri);
person=new Person(this,personInstance);
m_persons.put(uri,person);
}
return person;
}
COM: <s> returns the person object for given uri </s>
|
funcom_train/11098153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectName registerMBeans(ManagementContext ctx) throws JBIException {
try {
mBeanName = ctx.createObjectName(this);
ctx.registerMBean(mBeanName, this, ComponentMBean.class);
return mBeanName;
} catch (Exception e) {
String errorStr = "Failed to register MBeans";
LOGGER.error(errorStr, e);
throw new JBIException(errorStr, e);
}
}
COM: <s> register the mbeans for this component </s>
|
funcom_train/21611097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseModelArrayWithTail() throws UNParserException {
ParseTree pt = parser.parse("m_array", "[ v1, \"const value\", v3| tail ]");
System.out.println("parse tree: " + pt);
checkParsing(pt, "[", "variable", "const", "variable", "|", "variable", "]");
}
COM: <s> parses a declaration of a model array with tail </s>
|
funcom_train/42204007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rally() {
try {
int leftScore = Integer.parseInt(leftTotal.getText());
int rightScore = Integer.parseInt(rightTotal.getText());
// compute outcome
if (leftScore > rightScore)
result.setText("Red Leads");
else if (leftScore < rightScore)
result.setText("Blue Leads");
else
result.setText("Tie Game");
} catch (Exception e) { }
}
COM: <s> sets the outcome box </s>
|
funcom_train/22050278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNWPLevel(int iProfNumber) {
for (int i = 0; i < iNWP_has.get_size(); i++) {
if (iNWP_has.GetValueAsInt(i) == iProfNumber) {
return iNWP_modifier.GetValueAsInt(i);
}
}
return BaseCharData.CHAR_DOES_NOT_HAVE_NWP;
}
COM: <s> get the level of a specific nwp </s>
|
funcom_train/21722980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playIntroScene(final String name, final Activity initialActivity) {
getPCcs().sceneH.setBubbleComplexityAndScore(3, true);
getPCcs().sceneH.setInitialActivity(initialActivity);
getPCcs().agentH.setAgentGoal("wait");
dmPrx.setIntroScene(EchoesScene.Intro, name);
}
COM: <s> play the introduction scene using the given name </s>
|
funcom_train/40386896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAuthCookiePath(String authCookiePath) {
logger.debug("Setting authCookiePath: " + authCookiePath);
// Cache value
this.authCookiePath = authCookiePath;
// Protection
if ((this.authCookiePath == null) ||
(this.authCookiePath.equals(""))) {
// Log error
logger.error("Valve parameter [authCookiePath] has not been set correctly");
// Set flag
isActive = false;
}
}
COM: <s> sets the authentication cookie path </s>
|
funcom_train/31658028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireAsyncResponse(Object response) throws WSIFException {
Trc.entry(this, response);
Object result = deserialiseResponseObject(response);
WSIFMessage outMsg = createOutputMessage();
WSIFMessage faultMsg = createFaultMessage();
buildResponseMessages(result, outMsg, faultMsg);
getResponseHandler().executeAsyncResponse(outMsg, faultMsg);
Trc.exit(outMsg);
}
COM: <s> fire async response is called by an async listener when a response </s>
|
funcom_train/10592913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompiledComponent instantiate(Program program) throws LanguageException {
try {
return program.newInstance();
} catch (Exception e) {
getLogger().warn("Could not instantiate program instance", e);
throw new LanguageException("Could not instantiate program instance due to a " + e.getClass().getName() + ": " + e.getMessage());
}
}
COM: <s> create a new instance for the given class </s>
|
funcom_train/15493620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void archive() throws AntException {
AntListener listener = new AntListener();
project.addBuildListener(listener);
try {
super.execute();
} catch (Exception ex) {
throw new AntException("Failed to archive :" + ex.getMessage()
+ " [" + listener.getMessage() + "]",ex);
}
}
COM: <s> this method archives the specified file </s>
|
funcom_train/3395502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThrowable() {
if (isEnum() || isInterface() || isAnnotationType()) {
return false;
}
for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) {
if (t.tsym == env.syms.throwableType.tsym) {
return true;
}
}
return false;
}
COM: <s> return true if this is a throwable class </s>
|
funcom_train/28104649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String arrayAsString(Object[] array) {
if(array == null) {
return("Void"+objectSeperator+"null");
}
if(array.length == 0) {
return ("Empty"+objectSeperator+"null");
}
String ret = objectAsString(array[0]);
if(array.length == 1) {
return ret;
}
for(int i =1; i< array.length;i++) {
ret = ret + arraySeperator + objectAsString(array[i]);
}
return ret;
}
COM: <s> encodes an array into a string using object as string for each </s>
|
funcom_train/12119012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC72(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.mostraNascondiJToolBarButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c72 mostra nascondi jtool bar button </s>
|
funcom_train/35242447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleFailure(ACLMessage failure) {
if (failure.getSender().equals(myAgent.getAMS())) {
// FAILURE notification from the JADE runtime: the receiver
// does not exist
log(myAgent, "Responder does not exist");
} else {
log(myAgent, failure.getSender().getName() + " failed");
}
// Immediate failure --> we will not receive a response from this
// agent
nResponders--;
}
COM: <s> handle failure is executed if the agent we asked for the proposal </s>
|
funcom_train/6370678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invertWithParents() {
for (int i = 0; i < numJoints; i++) {
inverseChainMatrix[i] = new TransformMatrix(localRefMatrix[i]);
inverseChainMatrix[i].inverse();
if (parentIndex[i] != -1)
inverseChainMatrix[i].multLocal(
inverseChainMatrix[parentIndex[i]], unSyncbeginPos);
}
}
COM: <s> inverts joints with their parents </s>
|
funcom_train/4658314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SVNCommitInfo doCopy(SVNURL srcURL, SVNRevision srcRevision, SVNURL dstURL, boolean isMove, String commitMessage) throws SVNException {
return doCopy(srcURL, srcRevision, dstURL, isMove, false, commitMessage);
}
COM: <s> copies moves a source url to a destination one immediately committing changes </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.