__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/35095300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getCorrectComponent(MouseEvent e) {
if (wasPopUp &&
(e.getID() == MouseEvent.MOUSE_PRESSED || e.getID() == MouseEvent.MOUSE_RELEASED ||
e.getID() == MouseEvent.MOUSE_CLICKED))
{
return previous;
} else {
return getDeepestComponentAt(e.getPoint());
}
}
COM: <s> returns the correct component for the event </s>
|
funcom_train/32892134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillBuffer () throws EOFException,IOException
{ if (bufferIsEmpty())
{ bufferBegin=0;
bufferEnd=super.read(buffer,bufferBegin,bufferSize);
if (bufferEnd==-1)
{ bufferEnd=0;
atEOF=true;
throw new EOFException ();
}
}
}
COM: <s> fill the internal buffer of this reader </s>
|
funcom_train/40669249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish(TreeLogger logger) {
JClassType[] newTypes = recentTypes.toArray(NO_JCLASSES);
computeHierarchyRelationships(newTypes);
computeSingleJsoImplData(logger, newTypes);
consumeTypeArgMetaData(logger, newTypes);
recentTypes.clear();
}
COM: <s> called after a block of new types are added </s>
|
funcom_train/41504657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSystemScopedOutsideProject(MavenProject project) {
File modulesTop = project.getBasedir();
while (new File(modulesTop.getParentFile(), "pom.xml").exists()) {
modulesTop = modulesTop.getParentFile();
}
return isSystemScoped() && !getFile().getAbsolutePath().startsWith(modulesTop.getAbsolutePath());
}
COM: <s> is this dependency system scoped outside the eclipse project </s>
|
funcom_train/48148346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(double a, double b, double w, int t) {
if (t < 0)
t = 0;
else if (t > 2)
t = 2;
type = t;
if (type == DISCRETE)
domain = new Domain(a - 0.5 * w, b + 0.5 * w, w);
else
domain = new Domain(a, b, w);
}
COM: <s> this method defines a partition of an interval that acts as a default </s>
|
funcom_train/36060136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ShortBlob convertByteArrayToShortBlob(Object value) {
if (value.getClass().getComponentType().isPrimitive()) {
return new ShortBlob((byte[]) value);
} else {
return convertByteCollectionToShortBlob(Arrays.asList((Byte[]) value));
}
}
COM: <s> converts an array of bytes to a datastore short blob </s>
|
funcom_train/4656905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGeoLocation(Point point) {
Point existing = getGeoLocation();
if (existing != null) {
Double lat = point == null ? null : point.getLatitude();
Double lon = point == null ? null : point.getLongitude();
existing.setGeoLocation(lat, lon);
} else if (point != null) {
extPoint.setExtension(point);
}
}
COM: <s> sets the geo location of the entity based on the point extension </s>
|
funcom_train/28878170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addPropertyChangeListener(String _p, PropertyChangeListener _l) {
if ((_p == null) || (_l == null))
return false;
if (pr_.containsKey(_p)) {
Vector _prop = (Vector) pr_.get(_p);
if ((_prop != null) && (!_prop.contains(_l)))
_prop.add(_l);
else
return false;
} else {
Vector _prop = new Vector();
_prop.add(_l);
pr_.put(_p, _prop);
}
return true;
}
COM: <s> registers the specified listener for this property </s>
|
funcom_train/43897752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Geometry getRightGeometry(Object feature) {
org.opengis.filter.expression.Expression rightGeometry = getExpression2();
if (rightGeometry != null) {
return (Geometry) rightGeometry.evaluate(feature, Geometry.class);
} else if (feature instanceof Feature) {
return ((Feature) feature).getDefaultGeometry();
}
return null;
}
COM: <s> subclass convenience method for returning right expression as a </s>
|
funcom_train/36684195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showError(String message) {
String displayMessage = UIStrings.getString("ERROR_OCCURRED") + "\n\n"
+ message;
JOptionPane.showMessageDialog(myTopLevelFrame, displayMessage,
UIStrings.getString("ERROR_TITLE"), JOptionPane.ERROR_MESSAGE);
}
COM: <s> displays a modal error with the supplied message </s>
|
funcom_train/16259335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFieldEditors() {
addField(new BooleanFieldEditor(ProxyPreferenceConstants.PROXY_TYPE,
"Use proxy", getFieldEditorParent()));
addField(new StringFieldEditor(ProxyPreferenceConstants.PROXY_HOST,
"Browser proxy host:", getFieldEditorParent()));
addField(new IntegerFieldEditor(ProxyPreferenceConstants.PROXY_PORT,
"Browser proxy port:", getFieldEditorParent()));
addField(new StringFieldEditor(
ProxyPreferenceConstants.PROXY_NO_PROXY_ON, "No proxy on:",
getFieldEditorParent()));
}
COM: <s> creates the field editors </s>
|
funcom_train/9873708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getSelectedFiles() {
Vector toReturn = new Vector();
DefaultListModel selModel = ( DefaultListModel ) this.fileSelectedList.getModel();
Object[] selFiles = selModel.toArray();
for( int i = 0; i < selFiles.length; i ++ ) {
File f = ( File ) selFiles[ i ];
toReturn.add( f );
}
return toReturn;
}//end getSelectedFiles()
COM: <s> returns a vector of the files that were in the file selected list </s>
|
funcom_train/11103443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findTabForContact(Contact contact) {
for (int i = 0; i < TAB_INDEX.length; i++) {
if ((contact.getTabIndex() >= TAB_INDEX[i][0]) &&
(contact.getTabIndex() <= TAB_INDEX[i][1]))
return i;
}
return 0;
}
COM: <s> p this function will find the tab index that the </s>
|
funcom_train/19911336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
menu.add(0, PLAY_NOW_ID, 0, resources.getString(R.string.play_now));
menu.add(0, CANCEL_ID, 0, resources.getString(R.string.cancel));
}
COM: <s> called when a context menu is created </s>
|
funcom_train/21288326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init_helper(Piece piece, Square square) {
this.pieces.put(piece, square);
if (piece.color == Color.WHITE) {
this.whitePieces.put(piece, square);
} else {
this.blackPieces.put(piece, square);
}
this.board[square.row][square.col] = piece;
}
COM: <s> a helper function for creating a new game </s>
|
funcom_train/11715033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isUimaASService() {
uimaASBrokerUrl = getInitParameter(UIMA_AS_BROKER_URL);
uimaASServiceQueueName = getInitParameter(UIMA_AS_SERVICE_INPUT_QUEUE_NAME);
if (uimaASBrokerUrl != null && uimaASServiceQueueName != null) {
return true;
}
return false;
}
COM: <s> check if this is a uima as service </s>
|
funcom_train/17789751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAvailableViewerFilter(ViewerFilter filter) {
if (isEqual(this.availableViewerFilter, filter))return;
final ViewerFilter[] filters = availableViewer.getFilters();
for (int i = 0; i < filters.length; i++) {
availableViewer.removeFilter(filters[i]);
}
availableViewer.addFilter(filter);
}
COM: <s> set the filter of the available code table viewer code </s>
|
funcom_train/12708034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameAttribute(Entity entity, String oldName, String newName) {
for (int count = 0; count < this.size(); count++) {
EntityRelation relation = this.get(count);
if (relation.getA() == entity)
relation.renameAMapping(oldName, newName);
if (relation.getB() == entity)
relation.renameBMapping(oldName, newName);
}
}
COM: <s> rename an entity attribute </s>
|
funcom_train/33606731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClosestOnRay() {
System.out.println("closestOnRay");
R2 point1 = null;
R2 point2 = null;
R2 instance = new R2();
R2 expResult = null;
R2 result = instance.closestOnRay(point1, point2);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of closest on ray method of class r2 </s>
|
funcom_train/18060589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSerialString() {
String serial;
String tmp;
target.setObjectID("hpHttpMgProduct.0");
serial = target.snmpGet();
if(serial == null || serial.length() == 0)
return null;
target.setObjectID("hpHttpMgSerialNumber.0");
tmp = target.snmpGet();
if(tmp == null || tmp.length() == 0)
return null;
serial += tmp;
return serial.trim();
}
COM: <s> returns the serial number </s>
|
funcom_train/29576279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] data, int start, int end) {
String characterData = new String(data, start, end);
trace("characters:" + characterData);
if (currentElement == null) {
warn("Can't append text node to null currentElement");
} else {
Text textNode = currentDocument.createTextNode(characterData);
currentElement.appendChild(textNode);
}
}
COM: <s> content handler method </s>
|
funcom_train/42944224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIgnoreKeyCase(boolean ignCase) {
this.ignoreCase = ignCase;
Map props = this.getProperties();
if (props instanceof OrderedMap) {
((OrderedMap) props).setIgnoreCase(this.ignoreCase);
}
else {
Print.logWarn("Backing map is not an 'OrderedMap', case insensitive keys not in effect");
}
}
COM: <s> sets the value of the ignore case field </s>
|
funcom_train/32314465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
DiagramUtil.checkDiagramPerspective(true);
DiagramTreeElement diagramTreeElement = (DiagramTreeElement) ((StructuredSelection) _actualSelection).getFirstElement();
DiagramManager diagramManager = DiagramManagerFactory.getDiagramManagerInstance(diagramTreeElement.getProjectName(), diagramTreeElement.getUri());
String viewName = diagramManager.createNewView(diagramTreeElement.getUri());
diagramManager.openDiagram(viewName);
}
COM: <s> called when the action is executed </s>
|
funcom_train/35838819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getDeletedNodeSummary(PCSession session) throws SQLException {
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// Vector vtNodes = DBNode.getDeletedNodeSummary(dbcon, session.getUserID());
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return null;
}
COM: <s> returns all deleted nodes from the database </s>
|
funcom_train/32057816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSplitPane() {
System.out.println("testGetSplitPane");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
assertEquals("getSplitPane failed", newDoc.getSplitPane() != null, true);
}
COM: <s> test of get split pane method of class gpdocument </s>
|
funcom_train/25291308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScale(double scale) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_SCALE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("OrientedShape3D8"));
if (isLive())
((OrientedShape3DRetained)retained).setScale(scale);
else
((OrientedShape3DRetained)retained).initScale(scale);
}
COM: <s> sets the scale for this oriented shape3 d </s>
|
funcom_train/36187803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
if (my_editor_frame != null) {
my_editor_frame.delete_colour_frame(null);
}
else {
DateLookPanel.get_instance(null).set_colour_frame(null);
}
}
}
COM: <s> handle window event </s>
|
funcom_train/22563525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkAllow(final TENCActionKey action) {
if (data instanceof BaseModel<?>) {
return checkModelPermission((BaseModel<?>) data, action);
} else if (data instanceof DatabaseEntityImpl<?>) {
return checkModelPermission(((DatabaseEntityImpl<?>) data).getBaseModelEntity(), action);
} else {
return false;
}
}
COM: <s> check allow action </s>
|
funcom_train/34641875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addColor(String colorKey) {
if (fColorManager != null && colorKey != null
&& fColorManager.getColor(colorKey) == null) {
RGB rgb = PreferenceConverter.getColor(fPreferenceStore, colorKey);
if (fColorManager instanceof IColorManagerExtension) {
IColorManagerExtension ext = (IColorManagerExtension) fColorManager;
ext.unbindColor(colorKey);
ext.bindColor(colorKey, rgb);
}
}
}
COM: <s> binds a new color to the key </s>
|
funcom_train/2586016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddMonthsTo5Oct2003() {
final SerialDate d1 = SerialDate.createInstance(5, MonthConstants.OCTOBER, 2003);
final SerialDate d2 = SerialDate.addMonths(2, d1);
assertEquals(d2, SerialDate.createInstance(5, MonthConstants.DECEMBER, 2003));
}
COM: <s> a test case for a reported bug now fixed </s>
|
funcom_train/46265113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAppendStringFileExists() throws AssertionFailedException {
//write a simple String to the file.
FileStorage.appendXML(testWriteFile, "Test");
try{
fc = (FileConnection)Connector.open(testWriteFile);
//check if fileExists.
assertTrue(fc.exists());
} catch (IOException ex) {
fail();
System.out.println(ex.getMessage());
}
}
COM: <s> append an empty string and see if it properly creates a file </s>
|
funcom_train/28752981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAmtorconcentration(Long newVal) {
if ((newVal != null && this.amtorconcentration != null && (newVal.compareTo(this.amtorconcentration) == 0)) ||
(newVal == null && this.amtorconcentration == null && amtorconcentration_is_initialized)) {
return;
}
this.amtorconcentration = newVal;
amtorconcentration_is_modified = true;
amtorconcentration_is_initialized = true;
}
COM: <s> setter method for amtorconcentration </s>
|
funcom_train/8557440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadFragment(String file) {
try {
RegistryFragment fragment = createFragment(file);
// mark this fragment as changed
fragment.setChanged(true);
// if we get here, we successfully loaded the new fragment
updateFragment(file, fragment);
} catch (Throwable t) {
logger.error("DatabaseRegistryService: Could not unmarshal: " + file, t);
}
}
COM: <s> load and unmarshal a registry fragment from the file </s>
|
funcom_train/51340849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ICommitRecord valueAtIndex(final int index) {
/*
* Retrieve the entry for the commit record from the index. This
* also stores the actual commit time for the commit record.
*/
final Entry entry = ser.deserializeEntry( new DataInputBuffer( super.valueAt( index ) ));
return fetchCommitRecord(entry);
}
COM: <s> return the commit record at the index </s>
|
funcom_train/50313135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getSelection () {
checkWidget ();
if ((style & SWT.DROP_DOWN) != 0 && (style & SWT.READ_ONLY) != 0) {
return new Point (0, Fox.FXComboBox_getText(handle).length());
}
long textFieldHandle = getTextFieldHandle();
return new Point(Fox.FXTextField_getSelStartPos(textFieldHandle), Fox.FXTextField_getSelEndPos(textFieldHandle));
}
COM: <s> returns a code point code whose x coordinate is the start </s>
|
funcom_train/29092647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DirectoryRecord toDirectoryRecord(final BankFile.Record record) {
return new DirectoryRecord(BankFile.Record.BLZ_FORMAT.format(
new Integer(record.getBankCode())),
record.getShortDescription(),
BankFile.Record.PLZ_FORMAT.format(new Integer(
record.getPostalCode())), record.getCity(), record.getBic());
}
COM: <s> transforms a record to a </s>
|
funcom_train/13658605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public X509Certificate readCertificate( InputStream certStream, Provider provider )throws Exception{
CertificateFactory factory;
if( provider != null )
factory = CertificateFactory.getInstance( "X.509", provider );
else
factory = CertificateFactory.getInstance( "X.509");
X509Certificate cert=(X509Certificate)factory.generateCertificate( certStream );
return( cert );
}
COM: <s> reads a certificate from a stream and returns it </s>
|
funcom_train/1797190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpreadsheetQuery(String spreadsheetQuery) {
// check if setting to existing value
if (this.spreadsheetQuery == null ? spreadsheetQuery != null :
!this.spreadsheetQuery.equals(spreadsheetQuery)) {
// set to new value for customer parameter
this.spreadsheetQuery = spreadsheetQuery;
setStringCustomParameter("sq", spreadsheetQuery);
}
}
COM: <s> sets the structured query on the full text in the worksheet </s>
|
funcom_train/15867468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void abortScheme(SchemeInstance sch) throws MoiseException {
if (sch != null) {
if (schs.get( sch.getId()) == null) {
throw new MoiseConsistencyException("the scheme "+sch+" is not 'running'");
}
sch.abort();
schs.remove(sch.getId());
}
}
COM: <s> aborts and removes the scheme instance from the oes schemes </s>
|
funcom_train/25314428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendChatMessage() {
// break if no input
if (chatInput.getText().equals(""))
return;
String input = chatInput.getText();
chatInput.setText("");
// Send the message
String message=localPlayer().getName()+": "+input+"\n";
if(ChatText.getActiveInstance()!=null){
ChatText.getActiveInstance().addText(message);
}
else{
displayChatMessage(message+"\nFailed to send the message.");
}
}
COM: <s> send a new chat message to all players </s>
|
funcom_train/18141353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleThrowable(String phase, Throwable t) {
LogRecord record = new LogRecord(Level.WARNING, "Action failed in "+phase);
record.setThrown(t);
record.setSourceClassName(getClass().getName());
record.setSourceMethodName(phase);
LOG.log(record);
}
COM: <s> handle an uncaught throwable always sync to edt </s>
|
funcom_train/46701590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveXML(File xmlFile, UjoTextable ujo, String xmlHeader, Object context) throws IOException {
final OutputStream os = getOutputStream(xmlFile);
try {
saveXML(os, ujo, xmlHeader, context);
} finally {
os.close();
}
}
COM: <s> write properties to xml include xml header </s>
|
funcom_train/48405264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addResizedHandler(com.smartgwt.client.widgets.events.ResizedHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.ResizedEvent.getType()) == 0) setupResizedEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.ResizedEvent.getType());
}
COM: <s> add a resized handler </s>
|
funcom_train/15399057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setArgs (String[] args) throws DrmaaException {
if (args != null) {
this.args = new String[args.length];
System.arraycopy (args, 0, this.args, 0, args.length);
}
else {
this.args = null;
}
}
COM: <s> set the parameters passed as arguments to the job </s>
|
funcom_train/18214014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addXmlConfigurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Grouping_xmlConfiguration_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Grouping_xmlConfiguration_feature", "_UI_Grouping_type"),
EvaluationmodelPackage.Literals.GROUPING__XML_CONFIGURATION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the xml configuration feature </s>
|
funcom_train/13942289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeTool getToolByDescription(String description) {
for (int i = 0; i < treeTools.size(); i++) {
if (((TreeTool) treeTools.get(i)).getDescription().equals(description)) {
return (TreeTool) treeTools.get(i);
}
}
return null;
}
COM: <s> returns the tool to the specific description </s>
|
funcom_train/4924625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testServerInfo() {
// Record obtaining Server Info
final String SERVER_INFO = "Server Info";
this.recordReturn(this.context,
this.context.getServerInfo(this.office), SERVER_INFO);
// Test
this.replayMockObjects();
assertEquals("Incorrect server info", SERVER_INFO, this.servletContext
.getServerInfo());
this.verifyMockObjects();
}
COM: <s> ensure correct server information </s>
|
funcom_train/40765923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String headArrow() {
Map<String,Object> style = (Map<String,Object>) dict.get( "Style" );
if( style == null ) return "0";
Map<String,Object> stroke = (Map<String,Object>) style.get( "stroke" );
if( stroke == null ) return "0";
return (String) stroke.get( "HeadArrow" );
}
COM: <s> get the head arrow type for a line graphic </s>
|
funcom_train/31013228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BigDecimal getDecimal(String value, int scale) {
int s = 0;
if (value == null) {
return null;
}
int index = value.indexOf(".");
if (index >= 0) {
s = value.length() - index - 1;
}
if (index < 0 && s < scale) {
value = value + ".";
}
while (s < scale) {
value = value + "0";
s = s + 1;
}
try {
BigDecimal result = new BigDecimal(value);
return result.setScale(scale, BigDecimal.ROUND_HALF_DOWN);
} catch (Exception e) {
return null;
}
}
COM: <s> answer a decimal from a string value </s>
|
funcom_train/27976599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Character (Creature creature, CClass cclass) {
this.creature = creature;
advanceOrder = new Vector ();
Advance advance = new Advance (cclass);
advanceOrder.add (advance);
creature.addListener (this);
cclass.addListener (this);
if (cclass.getLevel () > 1) {
// TODO: Determine minimun XP required for current level of cclass.
}
// TODO: Add cclass bonuses and other features to creature.
}
COM: <s> create a single classed nth level character </s>
|
funcom_train/17292912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processBye(RequestEvent requestEvent, ServerTransaction serverTransactionId) {
SipProvider sipProvider = (SipProvider) requestEvent.getSource();
Request request = requestEvent.getRequest();
Dialog dialog = requestEvent.getDialog();
try {
Response response = messageFactory.createResponse(200, request);
serverTransactionId.sendResponse(response);
} catch (Exception ex) {
ex.printStackTrace();
System.exit(0);
}
}
COM: <s> process the bye request </s>
|
funcom_train/13409715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageData(ImageData data) {
for (int i = 0; i < data.width ;i++) {
for (int j = 0; j < data.height;j++) {
data.setPixel(i,j, (int) (heightmap.getTrueHeightAtPoint(i,j)));
}
}
imageData = data;
}
COM: <s> sets the image data and fill it with algorithm generated </s>
|
funcom_train/14026998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setInstrumentRtJarEnable(boolean b) {
if (!_headless) {
_sourceRtJarName.setEnabled(b);
_sourceRtJarBtn.setEnabled(b);
_cunitRtJarName.setEnabled(b);
_cunitRtJarBtn.setEnabled(b);
_destRtJarName.setEnabled(b);
_destRtJarBtn.setEnabled(b);
}
}
COM: <s> enable or disable the instrument rt </s>
|
funcom_train/43283968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(final DefaultModelPartEditor oldEditor) {
final Iterator it = oldEditor.getPropertyEditor()
.getCustomizationHandler().getCustomizations().iterator();
// int count = 0;
while (it.hasNext()) {
final IEditorCustomisation cust = (IEditorCustomisation) it.next();
if (!(cust instanceof IBuiltInCustomization)) {
addEditorCustomization(cust, -1, false);
}
// count++;
}
}
COM: <s> init with the settings of the old editor </s>
|
funcom_train/8008527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRegularExpressionRule(String regExp, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException {
_regExpressionRules = true;
HtmlComponentValidator val = getValidator();
String name = focusComp.getFullName();
if (_ds != null)
name = _ds.getColumnName(focusComp.getColumnNumber());
val.addRegularExpressionRule(name, regExp, computeErrorMessage(errorMessage, localizationKey), focusComp);
indexOtherRule();
}
COM: <s> adds a javascript rule to the validator </s>
|
funcom_train/18256485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinimumColor(Color valueColor) {
redMinimum = (float) valueColor.getRed() / 255.0F;
greenMinimum = (float) valueColor.getGreen() / 255.0F;
blueMinimum = (float) valueColor.getBlue() / 255.0F;
calculateColorValues();
}
COM: <s> sets the color at minimum intensity that is the color that </s>
|
funcom_train/10589311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeFrom(WidgetDefinition definition) throws Exception {
super.initializeFrom(definition);
if (!(definition instanceof SubmitDefinition)) {
throw new FormsException("Ancestor definition " + definition.getClass().getName() + " is not a SubmitDefinition.",
getLocation());
}
SubmitDefinition other = (SubmitDefinition) definition;
this.validateForm = other.validateForm;
}
COM: <s> initialize this definition with the other sort of like a copy constructor </s>
|
funcom_train/38829257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setRotationMatrix(Transform3D rotationMatrix, Vector3d op, Vector3d oq) {
// Vector "av" is defined as a class variable to avoid wastefull memory allocations.
_av.cross(op, oq); // av = op X oq
double cosA = op.dot(oq); // cosA = op * oq
// Set the axis angle object.
_a1.set(_av, Math.acos(cosA));
// Set the rotation matrix.
rotationMatrix.set(_a1);
}
COM: <s> computes a ap rotate vectors op onto oq </s>
|
funcom_train/4231532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocations(Object[] cells, double[][] locations) {
if (cells != null && locations != null
&& cells.length == locations.length) {
for (int i = 0; i < cells.length; i++)
setLocation(cells[i], locations[i][0], locations[i][1], true);
}
}
COM: <s> sets the locations of the specified cells according to the arrays </s>
|
funcom_train/29506857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetString_Index_false01() {
try {
DbwConnection conn = new DbwConnection(LOCATION, USER, PASSWORD,
HOST, DATABASE);
ResultSet rs = conn.executeQuery("SELECT * FROM complémentaire");
rs.absolute(2);
assert rs.getString(3).equals("") :
"Le String doit etre egale a '' : " + rs.getString(3);
} catch (Exception e) {
fail("Levee d'exception anormale : " + e.getMessage());
}
}
COM: <s> get string sur un champ text null </s>
|
funcom_train/37599379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRssFeed(RSSFeed feed) {
if (feed == null || !feed.isValid()) {
return;
}
if (!rssFeeds.contains(feed)) {
rssFeeds.add(feed);
RSSFeedUpdateThread updateThread = new RSSFeedUpdateThread(feed);
updateThread.start();
rssFeedUpdateThreads.add(updateThread);
fireAddedRssFeedPropertyChangeEvent(feed);
}
}
COM: <s> add an rssfeed object to the application context </s>
|
funcom_train/23764125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debug(String format, Object arg1, Object arg2) {
if (logger.isLoggable(Level.FINE)) {
String msgStr = MessageFormatter.format(format, arg1, arg2);
log(SELF, Level.FINE, msgStr, null);
}
}
COM: <s> log a message at level fine according to the specified format and </s>
|
funcom_train/1535807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private short getCalls(float[] bb) {
short r = 0xFF;
if (bb[0] > cntr[0])
r &= 0x55;
if (bb[1] < cntr[0])
r &= 0xAA;
if (bb[2] > cntr[1])
r &= 0x33;
if (bb[3] < cntr[1])
r &= 0xCC;
if (bb[4] < cntr[2])
r &= 0x0F;
if (bb[5] > cntr[2])
r &= 0xF0;
return r;
}
COM: <s> tests which children intersect a given bounding box </s>
|
funcom_train/50499796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void actionDelTheDictPartAfter() {
if ( ( delMsgBox != null ) && ( delSaveDict != null ) ) {
if ( delMsgBox.getPressedButtonIndex() == 1 ) {
m_dictionary.removeDict( delSaveDict );
setupList();
m_selIndex = -1;
setListIndex();
}
}
delMsgBox = null;
delSaveDict = null;
}
COM: <s> this is the second part </s>
|
funcom_train/35249814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void respond(final HttpServletResponse response, final InputStream in) throws IOException {
final ServletOutputStream out = response.getOutputStream();
try {
final byte[] buffer = new byte[65535];
for (;;) {
final int read = in.read(buffer);
if (read == -1) {
break;
}
out.write(buffer, 0, read);
}
} finally {
out.close();
}
}
COM: <s> respond with the content of a particular input stream </s>
|
funcom_train/25060790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupButtons() {
super.setupButtons();
// See if suitable data already has been selected
HashMap selections = getData().getSubjectSequenceDataNodeMap();
if (null != selections && selections.size() > 0) {
getButtonManager().setNextButtonEnabled(true);
}
else {
getButtonManager().setNextButtonEnabled(false);
}
}
COM: <s> checks if the next button should be enabled based on user selections </s>
|
funcom_train/15927398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFromMap(Object element, Item item) {
IResource resource= getCorrespondingResource(element);
if (resource != null) {
Object existingMapping= fResourceToItem.get(resource);
if (existingMapping == null) {
return;
} else if (existingMapping instanceof Item) {
fResourceToItem.remove(resource);
} else { // List
List list= (List) existingMapping;
list.remove(item);
if (list.isEmpty()) {
fResourceToItem.remove(list);
releaseList(list);
}
}
}
}
COM: <s> removes an element from the map </s>
|
funcom_train/36602020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(PGeometryVertex other) {
position.set(other.position);
normal.set(other.normal);
tangent.set(other.tangent);
diffuse.set(other.diffuse);
specular.set(other.specular);
for (int a=0; a<8; a++)
texCoords[a] = new Vector2f(other.texCoords[a]);
}
COM: <s> set the internal state to match that of the specified vert </s>
|
funcom_train/18215274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String checkJava(String minimalVersion) {
try {
String javaVersion = System.getProperty("java.version");
if (javaVersion.compareTo(minimalVersion) < 0) {
return "The server runs with JRE " + javaVersion
+ " - BugzillaMetrics needs at least JRE Version " + minimalVersion + "\n";
} else {
return "";
}
} catch (AccessControlException e) {
return handle(e, "Access Control Exception");
} catch (SecurityException e) {
return handle(e, "Security Exception");
}
}
COM: <s> checks whether the current java version is higher or at least the version </s>
|
funcom_train/39948152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void useCard(int sender, int card) {
ArrayList<String> hand = getHand(sender);
for (int i=0; i<hand.size(); i++) {
if (card == Integer.parseInt(hand.get(i))) {
hand.remove(i);
if (DEBUG_DEALING) System.out.println("Using card " + card + " for " + sender);
return;
}
}
}
COM: <s> uses a given card for a player </s>
|
funcom_train/18587806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBasesAndCoastWatchers(boolean[] activeAmericanCoastWatchers,boolean[] activeJapaneseCoastWatchers,Vector airBases,int[] activeAirBases) {
map.setBasesAndCoastWatchers(activeAmericanCoastWatchers,
activeJapaneseCoastWatchers,
airBases,
activeAirBases);
this.gui.glRefresh();
}
COM: <s> sets the active air bases and coast watchers </s>
|
funcom_train/10267935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean allTablesExist() {
Iterator itr = _cfg.getClassMappings() ;
while (itr.hasNext()) {
PersistentClass pClass = (PersistentClass) itr.next() ;
if (! tableExists(pClass.getTable().getName())) return false ;
}
return true;
}
COM: <s> iterates through all tables in cfg tests that they physically exist </s>
|
funcom_train/33606705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAngle_0args() {
System.out.println("angle");
R2 instance = new R2();
double expResult = 0.0;
double result = instance.angle();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of angle method of class r2 </s>
|
funcom_train/21799389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseConceptLine(String name) throws SyntaxException {
if (name == null) {
assert currentGroup != null;
assert currentGroupLevel.value == 2;
currentConcept.addFields(currentLine.parseSentenceList());
} else {
Concept c = new Concept(name);
if (currentLine.parseColonOrGroup()) {
currentGroupLevel.value++;
currentConcept = c;
} else {
currentConcept = null;
c.addFields(currentLine.parseSentenceList());
}
concepts.add(c);
}
}
COM: <s> parse a line in concept group </s>
|
funcom_train/45773714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteCellTextHelper(XAccessibleContext child, int startIndex, int endIndex) {
try {
XCell xcell = getSelectedCell(child);
if (xcell != null) {
deleteTextfromCell(xcell, startIndex, endIndex);
}
} catch (java.lang.Exception ex) {
}
}
COM: <s> delete text helper </s>
|
funcom_train/37015972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Resource getWorkspaceBase(Model model) {
Resource l_base = null;
Iterator ri = getWorkspaces(model);
if (ri != null) {
// try {
if (ri.hasNext()) {
l_base = (Resource)ri.next();
}
// } catch (RDFException e) {
// e.printStackTrace();
// }
}
return l_base;
}
COM: <s> gets the base of the first workspace </s>
|
funcom_train/22232913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return
"redSize : " + redSize + ", " +
"greenSize : " + greenSize + ", " +
"blueSize : " + blueSize + ", " +
"depthSize : " + depthSize + ", " +
"doubleBuffer : " + enumStr(doubleBuffer) + ", " +
"sceneAntialiasing : " + enumStr(sceneAntialiasing) + ", " +
"stereo : " + enumStr(stereo);
}
COM: <s> returns a string representation of this object </s>
|
funcom_train/29546035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleShellCloseEvent() {
Shell myShell = new Shell();
int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO;
MessageBox verifyQuit = new MessageBox(myShell, style);
verifyQuit.setText("Exiting...");
verifyQuit.setMessage("Are you sure you want to quit?");
if (verifyQuit.open() == SWT.YES) {
Globals.gMainWindow.close();
}
}
COM: <s> verify shutdown and if accepted close the main window </s>
|
funcom_train/12112811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC2(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.aggiungeSpeseJButton_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 c2 aggiunge spese jbutton </s>
|
funcom_train/18808768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getKeys() {
final List result = new java.util.ArrayList();
final Iterator iterator = this.data.iterator();
while (iterator.hasNext()) {
final KeyedValue kv = (KeyedValue) iterator.next();
result.add(kv.getKey());
}
return result;
}
COM: <s> returns the keys for the values in the collection </s>
|
funcom_train/14241060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateAssociationRole(MAssociationRole assocRole){
//get the associationRole name
String text="/"+assocRole.getName()+":";
//get the base association name
MAssociation assoc=assocRole.getBase();
if(assoc!=null){
text=text+assoc.getName();
}
return text;
}
COM: <s> generate the name of an association role of the form </s>
|
funcom_train/40448590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean alter(ClientLiaison client, Serializable changeObj) {
//System.err.println(" client #"+ clientID+" changing to "+value);
long tstamp= clock.getElapsedTime();
if (client==null) System.err.println("client==null !!");
if (client.eigenNode==null) System.err.println("eigenNode==null !!");
if (changeObj instanceof Integer)
return changeColor(tstamp, client, (Integer)changeObj);
else return false;
}
COM: <s> the method that implements player actions in this graph coloring game </s>
|
funcom_train/42727697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GuiTree getSubtree(int path) {
String[] param = new String[1];
String[] obj = this.objectToStringArray();
String operation = Operations.GET_SUBTREE;
param[0] = Integer.toString(path);
String[] returned = (String[]) this.executeOperation(operation, param,
obj);
GuiTree container = new GuiTree(returned[2]);
GuiTree returnedItem = new GuiTree(returned[0], container);
return returnedItem;
}
COM: <s> returns the subtree of the node at the specified code path code </s>
|
funcom_train/49651003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|46-getter|0|46-preInit
// write pre-init user code here
okCommand = new Command("Wy\u015Blij", Command.OK, 0);//GEN-LINE:|46-getter|1|46-postInit
// write post-init user code here
}//GEN-BEGIN:|46-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/47520001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getThreshold() {
Iterator iter = iThresholds.iterator();
double temp = 0.0;
int counter = 0;
while (iter.hasNext()) {
temp += (Double) iter.next();
counter++;
}
temp /= counter;
BigDecimal bd = new BigDecimal(temp).setScale(2, BigDecimal.ROUND_HALF_UP);
return bd.doubleValue();
}
COM: <s> this method calculates the average threshold </s>
|
funcom_train/48661567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group getGroup(String handle) throws ITunesUException {
String xml = this.showTree(handle);
String pattern = "//Group[Handle=" + handle + "]";
Element element = getElementByXPath(xml, pattern);
if (element == null) {
throw new ITunesUException("not a Group handle");
}
return Group.fromXmlElement(element);
}
COM: <s> retrieves a group by its handle </s>
|
funcom_train/47451231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void routeToAlias(String _alias, String callingEpId, String callRef) {
StringBuilder sb = new StringBuilder("RouteToAlias ");
sb.append(extractAliasName(_alias));
sb.append(" ");
sb.append(callingEpId);
sb.append(" ");
sb.append(callRef);
String s = sb.toString();
client.sendGkCommand(s);
}
COM: <s> send route to alias response to gnu gk </s>
|
funcom_train/3454394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerWithRMI() {
try {
Registry registry = LocateRegistry.createRegistry(port);
registry.rebind("cpm.server.Server_Interface", (Server_Interface)this);
Debug.print(Debug.TRACE,"RMI: Server bound at port "+port );
} catch (Exception e) {
Debug.printError(Debug.NORM, "Error while RMI registration", e);
System.exit(98);
}
}
COM: <s> registers this object to rmi name service </s>
|
funcom_train/21969065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOperationPeriod(long time_in_millis){
_operationPeriod = time_in_millis;
if ( _comp_op_minute != null )
_comp_op_minute.setTimeInterval(time_in_millis);
if (_dataChannelFactory != null){
float avg_op_min = _operationPeriod / 60000;
if (_dataChannelFactory.getDataChannelType() == DataChannelFactory.CUMULATIVE){
_dataSources[0].setDataSourceName("operation/" + avg_op_min + " minute");
}
}
}
COM: <s> changes the average period the default is 1 min used to </s>
|
funcom_train/3804583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void invalidateBranch(boolean force) {
if (force || !worldInvalid) {
worldInvalid = true;
for (SceneGraphNode child : getChildrenAttribute().getElements()) {
XFormNode childNode = (XFormNode) child;
if (force || !childNode.worldInvalid) {
childNode.invalidateBranch(force);
}
}
for (XFormListener listerer : xformListeners) {
listerer.invalidateTransformation();
}
}
}
COM: <s> sets world invalid flag on this node and all of its descendants </s>
|
funcom_train/33849751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AppVersion getCurrentAppVersion() {
return new AppVersion(getSequenceNumber()).setReleaseName(getReleaseName()).setTimestamp(getTimestamp())
.setNumClasses(getProjectStats().getNumClasses()).setCodeSize(getProjectStats().getCodeSize());
}
COM: <s> get the current app version </s>
|
funcom_train/2538674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getDistanceToPoint(Vector3D p) {
float sn = - normal.dot(p.getSubtracted(this.origin));
float sd = normal.lengthSquared();
Vector3D isec = p.getAdded(normal.getScaled(sn / sd));
return Vector3D.distance(isec, p);
}
COM: <s> calculates distance from the plane to point p </s>
|
funcom_train/3947729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deltaTransform(double[] src, int srcOff, double[] dst, int dstOff, int length) {
while (--length >= 0) {
double x = src[srcOff++];
double y = src[srcOff++];
dst[dstOff++] = x * m00 + y * m01;
dst[dstOff++] = x * m10 + y * m11;
}
}
COM: <s> applies the linear transformation part of this affine transform ignoring </s>
|
funcom_train/37596378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Type visit(Literal node) {
setValue(node, node.getValue());
if (node instanceof NullLiteral) { return setType(node, TypeSystem.NULL); }
else if (node instanceof StringLiteral) { return setType(node, TypeSystem.STRING); }
else { return setType(node, SymbolUtil.typeOfPrimitiveClass(node.getType())); }
}
COM: <s> visits a literal </s>
|
funcom_train/44771422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deleteIndex(File directory) {
// trivial if it does not exist anymore
if (!directory.exists()) {
return true;
}
// delete files first
File[] files = directory.listFiles();
for (int i = 0; i < files.length; i++) {
if (!files[i].delete()) {
return false;
}
}
// now delete directory itself
return directory.delete();
}
COM: <s> deletes the index code directory code </s>
|
funcom_train/854117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFile(final File file) throws IOException {
if (file.exists()) {
if (!file.delete()) {
throw new IOException(getString(R.string.exception_failed_delete_file,
file.toString()));
}
}
if (!file.createNewFile()) {
throw new IOException(getString(R.string.exception_failed_create_file, file.toString()));
}
}
COM: <s> creates a new file removes previously existing files </s>
|
funcom_train/8107544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createAndDistributeFields(int nFields){
fields.clear();
// First check that the area is properly set
if ( area == 0 ){throw new Error("Can't assign fields because area not yet set");}
double sideLength=Math.sqrt(area);
for(int i=0;i<nFields;i++){
double x=rGen.nextDouble()*sideLength;
double y=rGen.nextDouble()*sideLength;
fields.add(new Field(x,y));
}
this.assignFieldsToFarmers();
}
COM: <s> this assumes that farmers are already set up </s>
|
funcom_train/4858253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FullTypeSignature getTypeSignature(Class<?> clazz) {
StringBuilder sb = new StringBuilder();
if (clazz.isArray()) {
sb.append(clazz.getName());
} else if (clazz.isPrimitive()) {
sb.append(primitiveTypesMap.get(clazz).toString());
} else {
sb.append('L').append(clazz.getName()).append(';');
}
return TypeSignatureFactory.getTypeSignature(sb.toString(), false);
}
COM: <s> get the type signature corresponding to given class </s>
|
funcom_train/18518698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderItem find(String fieldName) {
if (fieldName == null) {
throw new NullPointerException("The field name cannot be null");
}
for (Iterator it = allorderItems.iterator(); it.hasNext();) {
OrderItem oi = (OrderItem) it.next();
if (oi.getFieldName().equals(fieldName)) {
return oi;
}
}
return null;
}
COM: <s> find the order item for the given field name </s>
|
funcom_train/48498217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object mapRow (ResultSet rs, int rowNumber) throws SQLException {
IssueDefinitionDTO definition = new IssueDefinitionDTO ();
definition.setDefinition_id(rs.getInt("definition_id"));
definition.setName(rs.getString("name"));
definition.setDefaultValue(rs.getString("defaultValue"));
definition.setShow(rs.getBoolean("visible"));
definition.setMandatory(rs.getBoolean("mandatory"));
return definition;
}
COM: <s> map the resulted row to a issue definition dto object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.