__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/4514632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintButtonIcon(Graphics g, Rectangle iconRect) {
Icon iconToPaint = this.getIconToPaint();
if ((iconRect == null) || (iconToPaint == null)
|| (iconRect.width == 0) || (iconRect.height == 0)) {
return;
}
iconToPaint.paintIcon(this.commandButton, g, iconRect.x, iconRect.y);
}
COM: <s> paints the button icon </s>
|
funcom_train/8411121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillFields() {
fields.add("name");
fields.add("group");
fields.add("origin");
fields.add("page");
fields.add("class");
lines = new HashMap < String, CatalogProperty >();
int i = 0;
while (i < fields.size()) {
addField(fields.get(i));
i++;
}
}
COM: <s> fill the fields of the object lines </s>
|
funcom_train/2558550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MethodType getMethodType(Method method) {
String name = method.getName();
if(name.startsWith("get")) {
return MethodType.GET;
}
if(name.startsWith("is")) {
return MethodType.IS;
}
if(name.startsWith("set")) {
return MethodType.SET;
}
return MethodType.NONE;
}
COM: <s> this is used to acquire a code method type code for the name </s>
|
funcom_train/18089889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void repaintMenuBar(final boolean immediate) {
final Theme theme = UIManager.getTheme();
final int menuHeight = theme.getMenuHeight();
final int y = getHeight() - menuHeight;
this.repaint(0, y, getWidth(), menuHeight);
if (immediate) {
serviceRepaints();
}
}
COM: <s> forces a repaint of the menu bar </s>
|
funcom_train/49881186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateNote(long rowId, String name, String address) {
ContentValues args = new ContentValues();
args.put(KEY_NAME, name);
args.put(KEY_ADDRESS, address);
return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0;
}
COM: <s> update the note using the details provided </s>
|
funcom_train/2882774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnectQuietly() {
if ((ftpClient != null) && (ftpClient.isConnected())) {
try {
ftpClient.disconnect();
} catch (IOException failure) {
sfLog().ignore("when disconnecting the FTP link ", failure);
} finally {
ftpClient = null;
}
}
}
COM: <s> disconnect quietly if needed </s>
|
funcom_train/47036851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPluginAndPrerequisites(BundleDescription target, List classpath, String baseLocation, List pluginChain, Set addedPlugins) throws CoreException {
if (matchFilter(target) == false)
return;
addPlugin(target, classpath, baseLocation);
addPrerequisites(target, classpath, baseLocation, pluginChain, addedPlugins);
}
COM: <s> the plugin chain parameter is used to keep track of possible cycles </s>
|
funcom_train/34536446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getActionButtonKeyMaps() {
StringBuffer script = new StringBuffer();
script.append("\nvar keyArray = new Array(\n");
script.append("new keyArrayItem(\"\", \"\", null, null)\n");
script.append(");\n");
script.append("enableShortcuts();");
return script.toString();
}
COM: <s> gets the keymap for the action button window type </s>
|
funcom_train/36536148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("PhrasesBank".equals(portName)) {
setPhrasesBankEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/39184152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStdDev(boolean greater, double number){
crit4CheckBox.setSelected(true);
crit4ComboBox.setSelectedIndex(greater?0:1);
crit4TextField.setText(String.valueOf(number));
crit4ComboBox.setEnabled(true);
crit4TextField.setEnabled(true);
crit4Label.setEnabled(true);
}
COM: <s> changes the settings for the standard deviation criteria </s>
|
funcom_train/8985534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setPrepareStatement(java.sql.PreparedStatement preStat, int idx, Float[] array) throws java.sql.SQLException{
if (array!=null && array.length>0) {
for (int j=0; j<array.length; j++) {
this.setPrepareStatement(preStat, idx++, array[j]);
}
}
return idx;
}
COM: <s> call set prepare statment by a list of float </s>
|
funcom_train/33281140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void jsxSet_clear(final String clear) {
if (!ArrayUtils.contains(VALID_CLEAR_VALUES, clear)
&& getBrowserVersion().hasFeature(BrowserVersionFeatures.GENERATED_43)) {
throw Context.reportRuntimeError("Invalid clear property value: '" + clear + "'.");
}
getDomNodeOrDie().setAttribute("clear", clear);
}
COM: <s> sets the value of the tt clear tt property </s>
|
funcom_train/32876037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getSetAttributes() {
Vector attributeCollection = new Vector(attributeTable_.size());
Enumeration attributeEnumeration = attributeTable_.elements();
while (attributeEnumeration.hasMoreElements()) {
Attribute attribute = (Attribute) attributeEnumeration.nextElement();
if (attribute.isPresent()) {
CK_ATTRIBUTE ckAttribute = attribute.getCkAttribute();
attributeCollection.addElement(ckAttribute);
}
}
return attributeCollection ;
}
COM: <s> this method returns the pkcs 11 attributes of this object </s>
|
funcom_train/26269185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DescriptionFormat createDescriptionFormat(boolean isThrowsTrack) {
return new DescriptionFormat(false, isThrowsTrack, details){
protected boolean isModifierTracked(String modifier, FullItemDescription item) {
if (modifier.startsWith("<value"))
return isValueTracked;
else
return super.isModifierTracked(modifier, item);
}
};
}
COM: <s> return new b description format b taking into account code this code </s>
|
funcom_train/39536310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putDown() {
//getting the currently selected node
int row=table.getSelectedRow();
if(row>=0 && row<buttonJwidgetElements.size()) {
ButtonGroupEdition.this.putDown(buttonJwidgetElements.get(row), true);
setCurrentJWidgetElement(tableJwidgetElement);
table.getSelectionModel().setSelectionInterval(row+1, row+1);
}
}
COM: <s> puts this tree node at a lower place </s>
|
funcom_train/11373845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete(String src, boolean recursive) throws IOException {
checkOpen();
try {
return namenode.delete(src, recursive);
} catch(RemoteException re) {
throw re.unwrapRemoteException(AccessControlException.class,
FileNotFoundException.class,
SafeModeException.class,
UnresolvedPathException.class);
}
}
COM: <s> delete file or directory </s>
|
funcom_train/31930622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save() {
boolean success = false;
if (mandatoryFieldsArePopulated()) {
String fileName = fileName();
if (fileName == null) {
fileName = saveAsFileName();
}
if (fileName != null) {
saveFile(fileName);
}
success = fileName != null;
}
return success;
}
COM: <s> save the test to the file name contained in the hash map </s>
|
funcom_train/25566988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel getTypeOfMatrixCreationPanel() {
if (typeOfMatrixCreationPanel == null) {
typeOfMatrixCreationPanel = new JPanel(new GridBagLayout());
typeOfMatrixCreationPanel.add(new JLabel(getString("Type of matrix creation")), getLabelConstraints(0));
typeOfMatrixCreationPanel.add(getTypeOfMatrixCreation(), getConstraints(1, 0));
}
return typeOfMatrixCreationPanel;
}
COM: <s> getting panel to choose type of matrix generation </s>
|
funcom_train/20896317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtractTaxonChildList (boolean genbankSource){
if (genbankSource) {
taxonFactory = TaxonToolkit.getFactory(ITaxonTreeSource.GENBANK_DATA);
} // end of if ()
else {
taxonFactory = TaxonToolkit.getFactory(ITaxonTreeSource.TIGR_DATA);
} // end of if ()else
}
COM: <s> creates a new code extract taxon child list code instance </s>
|
funcom_train/37195503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean execute() throws BuildException {
attributes.log("Using jeeg compiler", Project.MSG_VERBOSE);
Commandline cmd = new Commandline();
cmd.setExecutable("java");
cmd.createArgument().setValue("org.brics.gm.jeeg.cl1.Main");
setupJavacCommandlineSwitches(cmd);
int firstFileName = cmd.size();
logAndAddFilesToCompile(cmd);
return executeExternalCompile(cmd.getCommandline(), firstFileName) == 0;
}
COM: <s> performs a compile using the javac externally </s>
|
funcom_train/20308711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean uploadKB() {
// ensure first that we have a KB identifier
getConnection().bindKB( false, getProfile() );
// now tell the existing KB contents
Document kbDIG = translateKbToDig();
Document response = getConnection().sendDigVerb( kbDIG, getProfile() );
return !getConnection().warningCheck( response );
}
COM: <s> p upload the entire contents of the local knowledge base owl daml model </s>
|
funcom_train/17117694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toJSP() {
StringBuffer buffer = new StringBuffer();
buffer.append("<tr><td>");
buffer.append(this.createLabel());
buffer.append("</td><td>");
buffer.append(this.createField());
buffer.append("</td></tr>");
return buffer.toString();
}
COM: <s> creates one line in the jsp containing the label and the inputfield </s>
|
funcom_train/9531594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(CharacterI c1, CharacterI c2) {
String c1value = null, c2value = null;
try {
c1value = c1.getValue(c1.getCharFieldForName(comparisonField)).getName();
c2value = c2.getValue(c2.getCharFieldForName(comparisonField)).getName();
} catch (CharFieldException e) {
// Do something here! Probably log it...
}
return c1value.compareTo(c2value);
}
COM: <s> a method to perform a string style comparison on two characters </s>
|
funcom_train/3883236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateIdType_MaxLength(String idType, DiagnosticChain diagnostics, Map context) {
int length = idType.length();
boolean result = length <= 256;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImsMdRootv1p1Package.Literals.ID_TYPE, idType, length, 256, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em id type em </s>
|
funcom_train/5673283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReply(String replyAddress) throws SMIMEException {
try {
InternetAddress reply[] = new InternetAddress[1];
reply[0] = new InternetAddress(replyAddress);
message.setReplyTo(reply);
} catch (Exception e) {
throw SMIMEException.getInstance(this, e, "addRecipient");
}
}
COM: <s> sets reply to field in message header </s>
|
funcom_train/36431115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean initPassiveConnection() throws Reply425Exception {
unbindPassive();
if (passiveMode) {
// Connection is enable but the client will do the real connection
session.getConfiguration().getFtpInternalConfiguration()
.bindPassive(getLocalAddress());
isBind = true;
return true;
}
// Connection is already prepared
return true;
}
COM: <s> initialize the socket from server side only used in passive </s>
|
funcom_train/4584149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAuthor(String author) {
// Get the DCModule so that we can check to see if "creator" is already
// set.
DCModule dcModule = getDCModule();
String currentValue = dcModule.getCreator();
if ((currentValue == null) || (currentValue.length() == 0)) {
getDCModule().setCreator(author);
}
}
COM: <s> sets the entry author </s>
|
funcom_train/14463266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recycle(){
Recyclable[] rs = new Recyclable[active.size()];
active.copyInto(rs);
for(int t=0;t<rs.length;t++){
try {
Recyclable rb = rs[t];
if(!rb.inUse()) {
// recycle it
rb.recycle();
// remove from active and lookup
active.remove(rb);
map.remove(rb);
// put in spares
spares.push(rb);
}
}catch(Exception ex) {
Logger.logErr("recycle failed",ex);
}
}
}
COM: <s> iterate all active items and try to recycle </s>
|
funcom_train/7619301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseEntry(String parameter, String value) {
String unescapedParameter = unescape(parameter);
ValueSanitizer valueSanitizer =
getEffectiveValueSanitizer(unescapedParameter);
if (valueSanitizer == null) {
return;
}
String unescapedValue = unescape(value);
String sanitizedValue = valueSanitizer.sanitize(unescapedValue);
addSanitizedEntry(unescapedParameter, sanitizedValue);
}
COM: <s> parse an escaped parameter value pair </s>
|
funcom_train/29722291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOk() {
if (ok == null) {
ok = new JButton();
ok.setBounds(new Rectangle(20, 120, 100, 20));
ok.setText(Bundle.getText("optionFrame.ok"));
ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
OptionFrame.this.appliquer();
dispose();
}
});
}
return ok;
}
COM: <s> this method creates the ok button </s>
|
funcom_train/28151533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Runner doOpen() {
if (wrap) return wrapMe();
File file=OurDialog.askFile(true, null, ".als", ".als files");
if (file!=null) {
Util.setCurrentDirectory(file.getParentFile());
doOpenFile(file.getPath());
}
return null;
}
COM: <s> this method performs file open </s>
|
funcom_train/33498536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean fontFamilyExists(String familyName) {
Iterator i = m_specMapping.keySet().iterator();
while (i.hasNext()) {
CoFontFaceSpec spec = (CoFontFaceSpec) i.next();
if (spec.getFamilyName().equals(familyName)) {
return true; // yep, we found at least one
}
}
return false; // none found
}
COM: <s> check if a font family exists in the spec mapping </s>
|
funcom_train/45109040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTestIndexInScenario(String scenarioName, String testName) throws Exception {
Vector<JTest> allTests = ScenariosManager.getInstance().getScenario(scenarioName).getRootTests();
Iterator<JTest> iter = allTests.iterator();
int i = 1;
while (iter.hasNext()) {
RunnerTest test = (RunnerTest) iter.next();
if (test.getMethodName().equals(testName)) {
return i;
}
i++;
}
return -1;
}
COM: <s> iterates over all tests in scenario tree looking for test test name </s>
|
funcom_train/22233524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackDistance(double backDistance) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DISTANCE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("LinearFog0"));
if (isLive())
((LinearFogRetained)this.retained).setBackDistance(backDistance);
else
((LinearFogRetained)this.retained).initBackDistance(backDistance);
}
COM: <s> sets back distance for fog </s>
|
funcom_train/28750480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowtype(Long newVal) {
if ((newVal != null && this.showtype != null && (newVal.compareTo(this.showtype) == 0)) ||
(newVal == null && this.showtype == null && showtype_is_initialized)) {
return;
}
this.showtype = newVal;
showtype_is_modified = true;
showtype_is_initialized = true;
}
COM: <s> setter method for showtype </s>
|
funcom_train/7751156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String searchSimple(Request req) {
String pattern = req.getParam("pattern");
debug.print("Search (simple) "+pattern);
String ret = "";
try {
ret = Utility.listFile2string(dirloader.search(pattern, new Comparator<String>(){
public int compare(String file, String pattern) {
if(file.contains(pattern))
return 0;
else
return 1;
}
}));
} catch (IOException e) {
// TODO Auto-generated catch block
debug.print("[ ERROR ] Can't search (simple) "+pattern);
e.printStackTrace();
}
return ret;
}
COM: <s> send list of file shared by search </s>
|
funcom_train/31317094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer getPDU() {
data = getData();
setLEN();
StringBuffer sb = new StringBuffer();
sb.append(getHeader());
sb.append('/');
sb.append(data);
sb.append('/');
String checksum = this.getChecksum(sb.toString());
StringBuffer sb1 = new StringBuffer();
sb1.append(stx);
sb1.append(sb.toString());
sb1.append(checksum);
sb1.append(etx);
System.out.println("UCPMessage.getBytes: La salida es: '".concat
(sb1.toString()).concat("'"));
System.out.println
("UCPMessage.getBytes: El tama\u00f1o de la salida es: '".concat
(String.valueOf(sb1.toString().length())).concat("'"));
return sb1;
}
COM: <s> return the complete pdu created by tje class </s>
|
funcom_train/42193940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasChildNodes() {
switch (nodeKind) {
case Type.DOCUMENT:
return true;
case Type.ELEMENT:
try {
return ((Node) node).getNodes().hasNext();
} catch (RepositoryException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
default:
return false;
}
}
COM: <s> determine whether the node has any children </s>
|
funcom_train/276288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
if (backingStore == null) {
Dimension size = super.getSize();
backingStore = createImage(size.width, size.height);
buffer.update[0] = true;
redraw();
}
if (debug > 1)
System.err.println("Clip region: " + g.getClipBounds());
g.drawImage(backingStore, 0, 0, this);
}
COM: <s> paint the current screen using the backing store image </s>
|
funcom_train/25444284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression readCaseWhenExpression() {
Expression l = null;
read();
readThis(Tokens.OPENBRACKET);
l = XreadBooleanValueExpression();
readThis(Tokens.COMMA);
Expression thenelse = XreadValueExpression();
readThis(Tokens.COMMA);
thenelse = new ExpressionOp(OpTypes.ALTERNATIVE, thenelse,
XreadValueExpression());
l = new ExpressionOp(OpTypes.CASEWHEN, l, thenelse);
readThis(Tokens.CLOSEBRACKET);
return l;
}
COM: <s> reads a casewhen expression </s>
|
funcom_train/18750123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addNode(Node elem) {
boolean result = nodeSet.add(elem);
assert result;
if (nodeEdgeMap != null) {
Set<Edge> edges = nodeEdgeMap.put(elem, new HashSet<Edge>());
assert edges == null : String.format("Node %s already has incident edges %s", elem, edges);
freshNodeKeys.add(elem);
}
return result;
}
COM: <s> adds the node to the node set and the node edge map </s>
|
funcom_train/45645922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
if (!this.enterEInstitution("staff", new MainTask())) {
// if (logger.isEnabledFor(Level.FATAL)) {
// logger.fatal("It can't enter in the eInstitution.");
// }
} else {
TimerServiceProfile service = this.getTimerService();
service.register(this, CHECK_SM, DELAYBETWEENAUCTIONS);
service.register(this, CHECK_RM, DELAYBETWEENAUCTIONS + 1000);
}
}
COM: <s> try to enter in the current art e institution </s>
|
funcom_train/18624858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultipleTokensAnyFuzzy() {
// create request object
JDOMFactory factory = new DefaultJDOMFactory();
Element request = factory.element("request");
Element any = factory.element("any");
any.addContent("fucking hell");
request.addContent(any);
Element similarity = factory.element("similarity");
similarity.addContent("0.6885496183206108");
request.addContent(similarity);
// build lucene query
Query query = new LuceneQueryBuilder(_tokenizedFieldSet, _analyzer).build(request);
// verify query
assertEquals("+(+any:fucking~0.68854964 +any:hell~0.68854964) +_isTemplate:n", query.toString());
}
COM: <s> any parameter with multiple token values and with fuzziness </s>
|
funcom_train/3303955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewSize(int viewSize) {
// Normalize viewSize property to a valid value
if (viewSize < VIEWSIZE_NORMAL || viewSize > VIEWSIZE_EXCLUSIVE) {
viewSize = VIEWSIZE_NORMAL;
}
int oldViewSize = this.viewSize;
this.viewSize = viewSize;
if (this.viewSize != oldViewSize) {
firePropertyChange(VIEWSIZE_PROPERTY, oldViewSize, viewSize);
}
}
COM: <s> sets the view size property </s>
|
funcom_train/16643556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() throws WrongResourceKeyException {
this.diffusionRate =
GroundKeys.diffusion.getValue().doubleValue() / NB_NEIGHBOR;
this.max = GroundKeys.maxEnergy.getValue().doubleValue();
resources = new Double[Point.getNbRows()][Point.getNbColumns()];
initResources();
setChanged();
notifyObservers();
}
COM: <s> reset the ground reading properties and initializing resources to zero </s>
|
funcom_train/49048991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalCompletedItemsNotExcluded() {
int numCompleted = 0;
String item;
for (Iterator i = completedItems.iterator(); i.hasNext(); ) {
item = (String) i.next();
if (!isExcludedItem(item)) {
numCompleted++;
}
}
return numCompleted;
}
COM: <s> get the total completed items which are not excluded </s>
|
funcom_train/35714347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image getDefaultCueImage() {
if (fCachedDefaultCueImage == null) {
ImageDescriptor cueID= ImageDescriptor.createFromFile(AbstractControlContentAssistSubjectAdapter.class, "images/content_assist_cue.gif"); //$NON-NLS-1$
fCachedDefaultCueImage= cueID.createImage(getControl().getDisplay());
}
return fCachedDefaultCueImage;
}
COM: <s> returns the default cue image </s>
|
funcom_train/23058042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDeleteSQL() {
System.out.println("getDeleteSQL");
final VarsMapper instance = new VarsMapper();
final String expResult = "";
final String result = instance.getDeleteSQL();
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 delete sql method of class vars mapper </s>
|
funcom_train/12973162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedKeyNamePair(KeyNamePair kp) {
int count = this.getItemCount();
for(int i = 0; i < count; i++) {
ListItem item = getItemAtIndex(i);
if (item.getValue() instanceof Integer) {
if (kp.getKey() == (Integer)item.getValue()) {
setSelectedIndex(i);
break;
}
}
}
}
COM: <s> select selected item base on kp </s>
|
funcom_train/8495680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getYear(String volume, String year){
String value = StringUtils.trimToNull(year) == null? volume:year;
//attempt to locate a year in the volume
//assume that a year is any 4 digits in a row
Matcher matcher =yearPattern.matcher(volume);
if(matcher.find()){
value = matcher.group();
}else{
value =null;
}
return value;
}
COM: <s> get the year for the bhl reference </s>
|
funcom_train/50927623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CMLReactant findLimitingReactant() {
List<CMLReactant> reactants = this.getReactants();
CMLReactant limitingReactant = null;
double maximumMolesPerCount = Double.MAX_VALUE;
for (CMLReactant reactant : reactants) {
ReactantTool reactantTool = ReactantTool.getOrCreateTool(reactant);
double molesPerCount = reactantTool.getMolesPerCount();
if (!Double.isNaN(molesPerCount) && molesPerCount < maximumMolesPerCount) {
maximumMolesPerCount = molesPerCount;
limitingReactant = reactant;
}
}
return limitingReactant;
}
COM: <s> finds reactant with smallest value of molar amount count </s>
|
funcom_train/5395403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetShortName() {
System.out.println("getShortName");
TableAttribute instance = null;
String expResult = "";
String result = instance.getShortName();
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 short name method of class org </s>
|
funcom_train/45246873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldProporcaoGTR() {
if (jNumberFloatFieldProporcaoGTR == null) {
jNumberFloatFieldProporcaoGTR = new JNumberFloatField();
jNumberFloatFieldProporcaoGTR.setLocation(new Point(345, 153));
jNumberFloatFieldProporcaoGTR.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldProporcaoGTR;
}
COM: <s> this method initializes j number float field proporcao gtr </s>
|
funcom_train/8241709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setForRecapButtonActionPerformed(ActionEvent evt) {
String category = (String) categoryComboBox.getModel().getSelectedItem();
String session = (String) sessionsComboBox.getModel().getSelectedItem();
if (category != null && session != null) {
model.setRecapWordsList(new CategorySessionBean(category, session));
}
}
COM: <s> sets a selected word criterias category and session for recap </s>
|
funcom_train/4295480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Choice getDatingChoice() {
if (datingChoice == null) {
datingChoice = new Choice();
datingChoice.setSize(new java.awt.Dimension(138,21));
datingChoice.setLocation(new java.awt.Point(604,55));
datingChoice.add("Entire Career");
datingChoice.add("Current Month");
datingChoice.add("Last Month");
datingChoice.add("Past 3 Months");
datingChoice.add("Past 6 Months");
datingChoice.add("Past Year");
}
return datingChoice;
}
COM: <s> this method initializes dating choice </s>
|
funcom_train/48621713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getPublicationCountByPersonName(List<Long> personNameIds) {
Query q = hbCrudDAO.getHibernateTemplate().getSessionFactory().getCurrentSession().getNamedQuery("getPublicationCountByPersonNameId");
q.setParameterList("personNameIds", personNameIds);
Long count = (Long)q.uniqueResult();
return count;
}
COM: <s> get the publication count for given name id </s>
|
funcom_train/14418217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double min() {
if ((sizeX == 0) || (sizeY == 0))
return 0;
double D = getItem(0, 0);
for (int i = sizeX - 1; i >= 0; i--)
for (int j = sizeY - 1; j >= 0; j--)
if (D > getItem(i, j))
D = getItem(i, j);
return D;
}
COM: <s> returns the minimum value of all elements of the matrix </s>
|
funcom_train/15626511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenu(@Nullable final JMenu recentMenu) {
if (this.recentMenu != null) {
this.recentMenu.getPopupMenu().removePopupMenuListener(popupMenuListener);
}
this.recentMenu = recentMenu;
if (this.recentMenu != null) {
this.recentMenu.getPopupMenu().addPopupMenuListener(popupMenuListener);
}
}
COM: <s> sets the menu to update </s>
|
funcom_train/31873575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName(){
String result = "";
if(size() == 0) return result;
for(int i=0; i<size()-1; i++){
result += (String)elementAt(i) + ".";
}
result += (String)elementAt(size()-1);
return result;
}
COM: <s> returns dot seperated name of this path </s>
|
funcom_train/26254271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassDeclaration getPublicClass() throws ParseTreeException {
ClassDeclaration ret = null;
ClassDeclarationList tdecls = getClassDeclarations();
for (int i = 0, len = tdecls.size(); i < len; ++i) {
ClassDeclaration cdecl = tdecls.get(i);
if (cdecl.getModifiers().contains(ModifierList.PUBLIC)) {
if (ret != null) {
throw new ParseTreeException(
"getPublicClass() "
+ "in CompileationUnit : "
+ "multiple public class");
}
ret = cdecl;
}
}
return ret;
}
COM: <s> obtains the public class in this compilation unit </s>
|
funcom_train/37830133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void status(Player player) {
Group group = SingletonRepository.getGroupManager().getGroup(player.getName());
if (group == null) {
// Send an empty event if the player is not a group member, and let
// the client sort out that it was not about parting from a group.
player.addEvent(new GroupChangeEvent());
return;
}
group.sendGroupChangeEvent(player);
}
COM: <s> status report about the group </s>
|
funcom_train/38268899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillCache(Object o) {
Comparable c = (Comparable) o;
// while element is "smaller" than the first element in cache,
// keep prepending
while( c.compareTo(this.first()) <= 0 )
this.prepend();
// while element is "bigger" than the first element in cache,
// keep appending.
while( c.compareTo(this.last()) >= 0 )
this.append();
}
COM: <s> this method fills the cache for a specific range of values </s>
|
funcom_train/27834974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectedElement() {
JToggleButton tmp;
for (int i = 0; i < _elements.size(); i++) {
tmp = (JToggleButton) _elements.get(i);
Integer element = new Integer(tmp.getName());
if (tmp.isSelected()) {
return element.intValue();
}
}
return -1;
}
COM: <s> returns the selected element </s>
|
funcom_train/1719904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchName(String regexp) throws IllegalArgumentException {
if (StringUtil.isEmpty(regexp)) {
throw new IllegalArgumentException("Can't perform regular expression since the given input is empty. Check the Method body velocity code: regexp='" + regexp + "'");
}
return name.matches(regexp);
}
COM: <s> performs a regular expression matching the fieldname </s>
|
funcom_train/50484512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean bubbledown(SyntaxElement e) {
int index = elements.indexOf(e);
if (index < elements.size() - 1) {
Object temp = elements.get(index);
elements.set(index, elements.get(index + 1));
elements.set(index + 1, temp);
fireActionListener();
return true;
} else
return false;
}
COM: <s> bubble down a syntax element </s>
|
funcom_train/11745699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjRelationship getRelationshipForDbRelationship(DbRelationship dbRelationship) {
for (ObjRelationship objRel : getRelationshipMap().values()) {
List<DbRelationship> relList = objRel.getDbRelationships();
if (relList.size() != 1) {
continue;
}
if (relList.get(0) == dbRelationship) {
return objRel;
}
}
return null;
}
COM: <s> returns obj relationship of this entity that maps to code db relationship code </s>
|
funcom_train/2266369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel_Fields() {
if (jPanel_Fields == null) {
jPanel_Fields = new JPanel();
jPanel_Fields.setBounds(new java.awt.Rectangle(4, 17, 293, 180));
jPanel_Fields.add(getPanel_TNameDaoFields(), null);
}
return jPanel_Fields;
}
COM: <s> this method initializes j panel fields </s>
|
funcom_train/18062655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGenotypes(final Collection<Genotype<G>> genotypes) {
foreach(genotypes, NonNull);
if (genotypes.size() < 1) {
throw new IllegalArgumentException(
"Genotype size must be greater than zero, but was " +
genotypes.size() + ". "
);
}
final Population<G, C> population = new Population<>(genotypes.size());
for (Genotype<G> genotype : genotypes) {
population.add(Phenotype.valueOf(
genotype,
_fitnessFunction,
_fitnessScaler,
_generation
));
}
_population = population;
_populationSize = genotypes.size();
}
COM: <s> set the initial population in form of a list of genotypes </s>
|
funcom_train/6255011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (!(obj instanceof ListenEndpointImpl)) {
return false;
}
ListenEndpointImpl ole = (ListenEndpointImpl) obj;
KerberosServerEndpoint ose = ole.getServerEndpoint();
return serverSubject == ose.serverSubject &&
serverPrincipal.equals(ose.serverPrincipal) &&
port == ose.port &&
Util.sameClassAndEquals(csf, ose.csf) &&
Util.sameClassAndEquals(ssf, ose.ssf);
}
COM: <s> two instances of this class are equal if they are instances </s>
|
funcom_train/12835804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(String name) {
try {
if(fields.containsKey(name)) {
if(fields.get(name) instanceof Field){
return ((Field)fields.get(name)).get(this);
}
else {
return fields.get(name);
}
}
else return null;
}catch(IllegalAccessException ex){
ex.printStackTrace();
return null;
}
}
COM: <s> gets particular field value for given name </s>
|
funcom_train/2955698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void awake() throws ContradictionException {
Explanation expl = ((PalmSolver) this.getSolver()).makeExplanation();
((PalmConstraintPlugin) this.hook).self_explain(expl);
this.cste = new PalmRealIntervalConstant(cste.getInf(), cste.getSup(), (PalmExplanation) expl.copy(), expl);
super.awake();
}
COM: <s> first propagation update the explanation of the constant interval with </s>
|
funcom_train/668884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList findAllByParentIdAndCRFVersionId(int parentId, int crfVersionId) {
HashMap variables = new HashMap();
variables.put(new Integer(1), new Integer(parentId));
variables.put(new Integer(2), new Integer(crfVersionId));
return this.executeFindAllQuery("findAllByParentIdAndCRFVersionId", variables);
}
COM: <s> finds the children of an item in a given crf version sorted by </s>
|
funcom_train/3435961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private NamingContextExt getDefaultRootNamingContext( ) {
synchronized( rootContextCacheLock ) {
if( rootNamingContextExt == null ) {
try {
rootNamingContextExt =
NamingContextExtHelper.narrow(
orb.getLocalResolver().resolve( "NameService" ) );
} catch( Exception e ) {
rootNamingContextExt = null;
}
}
}
return rootNamingContextExt;
}
COM: <s> this is required for corbaname resolution </s>
|
funcom_train/35020277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearAllFields() {
removeButton.setEnabled(false);
execTextField.setEnabled(false);
nameTextField.setText("");
baseTextField.setText("");
execTextField.setText("");
sourceEditorPanel.setWritable(false);
List<String> empty = Collections.emptyList();
sourceEditorPanel.setPath(empty);
}
COM: <s> clears all the fields read only and writable and disables them </s>
|
funcom_train/7446086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long insert(City dto) {
Connection conn = null;
try {
// get the user-specified connection or get a connection from the
// ResourceManager
conn = ResourceManager.getConnection(TRACE_ID);
return insert(dto, conn);
} catch (SQLException _e) {
_e.printStackTrace();
// throw _e;
} catch (Exception _e) {
_e.printStackTrace();
// throw new SQLException( "Exception: " + _e.getMessage());
} finally {
try {
} catch (Exception e) {
}
ResourceManager.freeConnection(conn);
}
return -1;
}
COM: <s> inserts a new row in the city table </s>
|
funcom_train/40732182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status getStatus() {
for (IUploader uploader : uploaders) {
Status stat = uploader.getStatus();
if (stat == Status.INPROGRESS || stat == Status.QUEUED || stat == Status.SUBMITING) {
return Status.INPROGRESS;
}
}
if (uploaders.size() <= 1) {
return Status.UNINITIALIZED;
} else {
return Status.DONE;
}
}
COM: <s> return the status of the multiuploader </s>
|
funcom_train/35949896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unsubscribe(Subscriber aSubscriber, ChannelManager aChannelManager) {
if (this.mSubscribers == null) {
return;
}
if (mSubscribers.contains(aSubscriber)) {
mSubscribers.remove(aSubscriber);
// Alex: Also remove from persistent storage.
aChannelManager.removeSubscriber(aSubscriber);
if (mChannelListeners != null) {
for (ChannelListener listener : mChannelListeners) {
listener.unsubscribed(this, aSubscriber);
}
}
}
}
COM: <s> unsubscribe from this channel and updates the channel store information </s>
|
funcom_train/10951267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullDefaultActionRef() {
if ((defaultActionRef == null) && !parents.isEmpty()) {
for (PackageConfig parent : parents) {
String parentDefault = parent.getFullDefaultActionRef();
if (parentDefault != null) {
return parentDefault;
}
}
}
return defaultActionRef;
}
COM: <s> gets the default action ref name </s>
|
funcom_train/19977920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadDocument(File file, boolean asTemplate) throws Exception {
if (!OFFICE_FILE_FILTER.accept(file)) {
throw new UnsupportedOperationException("The file extension must match: " + EXTENSION);
}
if (asTemplate) {
descriptor.setAsTemplate(asTemplate);
}
this.file = file;
descriptor.setHidden(true);
clear();
}
COM: <s> load an existing document into the document handler </s>
|
funcom_train/7673795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeList makeTypeList(int offset, int size) {
if (size == 0) {
return StdTypeList.EMPTY;
}
if (pool == null) {
throw new IllegalStateException("pool not yet initialized");
}
return new DcfTypeList(bytes, offset, size, pool, observer);
}
COM: <s> constructs and returns an instance of </s>
|
funcom_train/49470196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteProductAlias(ProductId pid, String alias) throws Exception, RaciException{
Db db = dbRW();
try{
db.begin();
_logger.info("Asset : deleteProductAlias "+pid+", "+alias);
checkUserCanModify(db);
DbAliases.deleteProductAlias(db, pid, alias);
db.commit();
return true;
} catch (Exception e) { store(e); throw e; } finally { db.safeClose(); }
}
COM: <s> remove an alias for a product </s>
|
funcom_train/18760763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Condition addHavingCondition( String strCond ) {
if ( strCond == null || strCond.trim().equals( "" ) )
return null;
Condition oCond = new Condition( strCond );
if ( vHvngCond == null )
vHvngCond = new Vector<Condition>( 2, 1 );
vHvngCond.add( oCond );
return oCond;
}
COM: <s> add a having condition to the existing list of conditions </s>
|
funcom_train/16103701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnSaveHostUnit() {
if (this.btnSaveHostUnit == null) {
this.btnSaveHostUnit = new JButton();
this.btnSaveHostUnit.setText(rb.getString("dialog.save")); //$NON-NLS-1$
this.btnSaveHostUnit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveHostUnit();
}
});
this.btnSaveHostUnit.setEnabled(false);
}
return this.btnSaveHostUnit;
}
COM: <s> this method initializes btn save host unit </s>
|
funcom_train/12176390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateFieldTitle(XFFormFieldAttributes attributes) {
String title;
// If an explicit title has been set then use that.
if (attributes.getTitle() != null) {
return;
}
// Next try the prompt if that has been set.
if ((title = getPlainText(attributes.getCaption())) != null) {
attributes.setTitle(title);
return;
}
// No title was found.
return;
}
COM: <s> update the title to use for a field </s>
|
funcom_train/862929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireHooksChanged() {
// Guaranteed to return a non-null array
Object[] listeners = _listeners.getListenerList();
// Process the listeners last to first, notifying
// those that are interested in this event
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == IScriptListener.class) {
((IScriptListener) listeners[i + 1]).hooksChanged();
}
}
}
COM: <s> tells listeners that a new hook has been added </s>
|
funcom_train/28403014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addQualityValue(int value) {
// don't fill, move existing values and add new value to beginning
for(int i = 1; i < amountQualityValues; i++) {
float tmp = qualityValues.get(0, i, 0);
qualityValues.set(0, i-1, 0, tmp);
}
qualityValues.set(0, amountQualityValues-1, 0, value);
chart2D.repaint();
}
COM: <s> add a new quality value to the chart </s>
|
funcom_train/19765277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
backCommand = new Command("\u540E\u9000", Command.BACK, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/44950406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performToggleFullScreen() {
FullScreenViewer fullScreen = FullScreenViewer.instance();
JomicFrame controller = getLastActiveWindow();
if (fullScreen.isVisible()) {
fullScreen.performCancel();
} else {
fullScreenViewerRunner = new FullScreenViewerRunner(controller);
SwingUtilities.invokeLater(fullScreenViewerRunner);
}
}
COM: <s> change view of current comic to full screen </s>
|
funcom_train/3710211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSegmentDescriptor (int seq, int extension) {
if (extension > 0 && extension <=nextend) {
try {
Segment segdesc = (Segment)descriptor[extension-1].elementAt(seq-1);
String descriptor = StringUtilities.CleanPrefix(segdesc.segment);
return descriptor;
} catch (IndexOutOfBoundsException e) {
return "";
}
} else {
return "";
}
}
COM: <s> returns a segment descriptor string </s>
|
funcom_train/25459747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JasperPrint fillReport(JasperReport jasperReport){
JasperPrint jasperPrint=null;
try {
jasperPrint =JasperFillManager.fillReport(
jasperReport,
new HashMap(),
new JREmptyDataSource());
} catch (JRException e) {
log.error("Error in filling the report..... "+e.getMessage());
}
return(jasperPrint);
}
COM: <s> fill the report and generates a binary version of it </s>
|
funcom_train/20138624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(ControllerProperty theProperty, String fromSet, String toSet) {
if (!exists(theProperty)) {
return;
}
if (allProperties.containsKey(theProperty)) {
if (allProperties.get(theProperty).contains(fromSet)) {
allProperties.get(theProperty).remove(fromSet);
}
addSet(toSet);
allProperties.get(theProperty).add(toSet);
}
}
COM: <s> moves a controller property from one set to another </s>
|
funcom_train/32037039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge(ValidationReport report) {
if (report == null) {
throw new IllegalArgumentException("report may not be null");
}
for (PropertyValidationError error : report.propertyErrors()) {
propertyErrors.add(error);
}
for (InstanceValidationError error : report.instanceErrors()) {
instanceErrors.add(error);
}
}
COM: <s> merges the contents of another validation report into this one </s>
|
funcom_train/14206007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDividerSize(int dividerSize) {
if (dividerSize < 0) {
throw new IllegalArgumentException("invalid dividerSize");
}
int oldDividerSize = this.dividerSize;
this.dividerSize = dividerSize;
firePCS("dividerSize", oldDividerSize, dividerSize);
}
COM: <s> sets the width of dividers in split rows and the height of </s>
|
funcom_train/17210519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadNetwork(File file, boolean tab) {
String cont = FileIO.loadFile(file);
boolean success = ns.edgeListParse(cont, file.getName(), tab);
if (success) {
cont = null;
File node = new File(file.getAbsoluteFile()+".n"); //$NON-NLS-1$
if (node.exists()) cont = FileIO.loadFile(node);
ns.nodeListParse(cont, tab);
p.loadMethod = 0;
p.setFilename(file.getAbsolutePath());
}
return success;
}
COM: <s> load a new network </s>
|
funcom_train/5864031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setAutomaticTimeout(String deviceType, boolean auto) {
if (deviceType == null) deviceType = "ajax";
TimeoutURIInfo inf = (TimeoutURIInfo)_timeoutURIs.get(deviceType);
if (inf != null) {
boolean old = inf.auto;
inf.auto = auto;
return old;
}
inf = new TimeoutURIInfo();
inf.auto = auto;
_timeoutURIs.put(deviceType, inf);
return false;
}
COM: <s> sets whether to automatically trigger the timeout at the client </s>
|
funcom_train/39805857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreferredRowCount(int rows) {
if (rows <= 0) {
return;
}
int old = getPreferredRowCount();
minCalRows = rows;
firePropertyChange("preferredRowCount", old, getPreferredRowCount());
// PENDING JW: remove revalidate/repaint, ui must take care of it
revalidate();
repaint();
}
COM: <s> sets the preferred number of rows to paint calendars </s>
|
funcom_train/3673475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getToolTipText(MouseEvent aEvent) {
Point lP = aEvent.getPoint();
int lRowIndex = rowAtPoint(lP) + lRowOffset;
int lColIndex = columnAtPoint(lP) + lColumnOffset;
return "(" + lRowIndex + "," + lColIndex + ")";
}
COM: <s> the tooltip text returned by this method contains the coordinates of the cursor </s>
|
funcom_train/29630458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
if (MedlineField_Type.featOkTst && ((MedlineField_Type)jcasType).casFeat_name == null)
jcasType.jcas.throwFeatMissing("name", "taxonfinder.typesys.MedlineField");
return jcasType.ll_cas.ll_getStringValue(addr, ((MedlineField_Type)jcasType).casFeatCode_name);}
COM: <s> getter for name gets the field name that represents the field </s>
|
funcom_train/43467412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logPlainMessages() {
log.trace("trace"); // Should not actually get logged
log.debug("debug"); // Should not actually get logged
log.info("info");
log.warn("warn");
log.error("error");
log.fatal("fatal");
}
COM: <s> log the plain messages </s>
|
funcom_train/886553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LaTeXDocumentPortion append(LaTeXDocumentPortion ldp) {
if (!bEmpty) {
// add the current node to the node list and create new current node
nodes.add(curText);
curText = new StringBuffer();
bEmpty = true;
}
nodes.add(ldp);
return this;
}
COM: <s> add another portion to the end of this portion </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.