__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/10553386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearState() {
// DERBY-3009: executeConstantAction() stores some of its state in
// instance variables instead of local variables for convenience.
// These variables should be cleared after the execution of the
// constant action has completed, so that the objects they reference
// can be garbage collected.
td = null;
lcc = null;
dd = null;
dm = null;
tc = null;
activation = null;
}
COM: <s> clear the state of this constant action </s>
|
funcom_train/46769979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserTemplateTextModel getUserTemplateText(final long userTemplateTextId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SecurityData.getUserTemplateText(userTemplateTextId, chain, call);
}}; return (UserTemplateTextModel) call(method, call);
}
COM: <s> same transaction return the single user template text model for the primary key </s>
|
funcom_train/36911592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getField(int fldno) {
// refer to the schema for the appropriate conversion
switch (schema.fieldType(fldno)) {
case AttrType.INTEGER:
return getIntFld(fldno);
case AttrType.FLOAT:
return getFloatFld(fldno);
case AttrType.STRING:
return getStringFld(fldno);
default:
throw new IllegalStateException("invalid attribute type");
}
} // public Object getField(int fldno)
COM: <s> gets a fields value generically </s>
|
funcom_train/45502777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean renameFloor( Floor floor, String name ) {
// try to find out if the name is already used
if( floor.getName().equals( name ) )
return true;
for( Floor f : project.getBuildingPlan() )
if( f.getName().equals( name ) )
return false;
floor.setName( name );
return true;
}
COM: <s> renames a floor if that is possible </s>
|
funcom_train/5855970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean initializeComm(String my_id, String my_ip, int my_port) {
this.my_id = my_id;
this.my_ip = my_ip;
this.my_port = my_port;
client = new POutput(my_id, my_ip, my_port, PTKConstants.SERVER_IP, PTKConstants.SERVER_PORT, this);
return true;
}
COM: <s> initializes the applications communication with the ptk server </s>
|
funcom_train/16544610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGroupPanels(){
if( !(groups.isEmpty())){
for(Iterator<Group> iter = groups.iterator(); iter.hasNext();){
Group nextGroup = iter.next();
//If the contact has no group add to the temporaney group list
nextGroup.getPanel().updatePanel();
}
}else{
new DebugMessage(this.getClass(), "Cannot update groupPanels : groups are empty.");
}
}
COM: <s> this method defines the groups of a contact list </s>
|
funcom_train/14262986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convert() {
// Create the GUI (variable is final because used by inner class).
final JFrame jfF2X = new Gui();
//Create a Runnable to set the main visible, and get Swing to invoke.
EventQueue.invokeLater(new Runnable() {
public void run() {
jfF2X.setVisible(true);
}
});
return;
}
COM: <s> use the gui to convert </s>
|
funcom_train/3155376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOutputProductNameSafe() throws ProcessorException {
Request request = getRequest();
ProductRef prod = request.getOutputProductAt(0);
if (prod == null) {
throw new ProcessorException(ProcessorConstants.LOG_MSG_NO_OUTPUT_IN_REQUEST);
}
File prodFile = new File(prod.getFilePath());
String productName = FileUtils.getFilenameWithoutExtension(prodFile);
return productName;
}
COM: <s> retrieves the output product name from request </s>
|
funcom_train/25507052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TextMatcherFilterPanel getNumberPanel() {
if (numberPanel == null) {
numberPanel = new TextMatcherFilterPanel(TextMatcherFilterPanel.NUMBER_WORDING);
numberPanel.addPropertyChangeListener(TextMatcherFilterPanel.INCONSISTENCY_CAUSE_PROPERTY, inconsistencyListener);
numberPanel.setTextMatcher(data.getFilter().getNumberMatcher());
numberPanel.setCheckBoxesVisible(false);
}
return numberPanel;
}
COM: <s> this method initializes j panel111 </s>
|
funcom_train/43378748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NestedPieNode findNodeByPath(String path){
StringTokenizer tokenizer = new StringTokenizer(path, "/");
NestedPieNode node = this;
while(tokenizer.hasMoreTokens() && node != null && node instanceof NonLeafNestedPieNode){
String pathElement = tokenizer.nextToken();
node = ((NonLeafNestedPieNode)node).getChildNodeByName(pathElement);
}
return node;
}
COM: <s> elements of path must be separated by </s>
|
funcom_train/19837706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int bitLength() {
if (_size == 0)
return 0;
final int n = _size - 1;
final int bitLength = MathLib.bitLength(_words[n]) + (n << 6) - n;
return (this.isNegative() && this.isPowerOfTwo()) ? bitLength - 1
: bitLength;
}
COM: <s> returns the minimal number of bits to represent this large integer </s>
|
funcom_train/48527531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeToFile(File file) throws IOException {
ObjectOutputStream oos = null;
try {
oos = new XMLObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));
oos.writeObject(this);
} finally {
if (oos != null)
oos.close();
}
}
COM: <s> writes this certificate to the given file </s>
|
funcom_train/21020725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeEditMode(boolean editMode) {
textComponentEditibilityChanger(editMode, jtfPhone);
textComponentEditibilityChanger(editMode, jtfCellphone);
textComponentEditibilityChanger(editMode, jtfEmail);
textComponentEditibilityChanger(editMode, jtfFax);
revalidate();
}
COM: <s> changes the values of the contact object and update the database after it </s>
|
funcom_train/39972853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJNameTextField() {
if (jNameTextField == null) {
jNameTextField = new JTextField();
jNameTextField.setLocation(new Point(105, 15));
jNameTextField.setSize(new Dimension(135, 20));
jNameTextField.setToolTipText("5 to 50 characters long");
}
return jNameTextField;
}
COM: <s> this method initializes j name text field </s>
|
funcom_train/3328353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shiftDown(int index) {
if ((index <= 0) || (index >= elementCount)) return;
System.arraycopy(elements, index, elements, index - 1, elementCount - index);
// clean up for gc
elements[elementCount-1] = null;
} //-- shiftDown
COM: <s> shifts all elements at the specified index to down by 1 </s>
|
funcom_train/49317889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initSymbolPlotter() {
// initialize the symbol plotter
TablePlotter plotter = getPlotter();
if (plotter != null) {
plotter.setCanvasGraphics(_imageDisplay.getCanvasGraphics());
plotter.setCoordinateConverter(_imageDisplay.getCoordinateConverter());
_imageDisplay.getNavigatorPane().setPlotter(plotter);
}
}
COM: <s> initialize the symbol plotter </s>
|
funcom_train/36469851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeoPoint getPointFromMap(int xx, int yy, GeoPoint dest) {
// Position relative to image center
xx -= gpCenter.iX;
yy = gpCenter.iY - yy;
// Move center point by xx and yy - dest is allocated if null
dest = gpCenter.moveBy(true, vpEast, xx / dScPixelOnMeters,
vpNorth, yy / dScPixelOnMeters, dest);
return dest;
}
COM: <s> compute lat and long from position on map </s>
|
funcom_train/49338982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCorners( int NWn, int NWe, int NEn, int NEe, int SEn, int SEe, int SWn, int SWe) {
NWnorthing = NWn;
NWeasting = NWe;
NEnorthing = NEn;
NEeasting = NEe;
SEnorthing = SEn;
SEeasting =SEe;
SWnorthing = SWn;
SWeasting = SWe;
}
COM: <s> set the corners for this area </s>
|
funcom_train/37053065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getEdges(Object v, EdgeType type) {
List out = new ArrayList();
if (type.equals(EdgeType.OUT) || type.equals(EdgeType.ALL)) {
out.addAll((Set) outEdgeMap.get(v));
}
if (type.equals(EdgeType.IN) || type.equals(EdgeType.ALL)) {
out.addAll((Set) inEdgeMap.get(v));
}
return out;
}
COM: <s> returns the edge objects of the given directionality for </s>
|
funcom_train/5787999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTotalMilliseconds() {
long tHours = getHours() + (getDays() * 24);
long tMin = getMinutes() + (tHours * 60);
long tSec = getSeconds() + (tMin * 60);
long tMSec = (getMicroseconds() / 1000) + (tSec * 1000);
return tMSec;
}
COM: <s> returns the total length of the interval in milliseconds </s>
|
funcom_train/21850583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object prop) {
super.setValue(prop);
if (prop instanceof ShadowBorderProperty) {
ShadowBorderProperty bp = (ShadowBorderProperty) prop;
m_type = bp.m_type;
if (m_start_color == null)
m_start_color = new ColorProperty();
if (m_end_color == null)
m_end_color = new ColorProperty();
m_start_color.setValue(bp.m_start_color);
m_end_color.setValue(bp.m_end_color);
m_thickness = bp.m_thickness;
m_symmetric = bp.m_symmetric;
} else {
assert (false);
}
}
COM: <s> sets this property to that of another shadow border property </s>
|
funcom_train/46060162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildXPathExpression(Element selectionElement, StringBuilder expr, boolean not_switch, boolean use_switch) {
// assert: use_switch always true
if (!use_switch) throw new RuntimeException("error in not_selection; use_switch was switched off");
List elems = selectionElement.elements();
Element child = (Element)elems.get(0);
String name = child.getName();
ExpressionBuilder eb = QTIHelper.getExpressionBuilder(name);
eb.buildXPathExpression(child, expr, !not_switch, true);
}
COM: <s> element and selection selection metadata and selection or selection not selection </s>
|
funcom_train/42476985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean didMercenaryCompanyLoseMember() {
boolean killed = false;
for (int i = 0; i < mercenaryGroups.size(); i++) {
MercenaryCompany hiredCompany = mercenaryGroups.get(i);
for (int j = 0; j < members.size(); j++) {
PartyMember member = members.get(j);
if (member.isDead()
&& hiredCompany.employs(member)) {
killed = true;
break;
}
}
}
return killed;
}
COM: <s> determines if a mercenary company has lost a member </s>
|
funcom_train/46639750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private short getColorIndex(Color swtColor) {
if (!colorIndex.contains(swtColor)) {
colorIndex.add(swtColor);
HSSFPalette palette = ((HSSFWorkbook) xlWorkbook).getCustomPalette();
palette.setColorAtIndex((short) (55 - colorIndex.indexOf(swtColor)),
(byte) swtColor.getRed(),
(byte) swtColor.getGreen(),
(byte) swtColor.getBlue()
);
}
return (short) (55 - colorIndex.indexOf(swtColor));
}
COM: <s> note the excel hssf format only supports a maximum of 56 custom colors </s>
|
funcom_train/46994795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.NORTH;
gridBagConstraints.insets = new Insets(7, 7, 7, 7);
gridBagConstraints.gridy = 0;
this.setSize(404, 218);
this.setLayout(new GridBagLayout());
this.add(getOctavePanel(), gridBagConstraints);
}
COM: <s> this method initializes this </s>
|
funcom_train/49627825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSONObject passwordCheck(final String pwd, final String cnf) {
JSONObject error = null;
if ((pwd == null || cnf == null)) {
error = new JSONObject();
error.put("e", "passwordsIllegal");
} else if (!pwd.equals(cnf)) {
error = new JSONObject();
error.put("e", "passwordsDontMatch");
}
return error;
}
COM: <s> checks the password for validity </s>
|
funcom_train/12541334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStatusHeader(IStatus status) {
Throwable t= status.getException();
if (t instanceof CharConversionException)
return TextEditorMessages.getString("Editor.error.unreadable_encoding.header"); //$NON-NLS-1$
if (t instanceof UnsupportedEncodingException)
return TextEditorMessages.getString("Editor.error.unsupported_encoding.header"); //$NON-NLS-1$
return null;
}
COM: <s> returns a status header for the given status </s>
|
funcom_train/1105847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyScrim(Color color)
{
for (int x = getWidth() - 1; x >= 0; x--)
for (int y = 0; y < getHeight(); y++)
{
Color pixel = getPixel(x, y);
if (!pixel.equals(color) && !pixel.equals(bgColor) )
setRGB(x, y, bgColor.getRGB());
}
}
COM: <s> filters out all the colors but the background and the given color </s>
|
funcom_train/38353491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEventSource(Object m) {
Collection eventLists = events.values();
for (Iterator i = eventLists.iterator(); i.hasNext();) {
List eventList = (List)i.next();
for (Iterator j = eventList.iterator(); j.hasNext();) {
EventInfo evt = (EventInfo)j.next();
if (evt.getEventSource() != null && evt.getEventSource() == m) {
return true;
}
}
}
return false;
}
COM: <s> returns true if there are objects which would like to receive events </s>
|
funcom_train/45232031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getTxpIndirizzo() {
if (txpIndirizzo == null) {
txpIndirizzo = new JTextPane();
txpIndirizzo.setText(EnvProperties.getInstance().getProperty(
EnvProperties.INDIRIZZO));
txpIndirizzo.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent e) {
EnvProperties.getInstance().setProperty(
EnvProperties.INDIRIZZO,txpIndirizzo.getText());
}
});
}
return txpIndirizzo;
}
COM: <s> this method initializes txp indirizzo </s>
|
funcom_train/9736903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startDialog () {
this.progressObj = new ProgressMonitor("Chinese Postman Problem", this);
this.progressObj.setText("GraphRandomGenerator(50,1000,0.0,2,10)\n// node#=50, arc#=1000, arcMixture: 0 directed, 1.0 undirected, 0.5 for half of undirected, minDist=2, maxDist=10");
}
COM: <s> starts up the progress monitor dialog window </s>
|
funcom_train/43268952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addLinkRealization(ILinkRealization linkRealization) {
if ((linkRealizationSet == null) ||
(linkRealizationSet == EMPTY_SET)) {
linkRealizationSet = new TreeSet();
}
linkRealization.setConceptDelegate(this);
boolean added = linkRealizationSet.add(linkRealization);
// Required by Castor
if (!added) {
linkRealization.setConceptDelegate(null);
}
return added;
}
COM: <s> adds a code link realization code object to the collection </s>
|
funcom_train/3674382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void outputJDOM(Document d, XMLConsumer handler) {
NoDocumentFilter filter = new NoDocumentFilter(handler);
SAXOutputter out = new SAXOutputter(filter);
out.setReportNamespaceDeclarations(true);
try {
out.output(d);
}
catch (Exception ex) {
log.error("Unable to serialize JDOM document", ex);
}
}
COM: <s> serializes a jdom document </s>
|
funcom_train/23278670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirttAwardFile(DirttAward da, FileInformation daFile){
if(!validateClass(da)) throw new ARISException("Invalid DirttAward");
if(!validateClass(daFile)) throw new ARISException("Invalid DirttAward File");
getHibernateTemplate().save(daFile);
getHibernateTemplate().update(da);
}
COM: <s> adds the file information to the database and updates the dirtt award </s>
|
funcom_train/10802103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateNoPKFields() {
FieldMetaData[] fields = getDeclaredFields();
for (int i = 0; i < fields.length; i++)
if (fields[i].isPrimaryKey())
throw new MetaDataException(_loc.get("bad-pk", fields[i]));
}
COM: <s> validate that this class doesnt declare any primary key fields </s>
|
funcom_train/51069342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public boolean write (TapestryNeighborInfo ni) {
int [] d = digits (ni.guid);
int digit = 0;
for ( ; digit < digits_per_guid(); ++digit) {
if (d [digit] != _self_digits [digit])
break;
}
if (digit >= digits_per_guid())
return addSelf (ni.guid);
else
return write (ni.level, d [ni.level], ni.node_id, ni.guid,
new Double (ni.rtt_ms));
}
COM: <s> write for dummies </s>
|
funcom_train/26411496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInputTag(String id) {
if (!formTagMap.keySet().contains(id)) {
category.warn("User requested input tag for invalid metric: " + id);
throw new IllegalArgumentException("Invalid metric name: " + id);
}
return (String)formTagMap.get(id);
}
COM: <s> retreive the input tag for the given metric id </s>
|
funcom_train/50149174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisibleRowCount(int visibleRowCount) {
int oldVisibleRowCount = this.visibleRowCount;
this.visibleRowCount = visibleRowCount;
propertyChangeSupport.firePropertyChange ("visibleRowCount", new Integer (oldVisibleRowCount), new Integer (visibleRowCount));
}
COM: <s> setter for property visible row count </s>
|
funcom_train/2903756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML(){
if(type == LinuxSupportedTask.FORK_EXEC){
return generateXML(arg, null, "native");
}
else if(type == LinuxSupportedTask.EXEC_JAR){
return generateXML(arg, jvmOpt, "jar");
}
else if(type == LinuxSupportedTask.EXEC_CLASS){
return generateXML(fqc, jvmOpt, "class");
}
else if(type == ZCommand.BUILD_IN){
return generateXML(arg, null, "buildin");
}
return null;
}
COM: <s> an xml string representation of this command </s>
|
funcom_train/15623463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllMultiColumnFeatures() throws M4Exception {
Collection c = this.getAllMultiColumnFeatures();
Iterator it = (new Vector(c)).iterator();
while (it.hasNext()) {
edu.udo.cs.miningmart.m4.core.Feature mcf = (edu.udo.cs.miningmart.m4.core.Feature) it.next();
this.removeBaseAttribute(mcf.getName());
}
}
COM: <s> removes all multi column features from this concept </s>
|
funcom_train/36679438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player getPlayer(Color color) {
boolean createNewPlayer = !hasMapPlayerFor(color);
if (createNewPlayer) {
int nextFreeID = getNextFreeMapPlayerID();
Player mapPlayer = new Player(nextFreeID, color);
mapPlayer.setName("map player");
return mapPlayer;
} else {
return getMapPlayerFor(color);
}
}
COM: <s> return a map player from this map for the given color </s>
|
funcom_train/31657701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VariableBinding getVariableBinding(Variable variable) {
if (variable == null)
return null;
VariableBinding variableBinding = null;
Iterator<Map<Variable,VariableBinding>> i = this.variableBindingTuples.iterator();
while (i.hasNext()) {
Map<Variable,VariableBinding> variableBindingTuple = i.next();
if ((variable != null)
&& (variableBindingTuple.containsKey(variable))) {
variableBinding = variableBindingTuple.get(variable);
break;
}
}
return variableBinding;
}
COM: <s> returns a variable binding for the variable if it exist in the variable </s>
|
funcom_train/26525705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties fetch(String id) {
Properties answer = null;
if( id == null ) return null;
PropertyLocation sample = new PropertyLocation();
// first try to find it in the internal store.
sample.idName = id;
if(propStore.contains(sample)) answer =
((PropertyLocation)propStore.get(propStore.indexOf(sample))).props;
return answer;
}
COM: <s> looks up the given property id in the internal store </s>
|
funcom_train/8027699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdge(final Edge edge) {
edges.add(new Edge(map.get(edge.getFrom().getIndex()),
map.get(edge.getTo().getIndex()), edge.getLabel(), edge.getNote(), edge.getType(),
edge.getRenderType(),edge.getDescription()));
}
COM: <s> adds an edge </s>
|
funcom_train/12662450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task buildTask() {
final Controller controller = new Controller();
controller.setProject(getProject());
final ExecuteAction ea = ExecuteAction.create(framework, action);
ea.setProject(getProject());
controller.setExecuteAction(ea);
setTask(controller);
return controller;
}
COM: <s> builds task to execute the action </s>
|
funcom_train/29775208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WayPoint getPostionOfDirection(int direction ,int xPos,int yPos){
if(direction == UP){
return new WayPoint(xPos,yPos-1);
}else if(direction == DOWN){
return new WayPoint(xPos, yPos+1);
}else if(direction == LEFT){
return new WayPoint(xPos-1, yPos);
}else if(direction == RIGHT){
return new WayPoint(xPos+1, yPos);
}
// if wrong direction return null
return null;
}
COM: <s> gets a new postion of a direction </s>
|
funcom_train/6347660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChar() throws IOException {
PropertyStorageFactory f = PropertyStorageFactoryCreator.createXMLPropertyStorageFactory();
PropertyStorageExtended store = f.createPropertyStorage(TESTFILE);
store.storeChar("charkey", TEST_CHARS[0]);
assertEquals(store.getChar("charkey"), TEST_CHARS[0]);
}
COM: <s> tests storing and loading of char values </s>
|
funcom_train/17892339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIconType(final int icontype) {
if (Palette.icontype != icontype) {
Palette.icontype = icontype;
final Component[] comps = getComponents();
PalettePanel panel;
for (int i = 0; i < comps.length; i++) {
panel = (PalettePanel)comps[i];
panel.setIconType(icontype);
}
}
}
COM: <s> sets the type of icon in the palette </s>
|
funcom_train/51702601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CoordinateReferenceSystem createCRS(String code) {
if (code == null) return null;
try{
return this.crsModel.createCRS(code);
} catch (FactoryException e){
Resources.LOGGER.warning("Could not create projected CRS \"" //$NON-NLS-1$
+ code + "\""); //$NON-NLS-1$
return null;
}
}
COM: <s> creates a crs from an epsg code using the default crs model registered </s>
|
funcom_train/7759834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPerformanceHacks() {
workspaces = new String[connections.size()];
for (int i = 0; i < connections.size(); i++) {
Connection connection = connections.get(i);
workspaces[i] = perforcePreferences.isCaseSensetiveWorkspaces() ? connection.getWorkspacePath() : connection.getWorkspacePath().toLowerCase();
}
}
COM: <s> small performance hack to check for workspaces as fast as possible </s>
|
funcom_train/18593321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Step createActionMap(JComponent target, String actionKey) {
ComponentReference cr = getResolver().addComponent(target);
return new abbot.script.Action(getResolver(), null,
"actionActionMap",
new String[] { cr.getID(),
actionKey },
JComponent.class);
}
COM: <s> create a jcomponent input mapped action invocation </s>
|
funcom_train/27712945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createSeq(String src[]) {
StringBuffer str = new StringBuffer();
str.append('(');
for (int i = 0; i < src.length; i++) {
str.append(src[i]);
if (i < src.length - 1) {
str.append(',');
}
}
str.append(')');
return str.toString();
} // createSeq(String[]):String
COM: <s> creates an all content model sequence string </s>
|
funcom_train/31890538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setActionsEnabled(boolean b) {
exportAction.setEnabled(b);
if (b == true) {
filterAction.setEnabled(tableModel.isFiltered() ? !b : b);
removeFilterAction.setEnabled(tableModel.isFiltered() ? b : !b);
} else {
filterAction.setEnabled(false);
removeFilterAction.setEnabled(false);
}
importAction.setEnabled(b);
printAction.setEnabled(b);
selectColumnsAction.setEnabled(b);
showDetailAction.setEnabled(b);
}
COM: <s> enable or disable all actions according to given boolean </s>
|
funcom_train/17952183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getRelatednessTo(Article art) throws Exception {
if (contextArticles.size() == 0 || totalWeight == 0)
return 0 ;
double relatedness = 0 ;
for (Article contextArt: contextArticles) {
double r = relatednessCache.getRelatedness(art, contextArt) ;
r = r * contextArt.getWeight() ;
relatedness = relatedness + r ;
}
return relatedness / totalWeight ;
}
COM: <s> compares the given article to all context anchors </s>
|
funcom_train/35516722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDifferenceInDays() {
GregorianCalendar c = new GregorianCalendar(2005, Calendar.MAY, 2, 4, 10, 59);
GregorianCalendar cal = new GregorianCalendar(2005, Calendar.AUGUST, 2, 4, 10, 59);
assertTrue(89 < BaseCalendar.approximateDifferenceInDays(c.getTime(), cal.getTime()));
assertTrue(94 > BaseCalendar.approximateDifferenceInDays(c.getTime(), cal.getTime()));
}
COM: <s> tests difference in days calculation </s>
|
funcom_train/28127499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean validateFields() {
boolean valid = false;
String name = nameTextField.getText();
if (name.length()!=0) {
valid = true;
}
else {
JOptionPane.showMessageDialog(this, "You must enter a name for the holiday!");
nameTextField.requestFocus();
valid = false;
}
return valid;
}
COM: <s> validates the entries in the dialog </s>
|
funcom_train/16849515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map getSourcesAsMap(List sources) {
Map result = new HashMap(sources.size());
for (Iterator iter = sources.iterator(); iter.hasNext();) {
SourceData item = (SourceData) iter.next();
result.put(item.getSource(), item.getSource());
}
return result;
}
COM: <s> converts a list of data sources to a map </s>
|
funcom_train/47832905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertInString(final Reader reader) {
BufferedReader in = new BufferedReader(reader);
String x = null;
String result = null;
try {
x = in.readLine();
while (x != null) {
result += x;
x = in.readLine();
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return x;
}
COM: <s> convert a reader in a string printable format </s>
|
funcom_train/45061894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnCancel() {
if (btnCancel == null) {
btnCancel = new JButton();
btnCancel.setText("Cancel");
btnCancel.setBounds(289, 8, 73, 26);
btnCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
result = CANCEL;
NodeTableOptionDialog.this.dispose();
}
});
}
return btnCancel;
}
COM: <s> this method initializes j button4 </s>
|
funcom_train/36003201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPojoParameters() {
getParameters().put("proxyTargetType", "POJO");
PojoParameters pojoParameters = new PojoParameters();
pojoParameters.setClassName("com.legstar.xsdc.test.cases.jvmquery.JVMQuery");
pojoParameters.setMethodName("queryJvm");
pojoParameters.add(getParameters());
}
COM: <s> generate a set of pojo parameters </s>
|
funcom_train/7441432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setZScaledMatrix() {
int n = zSurfaceMatrix.length;
zScaledMatrix = new double[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
zScaledMatrix[i][j] = normalizingConstant * zSurfaceMatrix[i][j];
}
}
}
COM: <s> z scaled matrix normalizing constant z surface matrix </s>
|
funcom_train/43245877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetBNWorkPhone() {
System.out.println("setBNWorkPhone");
String bNWorkPhone = "";
EmergencyContactDG5Object instance = new EmergencyContactDG5Object();
instance.setBNWorkPhone(bNWorkPhone);
// 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 bnwork phone method of class org </s>
|
funcom_train/12188833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNegativeFractionLessThanHalf() throws ExpressionException {
final Function function = new FloorFunction();
Value result = function.invoke(expressionContextMock, new Value[]{
factory.createDoubleValue(-10.2)});
assertTrue(result instanceof DoubleValue);
assertTrue(-11.0 == ((DoubleValue) result).asJavaDouble());
}
COM: <s> tests if function works correctly when argument is negative </s>
|
funcom_train/41976024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPanelPassword(ControlPanelPassword panelPassword) {
// copy the password
this.panelPassword.setDigit1(panelPassword.getDigit1());
this.panelPassword.setDigit2(panelPassword.getDigit2());
this.panelPassword.setDigit3(panelPassword.getDigit3());
this.panelPassword.setDigit4(panelPassword.getDigit4());
}
COM: <s> sets the param as the panel password </s>
|
funcom_train/1008463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RenderLoops getRenderLoops(SunGraphics2D sg2d) {
SurfaceType src = getPaintSurfaceType(sg2d);
CompositeType comp = getFillCompositeType(sg2d);
SurfaceType dst = sg2d.getSurfaceData().getSurfaceType();
Object o = loopcache.get(src, comp, dst);
if (o != null) {
return (RenderLoops) o;
}
RenderLoops loops = makeRenderLoops(src, comp, dst);
loopcache.put(src, comp, dst, loops);
return loops;
}
COM: <s> return a render loops object containing all of the basic </s>
|
funcom_train/26202117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printOverviewHeader() {
if (root.inlineTags().length > 0) {
printSummaryComment(root);
p();
bold(getText("doclet.See"));
br();
printNbsps();
printHyperLink("", "overview_description",
getText("doclet.Description"), true);
p();
}
}
COM: <s> print the overview summary comment for this documentation </s>
|
funcom_train/10353437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lock() throws IOException, xBaseJException {
long thisWait = fileLockWait / 5;
for (long waitloop = fileLockWait;
waitloop > 0;
waitloop -= thisWait) {
filelock = channel.tryLock(0, ffile.length(), useSharedLocks);
if (filelock != null)
return;
synchronized (this) {
try {
wait(thisWait);
} catch (InterruptedException ie) {
;
}
} // sync
}
throw new xBaseJException("file lock wait timed out");
}
COM: <s> locks the entire database </s>
|
funcom_train/10594431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws Exception {
this.enableFullScreen = this.portalService.getConfigurationAsBoolean(Constants.CONFIGURATION_FULL_SCREEN_ENABLED, Constants.DEFAULT_CONFIGURATION_FULL_SCREEN_ENABLED);
this.enableMaximized = this.portalService.getConfigurationAsBoolean(Constants.CONFIGURATION_MAXIMIZED_ENABLED, Constants.DEFAULT_CONFIGURATION_MAXIMIZED_ENABLED);
this.initContainer();
}
COM: <s> initialize this component </s>
|
funcom_train/7589395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getUpperBound() throws JMException {
Class cls = java.lang.String.class;
String name = cls.getName();
Configuration.logger_.severe("Class " + name +
" does not implement method getUpperBound()");
throw new JMException("Exception in " + name + ".getUpperBound()") ;
} // getUpperBound
COM: <s> gets the upper bound value of a variable </s>
|
funcom_train/16452437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPaneTopLeftRight() {
if (jSplitPaneTopLeftRight == null) {
jSplitPaneTopLeftRight = new JSplitPane();
jSplitPaneTopLeftRight.setDividerLocation(470);
jSplitPaneTopLeftRight.setRightComponent(getSpousePanel());
jSplitPaneTopLeftRight.setLeftComponent(getSubjectPanel());
jSplitPaneTopLeftRight.setDividerSize(5);
// jSplitPaneTopLeftRight.setMinimumSize(new Dimension(950,285));
}
return jSplitPaneTopLeftRight;
}
COM: <s> gets the j split pane top left right </s>
|
funcom_train/2878772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanup(Connection conn) {
SocketChannel clientChannel = conn.getClientSocket();
SocketChannel serverChannel = conn.getServerSocket();
clients.remove(clientChannel);
servers.remove(serverChannel);
// Inform the delayedWriter about the closure
delayedWriter.connectionClosed(conn);
// Inform ths server that the connection has closed
server.dataTransferConnectionClosed(conn);
}
COM: <s> remove any associated trace of the specified connection from the </s>
|
funcom_train/8022158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMessage() {
System.out.println("getMessage");
int id = 0;
ArrayList<Message> expResult = null;
ArrayList<Message> result = MessageManager.getMessage(id);
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 get message method of class vgrabber </s>
|
funcom_train/43476971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AuthToken getAuthToken() throws TransportException, UDDIException {
// Get an authorization token
log.debug("Ask for authToken.");
// Pass in userid and password registered at the UDDI site
AuthToken authToken = uddiProxy.get_authToken(userName, password);
log.debug("Returned authToken from a UDDI:" + authToken.getAuthInfoString());
return authToken;
}
COM: <s> asks for an authentification </s>
|
funcom_train/18742176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComponent createMainPane() {
// set up the split editor pane
JSplitPane result =
new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, createGraphPane(),
createLabelPane());
result.setOneTouchExpandable(true);
result.setResizeWeight(1.0);
result.setBorder(null);
return result;
}
COM: <s> component on which the graph and the label tree are displayed </s>
|
funcom_train/47886481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPanel() {
win.panLedsCtl = new JPanel();
win.getContentPane().add(win.panLedsCtl,
new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.NORTH,
GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 0));
win.panLedsCtl.setLayout(null);
}
COM: <s> create the panel </s>
|
funcom_train/10391282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File resolveFile(final String s) {
if(getProject() == null) {
// Note FileUtils.getFileUtils replaces FileUtils.newFileUtils in Ant 1.6.3
return FileUtils.getFileUtils().resolveFile(null, s);
} else {
return FileUtils.getFileUtils().resolveFile(getProject().getBaseDir(), s);
}
}
COM: <s> resolves the relative or absolute pathname correctly </s>
|
funcom_train/3020719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graph getSubgraph(Object id) {
Graph g = null;
for (Graph sg : subgraphs) {
if (((id == null) && (sg.getId() == null)) || id.equals(sg.getId())) {
g = sg;
}
else {
g = sg.getSubgraph(id);
}
if (g != null) {
break;
}
}
return g;
}
COM: <s> returns the subgraph having the given id and being owned by this </s>
|
funcom_train/3393448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scope dup(Symbol newOwner) {
Scope result = new Scope(this, newOwner, this.table);
shared++;
// System.out.println("====> duping scope " + this.hashCode() + " owned by " + newOwner + " to " + result.hashCode());
// new Error().printStackTrace(System.out);
return result;
}
COM: <s> construct a fresh scope within this scope with new owner </s>
|
funcom_train/27753529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuItem createMenuItem(Menu parent, String text, int accelerator,
SelectionListener listener) {
MenuItem result = new MenuItem(parent, SWT.PUSH);
result.setText(text);
result.setAccelerator(accelerator);
result.addSelectionListener(listener);
return result;
}
COM: <s> creates a new menu item with the specified parent text accelerator and </s>
|
funcom_train/46758421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(Object key, IBaseModel m) throws Exception {
if (key == null || m == null || !cacheSupport) {
return;
}
try {
lock.requestWrite();
IBaseModel value = m;
if (newObjectOnGet) {
IBaseModel copy = m.getClass().newInstance();
copy.copyAllFrom(m);
value = copy;
}
models.put(key, value);
} finally {
lock.writeFinished();
}
}
COM: <s> cache a object </s>
|
funcom_train/12149104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getNoteInfo(Principal principal, Vector noteInfoVector, List noteURIs, int depth, String nbRoot){
Iterator notes = noteURIs.iterator();
while(notes.hasNext()){
NotebookNode note = (NotebookNode)notes.next();
NoteBean bean = new NoteBean(note);
bean.setIndent(depth);
noteInfoVector.add(bean);
getNoteInfo(principal, noteInfoVector, note.getChildren(), depth+1, nbRoot);
}
}
COM: <s> creates note bean objects </s>
|
funcom_train/31153381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ClassInfo loadDelegate() {
ClassInfo found = null;
Resolver resolver = new Resolver(declaringClass,
declaringClass.getCompilationUnit().getImports());
try {
return getJane().findClass(resolver.resolveType(className));
} catch (JaneException e) {
log.error("Error resolving class: " + className, e);
// TODO: do something here.
return null;
}
}
COM: <s> load the delegate </s>
|
funcom_train/2557958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Converter getConverter(Context context) throws Exception {
String ignore = getEmpty(context);
Type type = getContact();
if(!context.isPrimitive(type)) {
throw new AttributeException("Cannot use %s to represent %s", label, type);
}
return new Primitive(context, type, ignore);
}
COM: <s> creates a code converter code that can convert an attribute </s>
|
funcom_train/36013105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createAnnotationDescription(String annotation, String description) {
annotation = annotation.trim();
if (!annotation.equals("")) {
annotation = ReviewI18n.getString("ReviewEditorView.label.annotation.prefix")
+ annotation
+ ReviewI18n.getString("ReviewEditorView.label.annotation.suffix");
}
return annotation + description;
}
COM: <s> creates the formatted annotation and description text </s>
|
funcom_train/25060357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writePublication(File publicationDir, Publication publication, PublicationType jbPublication) throws JAXBException, IOException {
String pubFileName = createPublicationFileName(publication);
File publicationFile = FileUtil.ensureFileExists(publicationDir.getAbsolutePath() + FileUtil.FILE_SEPARATOR + pubFileName);
writeJaxbObject(jbPublication, publicationFile);
}
COM: <s> this method is responsible for writing out a publication to the filesystem </s>
|
funcom_train/49353676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValidationUniqueIndex(String properties, String bundle){
StringTokenizer st = new StringTokenizer(properties, ",");
List indexList = new ArrayList();
while (st.hasMoreTokens()){
String property = st.nextToken();
property = property.trim();
indexList.add(property);
}
if (indexProperties == null){
indexProperties = new ArrayList();
}
if (indexBundles == null){
indexBundles = new ArrayList();
}
indexProperties.add(indexList);
indexBundles.add(bundle);
}
COM: <s> add properties to validation one unique index </s>
|
funcom_train/32362601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEventQueueListener(IEventQueueListener listener) {
synchronized (getLock()) {
if (finalizing) {
throw new IllegalStateException("Event queue is being finalized");
}
if (listeners.contains(listener))
return;
listeners = new LinkedHashSet(listeners);
listeners.add(listener);
listeners = Collections.unmodifiableSet(listeners);
}
}
COM: <s> adds specified queu listener to collectino of listeners that are notified </s>
|
funcom_train/8490288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int wildCardLocation(){
if (!(getData().contains(WILD_CARD))){
return NO_WILDCARD;
}
else if (getData().startsWith(WILD_CARD) &&
getData().endsWith(WILD_CARD)){
return BEGGINING_AND_END;
}
else if ( getData().startsWith( WILD_CARD ) ){
return END;
}
else {
return BEGGINING;
}
}
COM: <s> checks the location of the wild card within a string </s>
|
funcom_train/46761650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final AppointmentModel appointment, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
Long appointmentId = store(appointment, chain, call);
chain.execute();
// return primary key
return appointmentId;
} catch (Exception ex) {
Log.exception(ex);
Log.error(appointment);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> save the appointment model model creating a new appointment or updating existing rows </s>
|
funcom_train/18892289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDirectory(File dir) {
File[] originalDirs = getDirectories();
File[] dirs = new File[getDirectories().length + 1];
System.arraycopy(originalDirs, 0, dirs, 0, originalDirs.length);
dirs[originalDirs.length] = dir;
setDirectories(dirs);
}
COM: <s> add one directory to the controlled set </s>
|
funcom_train/22908967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor) {
// Native object
if (flavor.equals(DATA_FLAVOR))
return true;
// String
if (flavor.equals(java.awt.datatransfer.DataFlavor.stringFlavor))
return true;
// We can't do anything else
return false;
} // end isDataFlavorSupported
COM: <s> returns tt true tt if var flavor var is one of the supported </s>
|
funcom_train/20400178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean storeSettings(String fileName) throws FileNotFoundException {
if (!hasDirectory)
throw new FileNotFoundException("Settings directory does not exists");
Settings result = (Settings)files.get(fileName);
if (result != null) {
try {
result.storeSettings(new File(settingsDirectory + fileName));
return true;
} catch (IOException e) {
return false;
}
}
else return false;
}
COM: <s> stores settings to the given file if souch file was ever opened </s>
|
funcom_train/1110439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setGraphLayoutCache(GraphLayoutCache cache) {
cancelEditing(graph);
if (graphLayoutCache != null && graphLayoutCacheListener != null)
graphLayoutCache
.removeGraphLayoutCacheListener(graphLayoutCacheListener);
graphLayoutCache = cache;
if (graphLayoutCache != null && graphLayoutCacheListener != null)
graphLayoutCache
.addGraphLayoutCacheListener(graphLayoutCacheListener);
updateSize();
}
COM: <s> sets the graph layout cache geometric pattern </s>
|
funcom_train/10516380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertResolved(String uri, String expectedResult, String result, boolean enabled) {
if (enabled && expectedResult != null && expectedResult.length() > 0) {
assertEquals("Expected " + uri + " to resolve to \n" + expectedResult + "\n but got\n"
+ result + "\n", expectedResult, result);
}
}
COM: <s> assert something resolved </s>
|
funcom_train/26595335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FieldBase getFieldValueFromAll(_Reference leftColumnReferences) throws DException {
for (int i = 0, length = iterators.length; i < length; i++) {
FieldBase value = null;
try {
return iterators[i].field(leftColumnReferences);
} catch (DException ex) {
continue;
}
}
throw new DException("DSE3520", new Object[] {leftColumnReferences.getColumn()});
}
COM: <s> this method is responsible for retriving the values of the columns for </s>
|
funcom_train/14107873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fontTypeStatus(final PSObject key) throws PSError {
String name = String.format("net.sf.eps2pgf.ps.resources.fonts.Type%d",
key.toInt());
try {
Class.forName(name);
return true;
} catch (ClassNotFoundException e) {
return false;
}
}
COM: <s> checks whether a specific font type is supported or not </s>
|
funcom_train/50769489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAnd() {
And and = new And();
if (lastTouched != null) { //we are adding this up the tree
and.setLeft(lastTouched);
lastTouched.setParent(and); //we could not add this before, and dit not exist yet
}
lastTouched = and;
condAll.add(and);
}
COM: <s> adds an and object can be present in an filter element </s>
|
funcom_train/28418634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIP() {
String ip = null;
try {
ip = s.getInetAddress().getHostAddress();
} catch (Exception e) {
System.err.println("Exception in TCPNetworking.getIP(): " + e.getMessage());
}
if (ip.contains("/")) {
ip = ip.substring(0, ip.indexOf("/") - 1);
}
return ip;
}
COM: <s> returns the ip which we are connected to </s>
|
funcom_train/5369481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BNFTestResult test(BNFTestableObject obj) {
if(obj.getToken() == requirement) {
result.setResult(result.FINISHED);
result.addCommittableToken(obj);
if(collecting){collectedData.add(obj);}
} else {
result.setResult(result.FAILED);
result.addReplayableToken(obj);
}
BNFTestResult testResult = result;
result = new BNFTestResult();
return testResult;
}
COM: <s> a method to evaluate this test </s>
|
funcom_train/40166289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyPlayerLogin(final Player player) {
try {
queue.put(new Runnable() {
public void run() {
playerHandler.notifyPlayerLogin(player);
}
});
} catch (InterruptedException ex) {
Logger.getLogger(NetworkController.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> sends a notification of the given player logging in </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.