__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/37125277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackgroundColor(Color backgroundColor) {
Color oldValue = m_backgroundColor ;
m_backgroundColor = backgroundColor ;
if(m_backgroundColor == null) {
m_panel.setOpaque(false) ;
} else {
m_panel.setOpaque(true) ;
}
m_panel.setBackground(m_backgroundColor.m_color) ;
firePropertyChange("backgroundColor", oldValue, m_backgroundColor) ;
}
COM: <s> set the background color of the pane </s>
|
funcom_train/45627986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateLetter(char letter) {
boolean iscorrect = false;
int ascIIValue = (int) letter;
if (ascIIValue >= 97 && ascIIValue <= 122) {
iscorrect = true;
} else if (ascIIValue >= 65 && ascIIValue <= 90) {
iscorrect = true;
} else if (ascIIValue >= 48 && ascIIValue <= 57) {
iscorrect = true;
} else if (ascIIValue == 95) {
iscorrect = true;
}
return iscorrect;
}
COM: <s> verify whether the characters include illegal characters </s>
|
funcom_train/32056943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsAddPointEvent() {
System.out.println("testIsAddPointEvent");
Object obj = null;
JGraph jgraph = new JGraph();
CellMapper cellmapper = null;
EdgeView edge = new EdgeView(obj, jgraph, cellmapper);
MouseEvent event = null;
assertEquals(edge.isAddPointEvent(event),false);
}
COM: <s> this function tests is add point event function of edge view class </s>
|
funcom_train/51819354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGroupVariableName(DJGroup group) {
String columnToGroupByProperty = null;
//if (group != null)
columnToGroupByProperty = group.getColumnToGroupBy().getColumnProperty().getProperty();
//else
//columnToGroupByProperty = "global";
return "variable-" + columnToGroupByProperty + "_" + getPercentageColumn().getColumnProperty().getProperty() + "_percentage";
}
COM: <s> the group which the variable will be inside mostly for reset </s>
|
funcom_train/36659995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long getNextTxnId(int count, long timeout) {
try {
return getNextId(DataStoreHeader.NEXT_TXN_ID_KEY, count, timeout);
} catch (RuntimeException e) {
throw convertException(
null, Level.FINE, e, "getNextTxnId count:" + count);
}
}
COM: <s> returns the next available transaction id and reserves the specified </s>
|
funcom_train/14228165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransferEnable(boolean enable) throws InvalidStateException, MethodNotSupportedException, PrivilegeViolationException, InvalidArgumentException {
if (this.getState() != IDLE) {
throw new InvalidStateException(this, InvalidStateException.CALL_OBJECT, this.getState(), "Call must be in IDLE state to set TransferEnable");
}
this.transEnabled = enable;
}
COM: <s> turn on or off transfer must be done while call is idle </s>
|
funcom_train/147582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem createMenu(String label, int mnemonic, KeyStroke keyStroke, String command, ActionListener al) {
logger.debug("Creating JMenuItem \"" + label + "\"");
JMenuItem result = new JMenuItem(label);
result.setMnemonic(mnemonic);
result.setAccelerator(keyStroke);
result.setActionCommand(command);
result.addActionListener(al);
return result;
}
COM: <s> generates a new code jmenu item code </s>
|
funcom_train/50155285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private VocabList setCurrent( String system, String group ) {
VocabList current = vocab;
group = system + "." + group + ":";
int ind = 0;
int ind2 = group.indexOf( ":" );
current = vocab;
while ( ind2 > -1 ) {
String str = group.substring( ind, ind2 );
VocabNode node = (VocabNode)current.map.get( str );
current = node.list;
ind = ind2 + 1;
ind2 = group.indexOf( ":", ind );
}
return current;
}
COM: <s> sets the current vocab list pointer to the specified spot in the vocab </s>
|
funcom_train/46943435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void encompass(StaticBoundBox toEncompass) {
for (int i = 0; i < 3; ++i) {
lower[i] = Math.min(lower[i], toEncompass.lower[i]);
upper[i] = Math.max(upper[i], toEncompass.upper[i]);
}
}
COM: <s> ensure that the range of code this code code static bound box code </s>
|
funcom_train/1481301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldSelectorResult accept(String fieldName) {
FieldSelectorResult result = FieldSelectorResult.NO_LOAD;
if (fieldsToLoad.contains(fieldName) == true){
result = FieldSelectorResult.LOAD;
}
if (lazyFieldsToLoad.contains(fieldName) == true){
result = FieldSelectorResult.LAZY_LOAD;
}
return result;
}
COM: <s> indicate whether to load the field with the given name or not </s>
|
funcom_train/44865479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MeasurementToolPreferences getToolPreferences(MeasurementToolRef toolRef) {
if (toolPrefs == null)
toolPrefs = new HashMap<MeasurementToolRef, MeasurementToolPreferences>();
MeasurementToolPreferences toolPref = toolPrefs.get(toolRef);
if (toolPref != null)
return toolPref;
toolPref = MeasurementToolPrefsStore.sharedInstance().getToolPreferences(toolRef.toolPrefID);
if (toolPref != null)
toolPrefs.put(toolRef, toolPref);
return toolPref;
}
COM: <s> returns the measurement tool prefernces for the given tool ref </s>
|
funcom_train/937288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponents(DisplayableOption displayableOption) {
for (int i = 0; i < displayableOption.getComponentCount(); i++) {
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridy = row;
gbc.gridx = i;
gbc.ipadx = 5;
gbc.ipady = 2;
gbc.anchor=GridBagConstraints.WEST;
add((Component) displayableOption.getComponentAt(i), gbc);
}
row++;
}
COM: <s> adds a feature to the components attribute of the row option container object </s>
|
funcom_train/14655223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DBTable getTable(String tableName) {
if (!getDbTableByName().containsKey(tableName)) {
getLogger().info(
"The table '" + tableName
+ "' does not exist in the database '" + getUrl()
+ "'");
}
return (DBTable) getDbTableByName().get(tableName);
}
COM: <s> search a table by name </s>
|
funcom_train/23327524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object registerObject(Object obj) {
synchronized(reverseTable) {
ConsCell header = (ConsCell)reverseTable.get(obj);
if (header != null) {
ConsCell cons = header.searchCellByObject(obj);
if (cons != null) {
return cons.key();
}
} else {
header = new ConsCell();
reverseTable.put(obj,header);
}
Object key = "%%%JBOM:"+(currentKeyId++)+":"+obj.getClass().getName()+"%%%";
header.append(new ConsCell(key,obj));
objectTable.put(key,obj);
return key;
}
}
COM: <s> register a given object and return the corresponding key </s>
|
funcom_train/586215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkConnection( Composite comp ){
if( !isConnected() ){
DbConnectionDialog dialog = new DbConnectionDialog( comp, this );
if( dialog.open() != Dialog.OK ){
return false;
}
}
if( !getSetup().isDatabaseUpgraded() ){
try {
getSetup().getTableDefinitionManager().createAllTables();
getSetup().getUpgradeManager().init();
} catch( StopAction e ){
Log.userWarningMsg( e );
}
}
return true;
}
COM: <s> this call a simple dialog only to connect to a db choosing </s>
|
funcom_train/13524198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsOutputValid() {
// Test if output is null
assertFalse(contr.isOutputValid(null));
// Test if output is not null
// All values in outputNames are good for input in this function
// so, nbConv is a good output
assertTrue(contr.isOutputValid("nbConv"));
// whereas pouet is not
assertFalse(contr.isOutputValid(outputInvalid));
}
COM: <s> test is output valid string </s>
|
funcom_train/47491682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSuggestStreetsCommand() {
if (suggestStreetsCommand == null) {//GEN-END:|62-getter|0|62-preInit
// write pre-init user code here
suggestStreetsCommand = new Command("Sugerir Calles", Command.ITEM, 0);//GEN-LINE:|62-getter|1|62-postInit
// write post-init user code here
}//GEN-BEGIN:|62-getter|2|
return suggestStreetsCommand;
}
COM: <s> returns an initiliazed instance of suggest streets command component </s>
|
funcom_train/6347495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInt() throws IOException {
PropertyStorageFactory f = PropertyStorageFactoryCreator.createXMLPropertyStorageFactory();
PropertyStorageExtended store = f.createPropertyStorage(TESTFILE);
store.storeInt("intkey", TEST_INTS[0]);
assertEquals(store.getInt("intkey"), TEST_INTS[0]);
}
COM: <s> tests storing and loading of int values </s>
|
funcom_train/3451215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchSysex(byte sysex[]) {
if (sysex.length == INIT_SYSEX.length &&
sysex[0] == SYSEX_HDR[0] &&
sysex[1] == SYSEX_HDR[1] &&
sysex[3] == SYSEX_HDR[3]) {
return true;
} else {
return false;
}
}
COM: <s> see if input sysex is a nord lead 2 program dump </s>
|
funcom_train/12077679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawChar(char character, int x, int y, int anchor) {
int width = this.font.font.getAdvance(character);
getGraphics().drawText(character, x + this.translateX, y + this.translateY, translateAnchor(anchor), width);
}
COM: <s> draws the specified character using the current font and color </s>
|
funcom_train/10194102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertValue(Transaction transaction, Persistency persistency, PersistentEntry persistentEntry) throws OdalPersistencyException {
if (isInsertConditionSatisfied0(persistentEntry)) {
Object nextKey = getNextKey(transaction, persistency, persistentEntry.getRecord());
persistentEntry.setValue(AbstractKeyGenerator.toConventional(persistentEntry, nextKey));
}
}
COM: <s> populates value if persistent entry </s>
|
funcom_train/20619585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge getConnectingEdge(Node connected) {
Iterator iterate = incomingEdges.iterator();
Edge search;
while (iterate.hasNext()) {
search = (Edge) iterate.next();
if (search.getStartNode() == connected) {
return search;
}
}
iterate = outgoingEdges.iterator();
while (iterate.hasNext()) {
search = (Edge) iterate.next();
if (search.getEndNode() == connected) {
return search;
}
}
return null;
}
COM: <s> gets the connecting edge for this node and a second one </s>
|
funcom_train/50090985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkForceFieldType(String ffname) {
boolean check=false;
for (int i = 0; i <= fftypes.length; i++) {
if (fftypes[i].equals(ffname)) {
check=true;
break;
}
}
if (!check) {
// logger.debug("FFError:checkForceFieldType> Unknown forcefield:" + ffname + "Take default:"+ffName);
return false;
}
return true;
}
COM: <s> sets the force field type attribute of the force field configurator object </s>
|
funcom_train/15945076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getData() {
Map contents = new HashMap();
contents.put(IconValue.FILENAME, new IconContent(iconLocationText));
contents.put(IconValue.TOOLTIP, new IconContent(descriptionText));
if (intericon)
contents.put(IconValue.VISIBILITY, IconContent.INTERMEDIATE);
return contents;
}
COM: <s> the function code get icon code returns the altered </s>
|
funcom_train/41851952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1() {
if (exitCommand1 == null) {//GEN-END:|45-getter|0|45-preInit
// write pre-init user code here
exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|45-getter|1|45-postInit
// write post-init user code here
}//GEN-BEGIN:|45-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/48354039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value getActualParam(int idx) {
InvokeExpr invExpr = loc.getStmt().getInvokeExpr();
if (invExpr instanceof InstanceInvokeExpr) {
if (idx == 0)
return ((InstanceInvokeExpr)invExpr).getBase();
return invExpr.getArg(idx - 1); // adjust this-including index to argument index
}
return invExpr.getArg(idx);
}
COM: <s> returns the actual param by index this is param 0 on instance calls </s>
|
funcom_train/4929976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override protected String execute( String name, ScaffoldInfo info ) throws MacroException {
IndexedStorage params = info.getMacroParams();
String value = params.getString( VALUE_PARAM, info.getMacroBody() );
String type = params.getString( TYPE_PARAM, TEXT_TYPE );
boolean hidden = params.getBoolean( HIDDEN_PARAM, false );
return handleValue( name, value, type, hidden, info );
}
COM: <s> returns xhtml or wiki content depending on the value returned from </s>
|
funcom_train/38495766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkNotationStart(DTDData data) {
boolean isStart = false;
try {
isStart = reader.isNotationStart(data);
} catch(Throwable th) {
Assert.fail("Caught exception in isNotationStart while checking with (" + data + ") data. - " + th.getMessage());
return;
}
Assert.assertTrue("isNotationStart was false for data - " + data, isStart);
}
COM: <s> cr java doc add javadoc for notation reader impl test check notation start </s>
|
funcom_train/48646184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getPositionComboBox() {
if (positionComboBox == null) {
String[] label={"Top-Left","Top-Center","Top-Right", "Center-Left"
,"Center","Center-Right", "Bottom-Left", "Bottom-Center", "Bottom-Right"};
positionComboBox = new JComboBox(label);
positionComboBox.setPreferredSize(new Dimension(120, 25));
positionComboBox.setSelectedIndex(0);
}
return positionComboBox;
}
COM: <s> this method initializes position combo box </s>
|
funcom_train/43327600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void describe(Printf outfile) {
try {
outfile.printf("Alignment scoring scheme:\n");
for (ScoreList s = this; s != null; s = s.next) {
outfile.printf(" %.1f%% - ",s.weight * 100.0);
if (s.func instanceof Description)
((Description)s.func).describe(outfile);
else
outfile.printf("%s\n",s.func.getClass().getName());
}
}
catch (IOException e) {
}
}
COM: <s> tell scoring functions to describe themselves if possible </s>
|
funcom_train/49049940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Lom createSkeletal() throws IOException, JAXBException {
setGeneral();
setLifecycle();
setMetametadata();
setTechnical();
// If not default rights strings can be found, don't add a rights
// section.
//
try {
setRights();
}
catch (MissingResourceException mre)
{ ; }
return getLom();
} // end createSkeletal().
COM: <s> create the skelatal metadata </s>
|
funcom_train/25413535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowEvent(WindowEvent e) {
if (e.getID() == WindowEvent.WINDOW_CLOSING)
if (lsframe.showDiscardDialog(I18N.getString("MENU_EXIT"))==false)
return;
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
lsframe.jMenuFileExit_actionPerformed(null);
}
}
COM: <s> overridden so we can exit when window is closed </s>
|
funcom_train/3178183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void glColor4ub(byte r, byte g, byte b, byte a) {
if (lastR != r || lastG != g || lastB != b || lastA != a) {
lastR = r;
lastG = g;
lastB = b;
lastA = a;
gl.glColor4ub(r, g, b, a);
checkError();
}
}
COM: <s> sets the texture color </s>
|
funcom_train/16937584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeader(String name, String value) {
name = name.toLowerCase();
synchronized (headers) {
ArrayList values = (ArrayList) headers.get(name);
if (values == null) {
values = new ArrayList();
headers.put(name, values);
}
values.add(value);
}
}
COM: <s> add a header to the set of headers associated with this request </s>
|
funcom_train/44841840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getStatements(String subj, String pred, String obj, boolean explicitOnly, boolean objIsLiteral) {
return (Vector)invoke(getStatements_0, new String[]{"subj", "pred", "obj", "explicitOnly", "objIsLiteral"}, new Object[]{subj, pred, obj, Boolean.valueOf(explicitOnly), Boolean.valueOf(objIsLiteral)});
}
COM: <s> retrive a list of the statemnets from the repository </s>
|
funcom_train/47842128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int installComponents(boolean waitForLock) {
if (checkAndApplyUpdates(waitForLock, true) < 0) {
return -1;
}
int uninstalled = 0;
Component[] components = getAllComponents();
for (int i = 0; i < components.length; i++) {
Component component = components[i];
if (component.isConfigured() && ! component.isInstalled()) ++uninstalled;
}
return uninstalled;
}
COM: <s> install component packages from the local cache for this </s>
|
funcom_train/24523475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeDialog(NiftyImage niftyImage, String message) {
//Let the hudController show the right panels.
this.showTextConversation();
//Now set the right conversationImage.
nifty.getScreen("hud").findElementByName("portrait").getRenderer(ImageRenderer.class).setImage(niftyImage);
this.displayDialog(message);
}
COM: <s> continues the conversation with a new text and a new portrait </s>
|
funcom_train/17904869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolTipTextForComponent(Component component, String toolTipText) {
int index = indexOfComponent(component);
if (index == -1) {
throw new IndexOutOfBoundsException("Tab pane component not found.");
}
setToolTipTextAt(index, toolTipText);
}
COM: <s> sets the tool tip for the specified component to tool tip text </s>
|
funcom_train/21656230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtCancelarCronologia() {
if (btCancelarCronologia == null) {
btCancelarCronologia = new JButton();
btCancelarCronologia.setBounds(new Rectangle(630, 560, 150, 24));
btCancelarCronologia.setMnemonic('v');
btCancelarCronologia.setText("Volver al Menu");
btCancelarCronologia.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarMenuEditarProyecto();
}
});
}
return btCancelarCronologia;
}
COM: <s> this method initializes bt cancelar cronologia </s>
|
funcom_train/1304106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean forwardToEnd() {
boolean result = false;
numSkippedSegments = 0;
for (; curSegment != null; curSegment = segmentSequence.getNextSegment(curSegment)) {
curText.append(curSegment.getText());
if (!SegmentUtils.isDelimOrWhitespace(curSegment)) {
++numSkippedSegments;
}
result = true;
}
return result;
}
COM: <s> go forward from the current segment until hitting the end </s>
|
funcom_train/3313198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getCdInformation(String freedbId)throws IOException{
if(freedbId.equals(freeDbCdIdentification))
if(!cdList.isEmpty())
return cdList;
freeDbCdIdentification = freedbId;
System.out.println("getting info");
if(pDialog!= null && !isRunning){
exception = null;
currentThread = new Thread(this, CDINFO);
currentThread.start();
pDialog.show();
if(exception != null)
throw exception;
}
else {
checkConnection();
getCdInfo();
}
return cdList;
}
COM: <s> describe code get cd information code method here </s>
|
funcom_train/21612427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNestedBacktracking() throws ParserException {
String input = "terminal1 terminal2 terminal3 terminal4 terminal5";
Parser parser = new Parser( createNestedBTGrammar(), tokenizer );
parser.addParserListener( new DebugParserListener() );
ParseTree pt = parser.parse(input);
System.out.println(pt);
}
COM: <s> tests a nested backtracking </s>
|
funcom_train/1442229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClientScene getSceneOfCycle(int cycleNumber) {
if (hasScene(cycleNumber)) {
int num = getIndex(cycleNumber);
while (sceneList.size() > num && getScene(num + 1).time == cycleNumber) {
num++;
}
return (ClientScene) sceneList.get(num);
}
return null;
}
COM: <s> calculates the newest scene of the given cycle number </s>
|
funcom_train/17604957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Money plus(Money that) {
if (!currency.equals(that.currency)) {
throw new IllegalArgumentException("Money currencies [" + currency + " and " + that.currency +
"] don't match. Cannot add Monies.");
}
return new Money(amount.add(that.amount), currency);
}
COM: <s> adds the given ammount to this money and returns the result </s>
|
funcom_train/27943453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setConfigFromFile( JarFile soundSchemeJarFile, String strJarEntryFileName, JSoundSchemeRecord record, byte nFieldPos ) {
JarEntry jarEntry = soundSchemeJarFile.getJarEntry( strJarEntryFileName );
if( jarEntry != null )
record.setConfig( nFieldPos, JSoundSchemeRecord.TRUE_VALUE );
else
record.setConfig( nFieldPos, JSoundSchemeRecord.FALSE_VALUE );
}
COM: <s> set the scheme record based on content of sound scheme jar file </s>
|
funcom_train/40943617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nodeExpand(ExpandEvent event) {
final Item i = tree.getItem(event.getItemId());
if (!tree.hasChildren(i)) {
// populate tree's node which was expanded
populateNode(event.getItemId().toString(), event.getItemId());
}
}
COM: <s> handle tree expand event populate expanded nodes childs with new files </s>
|
funcom_train/13442995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKey(String keyname) {
boolean found = false;
for (Key k : Key.values()) {
if (k.Name() == keyname) {
key = k;
found = true;
}
}
if (!found) System.out.println("Invalid keyname...setting key to C");
}
COM: <s> sets the key of the song </s>
|
funcom_train/29550892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showSpidersGraphOnly() {
if (leftSidebarSplitPane.getDividerLocation() > 1) {
closeLeftSidebar();
}
NotebookOutlineJPanel.getInstance().hideRightSiderbar();
NotebookOutlineJPanel.getInstance().hideConceptTree();
NotebookOutlineJPanel.getInstance().disableAllToolbarButtons();
}
COM: <s> show spiders graph only </s>
|
funcom_train/11725125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkIsLockable() throws UnsupportedRepositoryOperationException, RepositoryException {
checkStatus();
if (!isNodeType(NameConstants.MIX_LOCKABLE)) {
String msg = "Unable to perform locking operation on non-lockable node: " + getPath();
log.debug(msg);
throw new LockException(msg);
}
}
COM: <s> checks if this node is lockable i </s>
|
funcom_train/34284026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void placeCall() {
if ((tel != null) && (tel.length() > 0)) {
Uri t;
if (!tel.startsWith("tel:"))
tel = "tel:" + tel;
t = Uri.parse(tel);
Intent call = new Intent(Intent.ACTION_DIAL, t);
startActivity(call);
} else {
// Toast.makeText(this, getString(R.string.ag_no_phone), 2000);
}
}
COM: <s> place a call to the selected partner </s>
|
funcom_train/24372318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XConfigObject getXConfigObjectByName(String name, String type) {
XConfigObject configObject = null;
String key = this.getKey(name, type);
if (this.objectByNameMap.containsKey(key)) {
configObject = this.objectByNameMap.get(key);
}
return configObject;
}
COM: <s> returns an xconfig object for a given name and type </s>
|
funcom_train/1366540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ProgressInfo findProgress(ProgressId aProgressId) {
if(aProgressId==null) {
throw new IllegalStateException("progress id is null");
}
ProgressInfo info = selectStorageStrategy(aProgressId).findProgress(aProgressId);
if(info == null) {
throw new ProgressNotFoundException("Progress with id "+aProgressId+" was not found");
}
return info;
}
COM: <s> finds progress info and throw exception if was not found </s>
|
funcom_train/19456081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int update(int crc, byte[] bytes, int off, int len) {
for (int i = off; i < (off + len); i++) {
int b = (bytes[i] & 0xff);
crc = (table[((crc >> 8) & 0xff) ^ b] ^ (crc << 8)) & 0xffff;
}
return crc;
}
COM: <s> update 16 bit crc </s>
|
funcom_train/11728155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDocOrderIndexedNotation() throws Exception {
String path = testRoot + "/" + nodeName1 + "[2]";
StringBuffer tmp = new StringBuffer("/");
tmp.append(jcrRoot).append(path);
docOrderTest(new Statement(tmp.toString(), Query.XPATH), path);
}
COM: <s> test if the indexed notation is supported </s>
|
funcom_train/20883227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTopOfQueue(SpeakableEvent event) {
if (listener != null) {
listener.topOfQueue(event);
}
Enumeration E;
if (synth.speakableListeners != null) {
E = synth.speakableListeners.elements();
while (E.hasMoreElements()) {
SpeakableListener sl = (SpeakableListener) E.nextElement();
sl.topOfQueue(event);
}
}
}
COM: <s> utility function that sends a code top of queue code event </s>
|
funcom_train/9285862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canSupport(PropertiesMap properties) {
if (!requireAuthentication(properties))
return false;
//
// we check 2 things:
//
// - if derby.connection.requireAuthentication system
// property is set to true.
// - if derby.authentication.provider is set to one
// of the JNDI scheme we support (i.e. LDAP).
//
authenticationProvider = PropertyUtil.getPropertyFromSet(
properties,
org.apache.derby.iapi.reference.Property.AUTHENTICATION_PROVIDER_PARAMETER);
if ( (authenticationProvider != null) &&
(StringUtil.SQLEqualsIgnoreCase(authenticationProvider,
org.apache.derby.iapi.reference.Property.AUTHENTICATION_PROVIDER_LDAP)))
return true;
return false;
}
COM: <s> check if we should activate the jndi authentication service </s>
|
funcom_train/20271967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseConfiguration(List<String> functionsToInspect) {
for (String function : functionsToInspect) {
Config config = parseConfiguration(function);
functions.put(config.name, config);
String method = getMethodFromDeclarationName(config.name);
if (method != null) {
methods.put(method, config.name);
}
}
}
COM: <s> build the data structures need by this pass from the provided </s>
|
funcom_train/37205925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void consumeXML(Element element) {
Element sliceList = element.getChild(SLICELIST, XScufl.XScuflNS);
if (sliceList == null) {
return;
}
Attribute depth = sliceList.getAttribute(DEPTH, XScufl.XScuflNS);
if (depth == null) {
return;
}
try {
setDepth(depth.getIntValue());
} catch (DataConversionException ex) {
logger.warn("Invalid depth: " + depth.getValue());
}
}
COM: <s> extract the lt slicelist depth x gt number from the extensions </s>
|
funcom_train/3290858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean drop() {
log.info("trying to drop table of builder: '"+tableName+"' with database class: '"+database.getClass().getName()+"'");
if(size() > 0) throw new RuntimeException("cannot drop a builder, that still contains nodes");
return database.drop(this);
}
COM: <s> drops the builder table from the current database </s>
|
funcom_train/47545755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaximum () {
checkWidget ();
int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
int digits = OS.gtk_spin_button_get_digits (handle);
for (int i = 0; i < digits; i++) adjustment.upper *= 10;
return (int) adjustment.upper;
}
COM: <s> returns the maximum value which the receiver will allow </s>
|
funcom_train/3834890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openDirChooser() {
JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new File(lastDir));
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int returnVal = chooser.showOpenDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
setDestdirTextfieldContent(chooser.getSelectedFile().getPath());
}
}
COM: <s> opens the target dir file chooser </s>
|
funcom_train/39478941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object receivedRemoteInfo(String tag, Object listenerInfo) throws Exception {
if (tag.equals(ReceiveRemoteOutput.tag) && listenerInfo instanceof StoredFile) {
StoredFile receivedFile = ((StoredFile) listenerInfo);
String storageFile = receivedFile.saveFile(outputDir, null);
logger.info("Stored output file: " + storageFile);
}
return null;
}
COM: <s> stores the received output file in the output directory </s>
|
funcom_train/34451707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doDebugging(MContext context) {
// check for breakpoint
if (isStepping() || hasBreakpoint(context)) {
setSuspended(true);
if (isStepping()) {
triggerEvent(new DebugEvent(this, DebugEvent.SUSPEND, DebugEvent.STEP_END));
} else {
triggerEvent(new DebugEvent(this, DebugEvent.SUSPEND, DebugEvent.BREAKPOINT));
}
processDebugRequests(context);
}
}
COM: <s> do debugging work on the given action </s>
|
funcom_train/37834521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAttackRate() {
final List<Item> weapons = getWeapons();
if (weapons.isEmpty()) {
return 5;
}
int best = weapons.get(0).getAttackRate();
for (final Item weapon : weapons) {
final int res = weapon.getAttackRate();
if (res < best) {
best = res;
}
}
// Level effect
best = (int) Math.ceil(best * getItemLevelModifier(weapons.get(0)));
return best;
}
COM: <s> returns the attack rate the lower the better </s>
|
funcom_train/8544022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void correctWorkerThreadsUnsynchronized() {
int c = getThreadNumberCorrectionUnsynchronized();
if (c > 0) {
if (numberOfThreadsToKill > 0) {
int k = Math.min(c, numberOfThreadsToKill);
numberOfThreadsToKill -= k;
c -= k;
}
if (c > 0)
createThreadsUnsynchronized(c);
}
else if (c < 0)
numberOfThreadsToKill += -c;
}
COM: <s> adds or kills threads to have the right number running </s>
|
funcom_train/30055418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(boolean block) {
this.blocking = block;
// set default value
this.serverField.setText(this.myProxyClient.getServer());
this.portField.setText(this.myProxyClient.getPort() + "");
this.lifetimeField.setText(this.myProxyClient.getLifetime() + "");
this.dialog.show();
}
COM: <s> shows the window </s>
|
funcom_train/11702629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getEndpoint() {
if (socket != null) {
try {
return new URL("http", socket.getInetAddress().getHostName(), socket.getPort(), "");
} catch (MalformedURLException e) {
// shouldnt happen
}
}
return null;
}
COM: <s> creates url object containing service endpoint info host and port </s>
|
funcom_train/18802662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMenuKeyMask() {
try {
return Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
}
catch (UnsupportedOperationException he) {
// headless exception extends UnsupportedOperation exception,
// but the HeadlessException is not defined in older JDKs...
return KeyEvent.CTRL_MASK;
}
}
COM: <s> returns the plattforms default menu shortcut keymask </s>
|
funcom_train/20875937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nrSharedHours(TimeLocation anotherLocation) {
int end = Math.min(iStartSlot + iLength, anotherLocation.iStartSlot + anotherLocation.iLength);
int start = Math.max(iStartSlot, anotherLocation.iStartSlot);
return (end < start ? 0 : end - start);
}
COM: <s> number of overlapping time slots ignoring days </s>
|
funcom_train/2294512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addServer(CmsSiteMatcher matcher, CmsSite site) throws CmsConfigurationException {
if (m_siteMatcherSites.containsKey(matcher)) {
throw new CmsConfigurationException(Messages.get().container(
Messages.ERR_DUPLICATE_SERVER_NAME_1,
matcher.getUrl()));
}
m_matchers.add(matcher);
m_siteMatcherSites.put(matcher, site);
}
COM: <s> adds a new site matcher object to the map of server names </s>
|
funcom_train/18052204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getSvHelpMenu() {
if (svHelpMenu == null) {
svHelpMenu = new JMenu();
svHelpMenu.setText("Help");
svHelpMenu.setFont(new Font("Tahoma", Font.PLAIN, 11));
svHelpMenu.add(getSvHelpCheckForUpdatesMenuItem());
svHelpMenu.add(getSvHelpAboutMenuItem());
}
return svHelpMenu;
}
COM: <s> this method initializes svhelp menu </s>
|
funcom_train/8607754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showBrand(PlayerAlliance alliance, int brandId, int targetObjectId) {
for (PlayerAllianceMember allianceMember : alliance.getMembers()) {
if (!allianceMember.isOnline()) continue;
PacketSendUtility.sendPacket(allianceMember.getPlayer(), new SM_SHOW_BRAND(brandId, targetObjectId));
}
}
COM: <s> sends brand information to each member </s>
|
funcom_train/44314889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void redirect( HttpServletRequest request, HttpServletResponse response, String path ) throws IOException {
StringBuffer url = new StringBuffer();
url.append( request.getContextPath() );
url.append( request.getServletPath() );
url.append( path );
response.sendRedirect( url.toString() );
}
COM: <s> redirect external i </s>
|
funcom_train/25749792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document parse() throws ParseException {
Parser parser = ParserRegistry.getSingleFileParser(file);
if (parser == null)
throw new IllegalStateException("Cannot find parser for this file: " + file.getAbsolutePath()); //$NON-NLS-1$
try {
Document doc = parser.parse(file);
doc.setParsedBy(parser);
return doc;
} catch (RuntimeException e) {
throw new ParseException(file, Msg.parser_error.value());
}
}
COM: <s> parses the file represented by this object and returns the parse result as </s>
|
funcom_train/8685955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
try {
SysProperties c = (SysProperties) super.clone();
c.variables = (Vector) variables.clone();
c.propertySets = (Vector) propertySets.clone();
return c;
} catch (CloneNotSupportedException e) {
return null;
}
}
COM: <s> create a deep clone </s>
|
funcom_train/4392806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateBPELVariableName_Pattern(String bpelVariableName, DiagnosticChain diagnostics, Map<Object, Object> context) {
return validatePattern(ExecutablePackage.Literals.BPEL_VARIABLE_NAME, bpelVariableName, BPEL_VARIABLE_NAME__PATTERN__VALUES, diagnostics, context);
}
COM: <s> validates the pattern constraint of em bpel variable name em </s>
|
funcom_train/140678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveWindowLocations() {
// Save the main window location
PreferenceUtils.saveWindowLocation(frame, "main window");
for (TabHolder tabHolder : tabHolders.values()) {
tabHolder.close();
}
for (IGBTabPanel comp : tabHolders.get(TabState.COMPONENT_STATE_WINDOW).getPlugins()) {
PreferenceUtils.saveWindowLocation(comp.getFrame(), comp.getName());
}
}
COM: <s> saves information about which plugins are in separate windows and </s>
|
funcom_train/40339260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilter(int columnIndex){
if (filterMap == null){
filterMap = new HashMap/* <Integer, SuggestBox> */();
}
final SuggestBox suggestBox = new SuggestBox(new MultiWordSuggestOracle());
suggestBox.setWidth("100%");
suggestBox.addKeyboardListener(new KeyboardListenerAdapter(){
public void onKeyDown(Widget sender, char keyCode, int modifiers){
if (keyCode == KeyboardListener.KEY_ENTER){
contentViewer.internalRefresh();
}
}
});
filterMap.put(new Integer(columnIndex), suggestBox);
}
COM: <s> adds the given filter to this viewer on this column </s>
|
funcom_train/1111529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installValue(BusinessObjectWrapper2 value, boolean isEditing) {
oldModel = value;
newModel = value;
labelField.setText(new String(newModel.getLabel()));
labelField.setEnabled(true);
useModelLabel.setSelected(false);
chooserTree.setSelectionPath(null);
if (newModel.getValue() != null)
chooserTree.setSelectionPath(new TreePath(
((DefaultTreeModel) chooserTree.getModel())
.getPathToRoot(newModel.getValue())));
}
COM: <s> the editor is lightweight so you need to install the graph cell </s>
|
funcom_train/13446044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetChildrenPaths(TreePath parentPath) {
log.fine("start");
removeMapping(this);
if(parentPath == null)
path = new TreePath(getUserObject());
else
path = parentPath.pathByAddingChild(getUserObject());
addMapping(this);
for(int counter = getChildCount() - 1; counter >= 0; counter--)
((TreeStateNode)getChildAt(counter)).resetChildrenPaths(path);
}
COM: <s> recreates the receivers path and all its childrens paths </s>
|
funcom_train/1662916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processDocumentUpdate(DocumentEvent documentEvent) {
String filename = (String) projectFileList.getSelectedValue();
if (filename == null) {
return;
}
FileOption fileOption = project.getFileOption(filename);
Document document = documentEvent.getDocument();
try {
String text = document.getText(0, document.getLength());
fileOption.setCustomKey(text);
} catch (BadLocationException ble1) {
/* ignore. */
}
}
COM: <s> updates the options of the currently selected file with the changes made </s>
|
funcom_train/46190844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void printToStdout(Path src) throws IOException {
// if (fs.isDirectory(src)) {
// throw new IOException("Source must be a file.");
// }
// FSDataInputStream in = fs.open(src);
// IOUtils.copyBytes(in, System.out, getConf(), true);
// }
COM: <s> print from src to stdout </s>
|
funcom_train/40622180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void repositionHeaderSpacer() {
int headerWidth = headerTable.getOffsetWidth();
headerSpacer.getStyle().setPropertyPx("left", headerWidth);
if (footerTable != null) {
int footerWidth = footerTable.getOffsetWidth();
footerSpacer.getStyle().setPropertyPx("left", footerWidth);
}
}
COM: <s> reposition the header spacer next to the header table </s>
|
funcom_train/24050868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Geometry other, CoordinateSequenceComparator comp) {
if (getClassSortIndex() != other.getClassSortIndex()) {
return getClassSortIndex() - other.getClassSortIndex();
}
if (isEmpty() && other.isEmpty()) {
return 0;
}
if (isEmpty()) {
return -1;
}
if (other.isEmpty()) {
return 1;
}
return compareToSameClass(other, comp);
}
COM: <s> returns whether this code geometry code is greater than equal to </s>
|
funcom_train/2292057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTreeResource(String type, String value) {
if (value == null) {
return;
}
if (value.startsWith(CmsResource.VFS_FOLDER_SYSTEM + "/") && (!value.startsWith(m_currentSite))) {
// restrict access to /system/
value = "/";
}
m_treeType.put(type, value);
}
COM: <s> sets the tree resource uri for the specified tree type </s>
|
funcom_train/48402142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addItemHoverHandler(com.smartgwt.client.widgets.form.fields.events.ItemHoverHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.form.fields.events.ItemHoverEvent.getType()) == 0) setupItemHoverEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.form.fields.events.ItemHoverEvent.getType());
}
COM: <s> add a item hover handler </s>
|
funcom_train/10947349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getPaymentTotal() {
BigDecimal total = BigDecimal.ZERO;
Iterator<CartPaymentInfo> i = paymentInfo.iterator();
while (i.hasNext()) {
CartPaymentInfo inf = i.next();
if (inf.amount != null) {
total = total.add(inf.amount);
}
}
return total;
}
COM: <s> returns the total payment amounts </s>
|
funcom_train/39911597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEh2() {
System.out.println("getEh2");
Page1 instance = new Page1();
TextField expResult = null;
TextField result = instance.getEh2();
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 eh2 method of class timesheetmanagement </s>
|
funcom_train/42864240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean adjecent(Set<V> currClq_, Set<V> nxtClq_, int k_) {
int matched = 0;
boolean isAdj = false;
for (V ag : currClq_) {
if (nxtClq_.contains(ag)) {
matched++;
if (matched == (k_ - 1)) {
isAdj = true;
break;
}
}
}
return isAdj;
}
COM: <s> compares two sets and deems them adjecent if they share n 1 elements </s>
|
funcom_train/37104369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSource()throws Exception{
String expectedSource1="Planta. 2004 Jan., v. 218, no. 3";
String expectedSource2="Plant journal. 2004 Feb., v. 37, no. 4";
assertEquals(expectedSource1, map1.getFirst("SO"));
assertEquals(expectedSource2, map2.getFirst("SO"));
}
COM: <s> this method test the source information parsed </s>
|
funcom_train/18750091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void putTextList(List<String> textList) {
if (! DefaultLabel.textList.isEmpty()) {
throw new IllegalStateException();
}
DefaultLabel.textList.addAll(textList);
for (String text: textList) {
indexMap.put(text, new Character((char) labelList.size()));
labelList.add(new DefaultLabel(text));
}
}
COM: <s> modifies the static index map of this class </s>
|
funcom_train/4717589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSynthRelPitch() {
SynMessage msg = new SYN().synth(1).pitch(-10).relative();
assertEquals("TTi", msg.getTypetag());
assertEquals(new Integer(-655360), msg.getArguments()[2]);
assertEquals("/SYN/ID1/PITCH", msg.getAddress());
}
COM: <s> synth pitch in hz relative </s>
|
funcom_train/38473538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IModelChangeListener getChangeListener() {
if (getChangeListener == null) return null;
if (!getChangeListener.isAccessible())
getChangeListener.setAccessible(true);
IModelChangeListener result = null;
try {
result = (IModelChangeListener) getChangeListener.invoke(input, new Object[] {});
} catch (Exception e) {
}
return result;
}
COM: <s> method get change listener </s>
|
funcom_train/8037617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminateFault(Object Source) throws VMCSException{
this.dispenseCtrl.allowSelection(false);
if(Source.getClass().getName().equalsIgnoreCase("DispenseController")){
this.coinReceive.refundCash();
}
if(Source.getClass().getName().equalsIgnoreCase("ChangeGiver")){
this.coinReceive.storeCash();
}
if(Source.getClass().getName().equalsIgnoreCase("CoinReceiver")){
}
}
COM: <s> this operation will perform if the transaction controller is informed </s>
|
funcom_train/19434001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Unit getSelectedUnit( Container container, int mouseX, int mouseY ) {
Component comp = container.findComponentAt( mouseX, mouseY );
if ( comp instanceof ListOptionLabel ) {
ListOptionLabel loLabel = (ListOptionLabel) comp;
return (Unit) loLabel.getId();
}
return null;
}
COM: <s> returns the unit currently selected on the specified mouse coordinates </s>
|
funcom_train/3305085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void subElementsEnabled(Button radioButton, boolean enabled) {
HashMap subElements = (HashMap) radioButton.getData("SubElements");
if (subElements != null)
for (Iterator iSubElements = subElements.values().iterator(); iSubElements.hasNext();) {
Object subelement = iSubElements.next();
if (subelement instanceof Control) {
((Control) subelement).setEnabled(enabled);
}
}
}
COM: <s> retrieves all sub elements controls from the radiobutton and </s>
|
funcom_train/9368735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSequence loadDescription(PackageManager pm) throws NotFoundException {
if (mDescriptionResource <= 0) throw new NotFoundException();
return pm.getText(
(mService.resolvePackageName != null)
? mService.resolvePackageName
: getPackageName(),
mDescriptionResource,
null);
}
COM: <s> return a brief summary of this wallpapers behavior </s>
|
funcom_train/3172990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double roundNumber(double number, int digits) {
if((Double.isNaN(number))||(Double.isInfinite(number)))
return 0.0;
NumberFormat nf = NumberFormat.getInstance();
nf.setMinimumFractionDigits(digits);
nf.setMaximumFractionDigits(digits);
nf.setGroupingUsed(false);
return Double.parseDouble(nf.format(number).replace(',','.'));
}
COM: <s> rounds a number to a specified number digits in the fraction portion </s>
|
funcom_train/41722845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleOutcome select(Set<RuleOutcome> ruleOutcomes) {
if (ruleOutcomes == null || ruleOutcomes.isEmpty())
return null;
Set<RuleOutcome> maxPrecedenceOutcomes = selectMaxPrecedence(ruleOutcomes);
Set<RuleOutcome> maxLocalityOutcomes = selectMaxLocality(maxPrecedenceOutcomes);
// TODO: Issue 1324
RuleOutcome result = chooseOneNonDeterministically(maxLocalityOutcomes);
return result;
}
COM: <s> returns the chosen outcome from the given set of outcomes </s>
|
funcom_train/45305017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCboCategoria() {
cboCategoria = new Combo(form.getBody(), SWT.NONE);
cboCategoria.setText(MessageBundle.getMessage("openstaff.role.scegliCategoria"));
final String[] Categoria = {"V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV"};
cboCategoria.setItems(Categoria);
cboCategoria.setFont(IImageKeys.FONT_TEXT);
}
COM: <s> this method initializes cbo categoria </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.