__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45933687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResponseObjectType addVocabularyNode(AddVocabularyNodeRequest parameters) {
MedicalNode node = NodeSdoHelper.fromNodeType(parameters.getNode());
ResponseObject responseObject = vocabularyService.addVocabularyNode(
IdentificationSdoHelper.fromIdentificationType(parameters.getIdentification()),
parameters.getRequestId(),
node,
OptionsSdoHelper.fromOptionsType(parameters.getOptions()));
return ResponseObjectSdoHelper.toRepsonseObjectType(responseObject);
}
COM: <s> interface to add vocabulary node in vocabulary service </s>
|
funcom_train/4427740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void analyze(Network network) throws OrccException {
for (Instance instance : network.getInstances()) {
if (instance.isActor()) {
actorAnalyzer.transform(instance.getActor());
actorAnalyzer.analyze(instance.getActor());
} else if (instance.isNetwork()) {
analyze(instance.getNetwork());
}
}
for (Connection connection : network.getConnections()) {
analyze(connection);
}
}
COM: <s> analyze the given network </s>
|
funcom_train/15683481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
PropertyChangeSupport changeSupport = this.propertyChangeSupport;
if ( changeSupport == null || oldValue == newValue ) {
return;
}
changeSupport.firePropertyChange(propertyName, oldValue, newValue);
}
COM: <s> support for reporting bound property changes for boolean properties </s>
|
funcom_train/5193380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createCreateAssociationLink6Group() {
PaletteStack paletteContainer = new PaletteStack(Messages.CreateAssociationLink6Group_title, null, null);
paletteContainer.setId("createCreateAssociationLink6Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.CreateAssociationLink6Group_desc);
paletteContainer.add(createAssociation1CreationTool());
paletteContainer.add(createSharedAggregation2CreationTool());
paletteContainer.add(createCompositeAggregation3CreationTool());
paletteContainer.add(createNavigableAssociation4CreationTool());
return paletteContainer;
}
COM: <s> creates create association link palette tool group </s>
|
funcom_train/26323654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Message parseLeave(int len){
int partLen=Utils.parseInt(q.peekN(4),0);
String room=Utils.parseString(q.popN(partLen+4),0);
return new Message(15,"s",room);
}
COM: <s> parses message for leaving a chatroom </s>
|
funcom_train/15954397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppendInt() throws BMLException{
String lsValue = "Good";
DataString ldString = new DataString(fBlank);
ldString.setString(lsValue);
int lInt = 7;
ldString.append(lInt);
assertEquals("Good7",ldString.toString());
}
COM: <s> test of append method using int </s>
|
funcom_train/4228377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpiry(String expiry) {
if (isVoid(expiry)) {
throw new WLLException("Error: ConsentToken: Null expiry time.");
}
long expiryLong;
try {
expiryLong = Long.parseLong(expiry);
} catch (Exception e) {
throw new WLLException("Error: ConsentToken: Invalid expiry time: " + expiry);
}
this.expiry = new Date(expiryLong * 1000);
}
COM: <s> sets the expiry time of delegation token </s>
|
funcom_train/2611962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putWord(String word) {
String code = getCode(word);
Vector<String> list = mainDictionary.get(code);
if (list != null) {
list.addElement(word);
} else {
list = new Vector<String>();
list.addElement(word);
mainDictionary.put(code, list);
}
}
COM: <s> allocates a word in the dictionary </s>
|
funcom_train/39878584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(SyncOperation operation) {
SyncOperation operationToRemove = mOperationsMap.remove(operation.key);
if (operationToRemove == null) {
return;
}
if (!mSyncStorageEngine.deleteFromPending(operationToRemove.pendingOperation)) {
final String errorMessage = "unable to find pending row for " + operationToRemove;
Log.e(TAG, errorMessage, new IllegalStateException(errorMessage));
}
}
COM: <s> remove the specified operation if it is in the queue </s>
|
funcom_train/19164855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFieldNameAt(int index) {
switch(index) {
case 0: return "id";
case 1: return "title";
case 2: return "description";
case 3: return "abbrev";
case 4: return "recordstate";
case 5: return "created";
case 6: return "updated";
default: throw new IllegalArgumentException("requestes index bigger than field count");
}
}
COM: <s> get field name at </s>
|
funcom_train/44471212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyChildren(DefaultMutableTreeNode to, OClass from) {
for ( Long i : from.getChildren() ) {
OClass cls = (OClass) ontology.getClassById(i);
DefaultMutableTreeNode node = new DefaultMutableTreeNode(cls.getName());
to.add(node);
cls.nodeHash.add(node.hashCode());
copyChildren(node,cls);
}
}
COM: <s> recursive method of copying children in the tree </s>
|
funcom_train/8357311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnTrain() {
if (btnTrain == null) {
btnTrain = new JButton();
btnTrain.setText("Train");
btnTrain.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e)
{
if(threadBusy)
{
JOptionPane.showMessageDialog(me, "Training! " +
"Press Cancel to stop.", "Thread is busy!", 0);
return;
}
threadTrain = new ThreadTrain();
threadTrain.start();
}
});
}
return btnTrain;
}
COM: <s> this method initializes btn train </s>
|
funcom_train/3028501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream loadResource(String name) {
// we need to search the components of the path to see if we can
// find the class we want.
InputStream stream = null;
Enumeration e = pathComponents.elements();
while (e.hasMoreElements() && stream == null) {
File pathComponent = (File) e.nextElement();
stream = getResourceStream(pathComponent, name);
}
return stream;
}
COM: <s> returns a stream to read the requested resource name from this loader </s>
|
funcom_train/32874581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCommandLineHandler(String asArgs[]) {
java.util.Iterator iter = item.getActionList().values().iterator();
while(iter.hasNext()) {
Action a = (Action)iter.next();
if (a.getName().equals(asArgs[0])) {
return true;
}
}
return false;
}
COM: <s> called to see if this class can handle the given command line </s>
|
funcom_train/44890761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getSourceFiles(IContainer folder) {
List sourceFiles = new ArrayList();
IResource[] folderContents;
try {
folderContents = folder.members();
} catch (CoreException e) {
CorePlugin.log(e);
return sourceFiles;
}
for (int i = 0; i < folderContents.length; i++) {
if (folderContents[i].getType() == IResource.FILE && folderContents[i].getName().endsWith(".py"))
sourceFiles.add(folderContents[i]);
}
return sourceFiles;
}
COM: <s> return the jython source files in the given container project or </s>
|
funcom_train/3362457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o == this)
return true;
if (!(o instanceof MBeanParameterInfo))
return false;
MBeanParameterInfo p = (MBeanParameterInfo) o;
return (p.getName().equals(getName()) &&
p.getType().equals(getType()) &&
p.getDescription().equals(getDescription()) &&
p.getDescriptor().equals(getDescriptor()));
}
COM: <s> compare this mbean parameter info to another </s>
|
funcom_train/45622538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCreateCodeBasePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RegisterAssemblyType_createCodeBase_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RegisterAssemblyType_createCodeBase_feature", "_UI_RegisterAssemblyType_type"),
MSBPackage.eINSTANCE.getRegisterAssemblyType_CreateCodeBase(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the create code base feature </s>
|
funcom_train/22918556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
final Display display = Display.getDefault();
try {
createContents();
} catch (Exception e) {
new ErrorDialog(shell, "Error", "Unexpected error", e);
return;
}
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
COM: <s> open the window </s>
|
funcom_train/3883181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDurtimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_durtime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_durtime_feature", "_UI_DocumentRoot_type"),
ImsMdRootv1p1Package.Literals.DOCUMENT_ROOT__DURTIME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the durtime feature </s>
|
funcom_train/6493653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isLinkAnchor( Node node ) {
if (node.getNodeType() != Node.ELEMENT_NODE) {
return false;
} else if (!node.getNodeName().equals( "a" )) {
return false;
} else {
return (node.getAttributes().getNamedItem( "href" ) != null);
}
}
COM: <s> returns true if the node is a link anchor node </s>
|
funcom_train/14226815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnknown(int subclass) throws FrameException {
try {
ByteBuffer byteBuffer = new ByteBuffer(ByteBuffer.SIZE_8BITS);
byteBuffer.put8bits(subclass);
infoElements.put(InfoElement.UNKNOWN, byteBuffer.getBuffer());
} catch (Exception e) {
throw new FrameException(e);
}
}
COM: <s> sets an unknown subclass </s>
|
funcom_train/50873029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLastElement() {
OMError error = new OMError();
error.setSymbol( new OMSymbol( "cd", "name" ) );
error.addElement( new OMInteger( "1" ) );
error.addElement( new OMVariable( "a" ) );
assertTrue( error.lastElement().getType().equals( "OMV" ) );
}
COM: <s> test of last element method of class nl </s>
|
funcom_train/19778378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addService(Rendezvous rendezvous, String type, String name) {
if (name.endsWith("." + type)) {
name = name.substring(0, name.length() - (type.length() + 1));
}
//System.out.println("ADD: " + name);
services.addElement(name);
}
COM: <s> add a service </s>
|
funcom_train/44020824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getBattleOpenMenuItem() {
if (battleOpenMenuItem == null) {
battleOpenMenuItem = new JMenuItem();
battleOpenMenuItem.setText("Open");
battleOpenMenuItem.setMnemonic('O');
battleOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, MENU_SHORTCUT_KEY_MASK, false));
battleOpenMenuItem.addActionListener(eventHandler);
}
return battleOpenMenuItem;
}
COM: <s> return the battle open menu item </s>
|
funcom_train/18740229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHostGraphToStartLocation() {
Location l = this.completeSTS.hostGraphToStartLocation(this.g2);
Assert.assertSame(this.completeSTS.getCurrentLocation(), l);
Assert.assertSame(this.completeSTS.getStartLocation(), l);
LocationVariable v = this.completeSTS.getLocationVariable(this.e2[1]);
Assert.assertNotNull(v);
}
COM: <s> tests host graph to start location </s>
|
funcom_train/51296154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Organization getFromResultSet(ResultSet res) throws SQLException {
Organization org = new Organization(res.getInt("id"), "",
ContractorDataHandler.getInstance().createWithoutError(
res.getInt("c_id")), res.getBoolean("is_vat_payer"),
res.getInt("group_id"), res.getBoolean("is_default"));
addToCache(org);
return org;
}
COM: <s> returns org object in result set </s>
|
funcom_train/46104897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRowCount() {
int maxArraySize = 0;
for (Iterator<ArrayList<?>> i = columns.values().iterator(); i.hasNext();) {
ArrayList<?> currentArray = (ArrayList<?>) i.next();
if (currentArray.size() > maxArraySize) {
maxArraySize = currentArray.size();
}
}
return maxArraySize;
}
COM: <s> get the number of rows in the table </s>
|
funcom_train/34562697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Item number(final Item it) {
if(it.type == Type.DBL) return it;
double d = Double.NaN;
try {
if(it.type != Type.URI && (it.s() || it.n() || it.u())) d = it.dbl();
} catch(final QueryException ex) { }
return Dbl.get(d);
}
COM: <s> converts the specified item to a double </s>
|
funcom_train/8774335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group getSystemGroup(Group.Type type) throws SkypeException {
if (type == Group.Type.CUSTOM_GROUP) {
throw new IllegalArgumentException("custom type is not supported (use getAllGroups method to resolve)");
}
for (Group group : getAllSystemGroups()) {
if (group.getType() == type) {
return group;
}
}
return null;
}
COM: <s> search for a group based on its type </s>
|
funcom_train/35716475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void install(Control subjectControl) {
if (fSubjectControl != null && !fSubjectControl.isDisposed() && fSubjectControlDisposeListener != null)
fSubjectControl.removeDisposeListener(fSubjectControlDisposeListener);
fSubjectControl= subjectControl;
if (fSubjectControl != null)
fSubjectControl.addDisposeListener(getSubjectControlDisposeListener());
if (fInformationControlCloser != null)
fInformationControlCloser.setSubjectControl(subjectControl);
setEnabled(true);
fDisposed= false;
}
COM: <s> installs this manager on the given control </s>
|
funcom_train/19911797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton_Save() {
if(jButton_Save == null) {
jButton_Save = new JButton("Save");
jButton_Save.setText(LangageManager.getProperty("common.dialog.save"));
jButton_Save.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
onSave();
}
});
}
return jButton_Save;
}
COM: <s> this method initializes j button save </s>
|
funcom_train/27675314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readAuthParam() {
final StringBuilder builder = new StringBuilder();
builder.append( this.readToken() );
// Read the "="
this.mustReadByte( (byte) '=' );
builder.append( '=' );
// Read the value
builder.append( this.readValue() );
return builder.toString();
}
COM: <s> reads an code auth param code at the current position </s>
|
funcom_train/12670181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
try {
options = new AppletOptions(this);
} catch (Exception ex) {
ex.printStackTrace();
return;
}
System.out.println("initComponents");
pane = new VisualQuizJPane(getCodeBase(), options, getSize());
setContentPane(pane);
}
COM: <s> this method is called from within the init method to </s>
|
funcom_train/37721816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SplashWindow startSplash() {
String[] msgs = { "DBProphet 1.0", "Calvin Yu", "www.mobiX.org" };
SplashWindow splash = new SplashWindow(ImageFactory.getInstance().getImage("splash.jpg"));
splash.start(msgs, 1500);
return splash;
}
COM: <s> run the splash sequence </s>
|
funcom_train/11749045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCharFetch() throws Exception {
createSingleArtistDataSet();
SelectQuery query = new SelectQuery(Artist.class);
Artist a = (Artist) context.performQuery(query).get(0);
assertEquals(a.getArtistName().trim(), a.getArtistName());
}
COM: <s> tests how char field is handled during fetch </s>
|
funcom_train/19158510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLeftClickView(Component component) {
leftClickView = component;
if (!(leftClickView instanceof JPopupMenu)) return;
MouseAdapter listener = new MouseAdapter() {
public void mouseEntered(MouseEvent e) {
mouseOnPopup = true;
}
public void mouseExited(MouseEvent e) {
mouseOnPopup = false;
}
};
addListenersToAllSubcomps(leftClickView, listener);
}
COM: <s> set the component to be prompted when mouse left click </s>
|
funcom_train/18149584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResponseElementGroupId(SET<II> responseElementGroupId) {
if(responseElementGroupId instanceof org.hl7.hibernate.ClonableCollection)
responseElementGroupId = ((org.hl7.hibernate.ClonableCollection<SET<II>>) responseElementGroupId).cloneHibernateCollectionIfNecessary();
_responseElementGroupId = responseElementGroupId;
}
COM: <s> sets the property response element group id </s>
|
funcom_train/14500098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test05ReadingStatusTimeSource() throws Exception {
// Test with insync
repository.update(StatusName.TIMESOURCE0_INSYNC.name(), "true");
assertSuccessfulTimestamp(WORKER4);
// Test without insync
repository.update(StatusName.TIMESOURCE0_INSYNC.name(), "");
assertTimeNotAvailable(WORKER4);
}
COM: <s> tests that the timestamp is only granted when the insync property </s>
|
funcom_train/20440062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCalendarPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFTime_calendar_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFTime_calendar_feature", "_UI_ESMFTime_type"),
ESMFPackage.Literals.ESMF_TIME__CALENDAR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the calendar feature </s>
|
funcom_train/3289963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getList(scanpage sp, StringTagger tagger, StringTokenizer tok) throws org.mmbase.module.ParseException {
Vector results=new Vector();
if (tok.hasMoreTokens()) {
String cmd=tok.nextToken();
if (cmd.equals("KEYWORDS")) {
results=getKeyWords(tagger);
}
}
return results;
}
COM: <s> generate a list of values from a command to the processor </s>
|
funcom_train/46121521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProviderStats(HL7Message message, StatsType type, String info) {
if (message != null && type != null) {
try {
queue.put(new StatisticsEntry(message.getDataSource(), type, message.getId(), info));
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
}
}
COM: <s> called when a duplicate message is received for updating statistics for a </s>
|
funcom_train/20883369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getBaseDirectory() {
String name = this.getClass().getName();
int lastdot = name.lastIndexOf('.');
if (lastdot != -1) { // remove package information
name = name.substring(lastdot+1);
}
URL url = this.getClass().getResource(name + ".class");
return getURLDirName(url);
}
COM: <s> get the directory that the jar file containing this class </s>
|
funcom_train/41159167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String hashPassword(String password) {
String passwordHash = "";
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(password.getBytes());
BigInteger hash = new BigInteger(1,md5.digest());
passwordHash = hash.toString(16);
if(passwordHash.length() == 31) {
passwordHash = "0" + passwordHash;
}
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return passwordHash;
}
COM: <s> creates a md5 hashed password </s>
|
funcom_train/31414504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean includeCatalog(String catName) {
String[] validCatalogs = getIncCats().trim().split(",");
boolean b = (validCatalogs.length == 0);
for(String validCatalog : validCatalogs)
b = b || catName.equalsIgnoreCase(validCatalog.trim());
return b;
}
COM: <s> returns true if the catalog name is in the valid catalogs array </s>
|
funcom_train/18286754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Classpath getDeviceClasspath(Properties deviceProperties) {
Classpath classpath = new Classpath();
String classpathString = deviceProperties.getProperty(PROP_CLASSPATH, "");
String[] classpathEntries = classpathString.split(",");
LibraryImporter libraryImporter = new LibraryImporter();
for (int i = 0; i < classpathEntries.length; i++) {
File libraryFile = new File(classpathEntries[i]);
if (libraryFile.exists()) {
classpath.addEntry(libraryImporter.createLibraryFor(libraryFile));
}
}
return classpath;
}
COM: <s> import the devices classpath and return it </s>
|
funcom_train/43245016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetZipCode() {
System.out.println("setZipCode");
String zipCode = "";
ZipCodeObject instance = new ZipCodeObject();
instance.setZipCode(zipCode);
// 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 zip code method of class org </s>
|
funcom_train/7659873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean offer(E o) {
final ReentrantLock lock = this.lock;
lock.lock();
try {
E first = q.peek();
q.offer(o);
if (first == null || o.compareTo(first) < 0)
available.signalAll();
return true;
} finally {
lock.unlock();
}
}
COM: <s> inserts the specified element into this delay queue </s>
|
funcom_train/41366197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return Form+"\t"+Lemma+"\t"+Lemma+"\t"+POS+"\t"+POS+"\t_\t_\t"+headID+"\t"+headID+"\t"+Deprel+"\t"+Deprel;
//return Form+"\t"+Lemma+"\t"+POS+"\t"+headID+"\t"+Deprel;
}
COM: <s> converts this word object one line following the co nll 2009 format </s>
|
funcom_train/15518441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintIcon (Component comp, Graphics g, int x, int y) {
g.drawRect (3, 3, 8, 8);
g.drawLine (5, 7, 9, 7);
if (plus)
g.drawLine (7, 5, 7, 9);
}
COM: <s> draws plus or minus sign </s>
|
funcom_train/2580164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackgroundImageAlpha(float alpha) {
if (alpha < 0.0f || alpha > 1.0f)
throw new IllegalArgumentException(
"The 'alpha' value must be in the range 0.0f to 1.0f.");
if (this.backgroundImageAlpha != alpha) {
this.backgroundImageAlpha = alpha;
fireChangeEvent();
}
}
COM: <s> sets the alpha transparency used when drawing the background image </s>
|
funcom_train/18782831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayedness() {
int sum = 0;
int count = 1;
for (Iterator<Track> itr = tracks.iterator(); itr.hasNext(); ) {
Track track = (Track) itr.next();
//only count tracks that actually get played
if(track.isRated() && track.getRating() > 0) {
sum += track.getOverplay();
count++;
}
}
playedness = sum / count;
}
COM: <s> calculate the average overplay for all rated tracks in the database </s>
|
funcom_train/44853082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult search(String inQueryTerm) throws IOException, ParseException, NoHitsException {
IndexReader lReader = getIndexReader();
IndexSearcher lSearcher = new IndexSearcher(lReader);
try {
TopDocs lHits = lSearcher.search(parseQuery(inQueryTerm), NUMBER_OF_HITS);
return getHitsQueryResult(processSearchResults(lHits, lSearcher, inQueryTerm));
}
finally {
lSearcher.close();
}
}
COM: <s> starts the search with the query term s provided and returns the </s>
|
funcom_train/17664346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONObject queryForObject(String query) {
if (query == null) throw new IllegalArgumentException();
JSONArray arr = query(query);
if (arr.length() == 0) {
return null;
} else if (arr.length() == 1) {
return arr.getJSONObject(0);
} else {
throw new TooManyResultsException("Expected 1 results, instead there were " + arr.length());
}
}
COM: <s> sends the specified fql query and returns a singular result </s>
|
funcom_train/18186381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getNormalBlur() {
if (NormalBlur == null) {
NormalBlur = new JMenuItem("Blur");
NormalBlur.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
optionsPanel.removeAll();
ImageTransformation t = new BlurTransformation();
optionsPanel.add(new TransformationEditor(t,img));
optionsPanel.updateUI();
jSplitPane.updateUI();
}
});
}
return NormalBlur;
}
COM: <s> this method initializes normal blur </s>
|
funcom_train/10357696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int getIntProperty(Session session, String name, int defaultValue) {
String result = getProperty(session, name);
if (result != null) {
try {
// convert into an int value.
return Integer.parseInt(result);
} catch (NumberFormatException e) {
}
}
// return default value if it doesn't exist is isn't convertable.
return defaultValue;
}
COM: <s> get a property associated with this mail session as an integer value </s>
|
funcom_train/36925553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printButtons() {
if (_myButtons.size() > 0) {
System.out.println("\n<<< available " + _myName + " buttons: >>>\n");
for (int i = 0; i < _myButtons.size(); i++) {
System.out.print(" " + i + ": ");
System.out.println(_myButtons.get(i).name());
}
System.out.println("\n<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
}
}
COM: <s> lists the available button of a device in the console window </s>
|
funcom_train/15810317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChargingCollectionFunctionAddress(String ccfAddress) throws ParseException {
if (ccfAddress == null)
throw new NullPointerException(
"JAIN-SIP Exception, "
+ "P-Charging-Function-Addresses, setChargingCollectionFunctionAddress(), the ccfAddress parameter is null.");
if(!this.delete(ccfAddress, ParameterNamesIms.CCF)) {
throw new ParseException("CCF Address Not Removed",0);
}
}
COM: <s> p remove a charging collection function ccf address set in this header p </s>
|
funcom_train/50054256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadScene() {
JFileChooser openDialog = new JFileChooser();
openDialog.setFileFilter(new FileNameExtensionFilter("XML Scene File", "xml"));
if (openDialog.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
gameController.load(openDialog.getSelectedFile());
setRoot(gameModel.getRoot());
}
}
COM: <s> loads the scene from a file </s>
|
funcom_train/20875117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean overlap(Location anotherLocation) {
if (getStartTime() + variable().getProcessingTime() <= anotherLocation.getStartTime())
return false;
if (anotherLocation.getStartTime() + anotherLocation.variable().getProcessingTime() <= getStartTime())
return false;
return true;
}
COM: <s> returns true if overlap with the given location </s>
|
funcom_train/21917874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private INakedActivityNode getNode(ActivityNode emfNode){
INakedActivityNode node = (INakedActivityNode) getNakedPeer(emfNode);
if(node == null){
if(emfNode instanceof Action){
node = new NakedOpaqueActionImpl();
}else{
NakedControlNodeImpl cnode = new NakedControlNodeImpl();
cnode.setControlNodeType(ControlNodeType.MERGE_NODE);
node = cnode;
}
initialize(node, emfNode, emfNode.getOwner());
}
return node;
}
COM: <s> interim solution to ensure that a node is always guarranteed </s>
|
funcom_train/101745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortOnColumn(int col, boolean reverse) {
if(col == lastSortedCol) {
Collections.reverse(model.getElements());
headerRenderer.setReversed(!headerRenderer.isReversed());
}
else {
Collections.sort(model.getElements(), new ElementListTableColumnComparator(model, col));
headerRenderer.setSortColumn(col);
headerRenderer.setReversed(false);
lastSortedCol = col;
if(reverse)
Collections.reverse(model.getElements());
}
// notify the model and repaint the header
model.fireTableDataChanged();
table.getTableHeader().repaint();
}
COM: <s> force a sort </s>
|
funcom_train/45055523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNextSuggestion(Phrase p) {
Translation t = (Translation) p.getChildByName(l10n);
if (t != null) {
String suggestion = t.getText();
translatedArea.setText(suggestion);
} else {
translatedArea.setText("");
}
this.keepCheck.setSelected(p.isKeepOriginal());
}
COM: <s> replaces translated area text and keep original flag with </s>
|
funcom_train/17766068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void publish(WsDiscoveryService service) throws WsDiscoveryServiceDirectoryException, WsDiscoveryXMLException, WsDiscoveryNetworkException {
dispatchThread.getLocalServices().store(service);
dispatchThread.getServiceDirectory().store(service);
synchronized (this) {
dispatchThread.sendHello(service);
}
}
COM: <s> publish the specified ws discovery service </s>
|
funcom_train/4404442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initConnexions() {
Random random = new Random();
for (Hidden n : hiddenLayer) {
double w;
w = random.nextDouble();
n.addIn(bias, new Double(w));
bias.addOut(n, new Double(w));
for (In in : inputLayer) {
w = random.nextGaussian();
n.addIn(in, new Double(w));
in.addOut(n, new Double(w));
}
for (Out out : outputLayer) {
w = random.nextGaussian();
n.addOut(out, new Double(w));
out.addIn(n, new Double(w));
}
}
}
COM: <s> random initialization of the </s>
|
funcom_train/3370565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(SingleSelectionModel model) {
SingleSelectionModel oldModel = getModel();
if (oldModel != null) {
oldModel.removeChangeListener(changeListener);
changeListener = null;
}
this.model = model;
if (model != null) {
changeListener = createChangeListener();
model.addChangeListener(changeListener);
}
firePropertyChange("model", oldModel, model);
repaint();
}
COM: <s> sets the model to be used with this tabbedpane </s>
|
funcom_train/36911549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
///////// Vinay ///////////////
innerIndexScan.close();
outerIndexScan.close();
///////// Vinay ///////////////
/*
// TODO: Cleanup temp files, temp indices
_leftBucketScan.close();
_rightBucketScan.close();
for(HeapFile heapFile : _lstOpenHeapFiles){
try{
heapFile.deleteFile();
}catch(Exception exception){
exception.printStackTrace();
}
}
for(HashIndex hashIndex : _lstOpenHashIndices){
hashIndex.deleteFile();
}*/
}
COM: <s> closes the iterator releasing any resources i </s>
|
funcom_train/9586168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RequestInfo registerSnacRequest(SnacRequest request) {
synchronized(requests) {
if (request.getReqid() != -1) {
return requests.get(request.getReqid());
}
long id = reqid.next();
request.setReqid(id);
Long key = id;
cleanRequests();
RequestInfo reqInfo = new RequestInfo(request);
requests.put(key, reqInfo);
return reqInfo;
}
}
COM: <s> registers a snac request giving it a request id and remembering that id </s>
|
funcom_train/3416033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fixUp(int k) {
while (k > 1) {
int j = k >> 1;
if (queue[j].nextExecutionTime <= queue[k].nextExecutionTime)
break;
TimerTask tmp = queue[j]; queue[j] = queue[k]; queue[k] = tmp;
k = j;
}
}
COM: <s> establishes the heap invariant described above assuming the heap </s>
|
funcom_train/24374632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeConnection() {
try {
if (stmt != null) {
stmt.close();
stmt = null;
}
} catch (SQLException e) {
logger.error("ADT: Could not close statement", e);
}
try {
if (con != null) {
con.close();
con = null;
}
} catch (SQLException e) {
logger.error("ADT: Could not close connection", e);
}
}
COM: <s> close the connection </s>
|
funcom_train/36074765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double gradientVectorLength(TakagiSugenoFIS fis) {
int i;
DifferentiableMembershipFunction auxMF;
int mfParameterNumber;
double length = 0.0;
Iterator<MembershipFunction> mfs = fis.getFuzzySet();
while (mfs.hasNext()){
auxMF = (DifferentiableMembershipFunction)mfs.next();
mfParameterNumber = auxMF.parameterNumber;
auxMF.localGradient = 0;
for (i = 0; i < mfParameterNumber; i++) {
length += auxMF.derivative[i] * auxMF.derivative[i];
}
}
return Math.sqrt(length);
}
COM: <s> calculate the gradient vector size </s>
|
funcom_train/3023315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reportAverageClassMethods(ProjectMetrics projectData) {
// Class Methods
double top = projectData.getClassMethodTotal();
double bottom = projectData.getClassTotal();
System.out.println("[003] " + projectData.getClassMethodTotal() + " total class methods in " + projectData.getClassTotal() + " classes.");
System.out.println("[003] " + "Average: " + (top / bottom));
}
COM: <s> reports on the average number of class methods </s>
|
funcom_train/8878355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ManufacturerBO create() {
String ID=null;
try {
ID = GUID.generate();
} catch (Exception ex) {
ex.printStackTrace();
}
ManufacturerBO cb = new ManufacturerBO(ID);
Cache c = Cache.getInstance();
c.put(cb.getID(), cb);
return cb;
}
COM: <s> this method creates a new manufactureromer bo object </s>
|
funcom_train/48668044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configCustomChanged() throws InvalidConfiguration, Throwable {
String wlsHome = fConfiguration.getAgentCustomConfiguration().getString(Configuration.ROOT_FOLDER);
File f = new File(wlsHome);
if(!f.exists()) {
throw new WeblogicNotInstalledOnHost(fConfiguration.getDeploymentHost());
}
super.configCustomChanged();
}
COM: <s> overridden to check for the correctness of the installation folder for weblogic </s>
|
funcom_train/43345151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataLink(NodeCard nodeCard, DataLink dataLink) {
if (!this.dataLinks.containsKey(nodeCard)) {
try {
this.addNodeCard(nodeCard);
} catch (NodeAlreadyExistsException e) {
logger.error("Error while adding node in directory", e);
}
}
this.dataLinks.get(nodeCard).add(dataLink);
}
COM: <s> adds a new communication connection between this directory </s>
|
funcom_train/37596023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public VariableType getTypeVariable(String name, TypeSystem ts) {
VariableType result = declaredTypeVariable(name);
if (result != null) { return result; }
else if (!matchesClass(name)) { return super.getTypeVariable(name, ts); }
else { return null; }
}
COM: <s> return the type variable with the given name or </s>
|
funcom_train/33265442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processActionPerformed(ActionEvent e) {
if (e.getSource() == button) {
notifyList();
}
else if ( e.getSource() == list ) {
select(list.getSelectedIndex());
}
else if ( e.getSource() == text ) {
text.selectAll();
processEvent( new ActionEvent( this, e.getEvent(),
ActionEvent.ACTION_PERFORMED ) );
}
}
COM: <s> process action performed </s>
|
funcom_train/34618940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static class RangeChangedEvent extends EventObject {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* Rows new in the visible range
*/
public GridItem[] addedRows;
/**
* Rows removed from the range
*/
public GridItem[] removedRows;
/**
* Columns added to the range
*/
public GridColumn[] addedColumns;
/**
* Columns removed from the range
*/
public GridColumn[] removedColumns;
/**
* The current visible range
*/
public GridVisibleRange visibleRange;
RangeChangedEvent(Grid grid, GridVisibleRange visibleRange) {
super(grid);
this.visibleRange = visibleRange;
}
}
COM: <s> event informing about the change </s>
|
funcom_train/18319071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleBreakpoint(StateEditPart s) throws CoreException {
toggleBreakpoint(s, (State) s.getModel(), BreakpointPositions
.getPositions(((GState) s.getModel()).getStateMachine(),
(State) s.getModel()), ((GState) s.getModel())
.getStateMachine());
}
COM: <s> toggles breakpoint for state model of given state edit part </s>
|
funcom_train/34580285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getRunCommand () {
if (runCommand == null) {//GEN-END:|48-getter|0|48-preInit
// write pre-init user code here
runCommand = new Command (lang.getProperty("command.run"), Command.OK, 0);//GEN-LINE:|48-getter|1|48-postInit
// write post-init user code here
}//GEN-BEGIN:|48-getter|2|
return runCommand;
}
COM: <s> returns an initiliazed instance of run command component </s>
|
funcom_train/35005474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAccount(long rowId) throws SQLException {
Cursor mCursor =
mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_USERNAME, KEY_PASSWORD, KEY_SERVER}, KEY_ROWID + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor positioned at the account that matches the given row id </s>
|
funcom_train/28309959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(KeyEvent event) {
try {
if (event.getKeyChar() == '\n') {
if (event.getComponent().getName().equals(STARTTIME_FIELD_NAME)
|| event.getComponent().getName().equals(ENDTIME_FIELD_NAME)) {
refreshCharts();
}
}
} catch (RuntimeException e) {
showError(e);
}
}
COM: <s> respond to key events for manual date entry fields </s>
|
funcom_train/12860728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = "";
/*
if (network.getObjective() != null) {
s += "Objective: " + network.getObjective() + "=" + getObjectiveValue() + "\n";
}
*/
Iterator vs = network.getVariables().iterator();
String delim = "";
while (vs.hasNext()) {
Variable v = (Variable)vs.next();
s += delim + v.getName() + "=" + getDomain(v);
delim = ",";
}
return s;
}
COM: <s> returns a readable string representation of this solution </s>
|
funcom_train/39106171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeQatInstance(boolean quiet) {
// make sure we cannot exit while running tests
if ((!testRunner.isRunning())&&
(!timerRunner.isRunning())) {
saveProject(quiet);
instanceList.remove(this);
setVisible(false);
dispose();
if (instanceList.size()==0)
System.exit(0);
}
else {
showError(Resources.getString("runInProgress"),
Resources.getString("error"),
JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> this method saves this instances session and project properties and if </s>
|
funcom_train/7511202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setLogin(String value) {
if (value != null) {
value = value.trim();
}
value = Utils.replaceAll(value, "'", "");
value = Utils.replaceAll(value, ";", "");
boolean res = this
.setConnectParameterImpl(PARAM_CONNECTION_LOGIN, this.currentLogin, value);
this.currentLogin = value;
return res;
}
COM: <s> set new login for connection to database </s>
|
funcom_train/39489113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reschedule (boolean forceBreak) {
ThreadInfo[] runnables = list.getRunnableThreads();
if (forceBreak || (runnables.length > 1)) {
ThreadChoiceGenerator cg = new ThreadChoiceFromSet(runnables,true);
SystemState ss = vm.getSystemState();
ss.setNextChoiceGenerator(cg); // this breaks the transition
}
}
COM: <s> request a reschedule no matter what the next insn is </s>
|
funcom_train/1717197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(Image img) {
normal = img;
ImageFilter dimmer = new GrayFilter(bgColor);
grayed = createImage(new FilteredImageSource(img.getSource(), dimmer));
MediaTracker tracker = new MediaTracker(this);
tracker.addImage(grayed, 0);
try {
tracker.waitForID(0);
} catch (Exception e) {
}
super.setImage(enabled ? normal : grayed);
}
COM: <s> create a grayed copy of image and use super </s>
|
funcom_train/12740699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public Operator optimizeSource() throws XQueryException {
// for (int i = 0; i < operatorList.size(); i++)
// ((Operator) operatorList.get(i)).optimizeSource();
// /*
// if (shareSameSources()) {
// Algebra node = mergeWithSub() ;
// return node ;
// }
// */
// return null;
// }
COM: <s> if the exactly same set of source is used for an operation </s>
|
funcom_train/20245307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveTo(int xAddress, int yAddress, int zAddress) {
// Calculate the offsets and call the move offset version
int xOffset = 0;
int yOffset = 0;
int zOffset = 0;
if (xAddress != -9999) {
xOffset = xAddress - xLocation;
}
if (yAddress != -9999) {
yOffset = yAddress - yLocation;
}
if (zAddress != -9999) {
zOffset = zAddress - zLocation;
}
moveOffset(xOffset, yOffset, zOffset);
}
COM: <s> moves to a specific location </s>
|
funcom_train/24131493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDKDNotFoundMessage() {
String dkdNotFound = DkdIntServProperties.getPropertyStore().getProperty(
DkdIntServProperties.PROP_DKD_NOT_FOUND_TEXT);
if (dkdNotFound == null || "".equals(dkdNotFound)) {
dkdNotFound = "Er voor dit BSN zijn geen gegevens gevonden in het DKD.";
}
return dkdNotFound;
}
COM: <s> get the error message for when no data is found for this bsn </s>
|
funcom_train/20044345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setReferencePosition() {
CA = new CellAddress((short)0, 2, 3);
oObj.setReferencePosition(CA);
log.println("ReferencePosition was set to (" +
CA.Sheet + ", " +
CA.Column + ", " + CA.Row + ")");
tRes.tested("setReferencePosition()", true);
}
COM: <s> test creates and stores cell address and calls the method </s>
|
funcom_train/12164422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRewriteAssetURLDynamicVisual() throws Exception {
AssetGroup assetGroup = new AssetGroup("Default Group");
MarinerURL url = new MarinerURL("http://test.com:8080/this=that");
// Asset construction
String value = "Dynamic Value";
DynamicVisualAsset asset = new DynamicVisualAsset();
asset.setEncoding(DynamicVisualAsset.TV);
asset.setValue(value);
String expected = tvPrefix + value;
doRewriterTest(asset, assetGroup, url, expected);
}
COM: <s> this method tests the method public mariner url rewrite asset url </s>
|
funcom_train/35838719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getLinks(PCSession session, String sViewID) throws SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// Vector vtLink = DBViewLink.getLinks(dbcon, sViewID);
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return null;
}
COM: <s> returns all the links in the view with the given id </s>
|
funcom_train/12178626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVerticalTextThenImage() {
// Try text / image.
expectDecisionGetters(mockArbitratorDecision,
MenuItemRenderedContent.TEXT,
mockVerticalSeparator,
MenuItemRenderedContent.IMAGE,
null);
// Should use the separator.
mockArbitratorDecision.expects.use(mockVerticalSeparator);
// Test the object.
separatorArbitrator.decide(null, mockArbitratorDecision);
}
COM: <s> test that the arbitrator will use a vertical separator between </s>
|
funcom_train/25567117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDoc(Doc doc, Object how) {
Integer index = getAddHow(how);
if(index==null) return false;
try{ getDocsList().add(index.intValue(), doc);
}catch(IndexOutOfBoundsException e){ return false; }
return super.addDoc(doc, how);//calls addDocView
}
COM: <s> overriden to store docs </s>
|
funcom_train/10616378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCertificateParsingException01() {
CertificateParsingException tE = new CertificateParsingException();
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code certificate parsing exception code constructor </s>
|
funcom_train/27684675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(Node root, PrintStream printStream) {
if (root == null) throw new NullPointerException("No root Node is available for PrettyPrinter");
if (printStream == null) throw new NullPointerException("No PrintStream available for PrettyPrinter");
currentColumn = COLUMN_FIRST;
currentLine = LINE_FIRST;
outPrintStream = printStream;
root.apply(this);
}
COM: <s> implementation of the public interface method </s>
|
funcom_train/20629062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String ping() {
//reinitailizes the queryHeader
//because this will be prepend to query in serverSocketConnection
//queryHeader = "";
try {
return executeQueryRemote( "PING" );
} catch ( Exception e ) {
Categories.dataClient().error( "ping falied", e );
return null;
}
}
COM: <s> ping the server </s>
|
funcom_train/32355234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void constrSelPath(final Project prj, final File file) {
selectPath = new Object[3];
selectPath[0] = root;
selectPath[1] = prj;
selectPath[2] = file;
if (selectPath != null) {
eSelPath.fireEvent();
}
logger.info("Have constructed " + selectPath[0] + "/" + selectPath[1]
+ "/" + selectPath[2]);
}
COM: <s> contructs the path </s>
|
funcom_train/49704413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computeProbabilities() throws IOException {
Map<String, Double> tokenProbabilities = new HashMap<String, Double>();
computeTokenCounter(tokenProbabilities);
setMaxTupleSize(tokenProbabilities, MAX_TUPLE_SZ);
logger.info("Computing probabilities.... done");
PersistenceManager.writeProbabilitiesToFile(dataDir,
categoryName+".probabilities", tokenProbabilities);
}
COM: <s> computes the probabilities of the whole set of tokens </s>
|
funcom_train/34749028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object borrowObject(final Object key) throws Exception, NoSuchElementException, IllegalStateException {
Object obj = keyedPool.borrowObject(key);
if (type.isInstance(obj)) {
return obj;
} else {
throw new ClassCastException("Borrowed object for key: " + key + " is not of type: " + type.getName() + " was: " + obj);
}
}
COM: <s> borrow an object from the pool verifying correct return type </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.