__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/44107826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet executePrepared() throws SQLException {
if (dbtype.equals("file")) return null;
ResultSet rs = null;
if(pstatement!=null) {
rs = pstatement.executeQuery();
} else {
System.out.println("Call prepareStatement() before executePrepared()!");
}
return rs;
}
COM: <s> execute prepared statement </s>
|
funcom_train/976060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getOutputFile() {
File file;
FileChooser fc = new FileChooser(FileChooserBase.SAVE, pref
.getExportPath(expName).getAbsolutePath());
fc.setTitle("Select target file:");
fc.addMask(mask);
if (fc.execute() != FormBase.IDCANCEL) {
file = fc.getChosenFile();
pref.setExportPath(expName, new java.io.File(file.getFullPath()));
return file;
} else {
return null;
}
}
COM: <s> uses a filechooser to get the name of the export file </s>
|
funcom_train/17846905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startLeftSingleClickPluginFromKeyboard() {
if(mCurrentCol == -1 || mCurrentRow == -1) {
return;
}
Program program = mModel.getProgramPanel(mCurrentCol, mCurrentRow).getProgram();
Plugin.getPluginManager().handleProgramSingleClick(program);
}
COM: <s> starts the left single click plugin </s>
|
funcom_train/25342231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerAlias(int titleId, String artist, String title) {
RegisteredTitle t = this.titles.get(titleId);
if (t != null && StringUtils.isNotEmpty(artist) && StringUtils.isNotEmpty(title)) {
t.addAlias(this.getSharedString(artist), title);
}
}
COM: <s> registers an alias for a given title </s>
|
funcom_train/44733433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisionModeChart() throws StellariumException {
if (!getVisionModeChart()) {
core.setColorScheme(conf, "chart_color");
// ui.setColorScheme(getConfigFile(), "chart_color");
}
drawMode = DRAWMODE.CHART;
}
COM: <s> set flag for activating chart vision mode </s>
|
funcom_train/42200839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
// open streams
InputStream is = toClient.getInputStream();
OutputStream fo = toHost.getOutputStream();
int i;
while (true) {
// read from the input...
i = is.read(buffer, 0, buffer.length);
if (i < 0) break;
// and write it right back to the output
fo.write(buffer, 0, i);
fo.flush();
}
} catch (Exception e) {
} finally {
close();
}
}
COM: <s> runs this tranfer manager </s>
|
funcom_train/31729963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMarriage(Marriage m) {
for(Iterator i=m.getPeople().iterator(); i.hasNext();) {
Person p = (Person)i.next();
marriages.put(p, m);
p.addMarriage(m);
}
Iterator mi = m.getPeople().iterator();
Person p1 = (Person)mi.next();
Person p2 = (Person)mi.next();
for(Iterator i=listeners.iterator(); i.hasNext();)
((FamilyListener)i.next()).marriageAdded(p1, p2);
}
COM: <s> adds an marriage that was created elsewhere </s>
|
funcom_train/44710513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStatus() {
MimeTypeStatus ms = MimeTypeStatus.getMimeTypeStatus();
if ( (Boolean) m_conf.getParameter(INSO_FILTER_WORKS) == Boolean.TRUE) {
ms.setInsoFilterWorks(new BigDecimal(1));
} else {
ms.setInsoFilterWorks(new BigDecimal(0));
}
ms.save();
}
COM: <s> update status table with new hash code </s>
|
funcom_train/34799374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addField(FieldInfo field) {
if (fieldsByTagNumber == null) {
fieldsByTagNumber = new TreeMap<Integer, FieldInfo>();
fieldsByName = new TreeMap<String, FieldInfo>();
}
fieldsByTagNumber.put(field.getTagNumber(), field);
fieldsByName.put(field.getName(), field);
}
COM: <s> adds a field </s>
|
funcom_train/4111357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMetaData(String name) {
for (int i = 0; i < MetaData.size(); i++) {
if (MetaData.get(i).hasAttribute("name") && MetaData.get(i).getAttribute("name").equals(name)) {
return MetaData.get(i).getAttribute("content");
}
}
return null;
}
COM: <s> returns the content attribute of the meta tag that has the name attribute </s>
|
funcom_train/44481257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getQuestionText() {
if (jfsElement == null)
return "";
JFSText t = JFSText.getInstance();
if (jfsElement.getAction() == SyncAction.ASK_LENGTH_INCONSISTENT)
return t.get("syncQuestion.lengthInconsistent");
else if (jfsElement.getAction() == SyncAction.ASK_FILES_GT_HISTORY)
return t.get("syncQuestion.filesGtHistory");
else if (jfsElement.getAction() == SyncAction.ASK_FILES_NOT_IN_HISTORY)
return t.get("syncQuestion.filesNotInHistory");
return "";
}
COM: <s> returns the text for the question </s>
|
funcom_train/42398844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SerializationPolicy createSerializationPolicy() {
return new SerializationPolicy() {
public boolean shouldDeserializeFields(final Class<?> clazz) {
throw new UnsupportedOperationException("shouldDeserializeFields");
}
public boolean shouldSerializeFields(final Class<?> clazz) {
return Object.class != clazz;
}
public void validateDeserialize(final Class<?> clazz) {
throw new UnsupportedOperationException("validateDeserialize");
}
public void validateSerialize(final Class<?> clazz) {
}
};
}
COM: <s> creates a default serialization policy that doesnt complain when asked to </s>
|
funcom_train/45801434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isHidden() {
TopicMap tm = getTopicMap();
TopicIF aType = OntopolyModelUtils.getTopicIF(tm, PSI.ON_IS_HIDDEN_TYPE);
TopicIF rType = OntopolyModelUtils.getTopicIF(tm, PSI.ON_ONTOLOGY_TYPE);
TopicIF player = getTopicIF();
return OntopolyModelUtils.isUnaryPlayer(tm, aType, player, rType);
}
COM: <s> returns true if this typing topic is hidden </s>
|
funcom_train/19090724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector whatCanGoHere(int[] state) {
int curState = state[0];
if (curState < 0)
curState = state[1];
Vector ret = new Vector();
for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
if (fTransTable[curState][elemIndex] != -1)
ret.addElement(fElemMap[elemIndex]);
}
return ret;
}
COM: <s> check which elements are valid to appear at this point </s>
|
funcom_train/13569964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calcDistance(Route route) {
Double dist = route.getDistance();
if (dist != null && !Double.isNaN(dist.doubleValue())) {
return dist.doubleValue();
}
RouteDistanceCalculator calc = getCalculator(route.getClass());
if (calc == null) {
throw new IllegalArgumentException("No distance calculator known for route of type " + route.getClass().getCanonicalName());
}
double d = calc.calcDistance(route);
route.setDistance(d);
return d;
}
COM: <s> if necessary calculates the distance of a route before returning it </s>
|
funcom_train/46824712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
StringBuffer str = new StringBuffer ();
for (int y = 0; y < 8; y++) {
for (int x = 0; x < 8; x++) {
str.append(PIECES_STR_ABRV[getPiece(x, y)] + " ");
}
str.append ("\n");
}
return str.toString();
}
COM: <s> displays the pieces in the board in a string grid e </s>
|
funcom_train/12765377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedMaximum(long rangeMax) {
checkWidget();
//don't do it if the user is trying to move
//the slider
if (helper.armed()) {
return;
}
if (rangeMax > max) {
rangeMax = max;
} else if (rangeMax < this.rangeMin) {
rangeMax = this.rangeMin;
}
this.rangeMax = rangeMax;
setVisualHigh(toVisualValue(rangeMax));
canvas.redraw();
}
COM: <s> sets the current maximum selected value for the range </s>
|
funcom_train/50880526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() throws Exception {
// Retrieve the connection to the database
Connection tempConnection = requestUpdateConnection();
// clear the insert prepared statement
if (myInsertPreparedStatement != null){
myInsertPreparedStatement.close();
myInsertPreparedStatement = null;
}
// commit the transaction
tempConnection.commit();
releaseUpdateConnection();
fireCommit();
setCache(null, null);
}
COM: <s> commit all changes since the last commit </s>
|
funcom_train/18111908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCountyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ContactDetails_County_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ContactDetails_County_feature", "_UI_ContactDetails_type"),
BioDBPackage.Literals.CONTACT_DETAILS__COUNTY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the county feature </s>
|
funcom_train/50315327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLineJoin() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
try {
lockToolkit();
int join = SWT.JOIN_MITER;
switch(Fox.FXDC_getLineJoin(handle)) {
case Fox.JOIN_MITER: join = SWT.JOIN_MITER; break;
case Fox.JOIN_ROUND: join = SWT.JOIN_ROUND; break;
case Fox.JOIN_BEVEL: join = SWT.JOIN_BEVEL; break;
}
return join;
} finally {
unlockToolkit();
}
}
COM: <s> returns the receivers line join style which will be one </s>
|
funcom_train/9300956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Boolean getRoutes() {
RouteListParser parser =
getAndParse(NextMuniUriBuilder.buildRouteListUri("sf-muni").toString(),
RouteListParser.class);
if (parser == null) {
return false;
}
db.setRoutes(parser.getRoutes());
return true;
}
COM: <s> downloads the list of routes </s>
|
funcom_train/29389559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBooleanProperty() {
TestTask tt = new TestTask(null, "Custom", testTask.getDefinition(), null) ;
assertTrue(tt.getBooleanProperty("booleanTest", false)) ;
assertFalse(tt.getBooleanProperty("dummy", false)) ;
assertTrue(tt.getBooleanProperty("nonExistant", true)) ;
}
COM: <s> test method for get boolean property java </s>
|
funcom_train/4112056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand() {
if (screenCommand == null) {//GEN-END:|55-getter|0|55-preInit
// write pre-init user code here
screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|55-getter|1|55-postInit
// write post-init user code here
}//GEN-BEGIN:|55-getter|2|
return screenCommand;
}
COM: <s> returns an initiliazed instance of screen command component </s>
|
funcom_train/29927441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream output) {
Image i = generateImage();
try {
int pixels[][] = TestQuantize.getPixels(i);
// quant... probably unnecessary here...
int palette[] = Quantize.quantizeImage(pixels, 256);
GIFEncoder enc = new GIFEncoder(createImage(TestQuantize.makeImage(palette, pixels)));
enc.Write(output);
} catch (Exception e) {
LogBuffer.println("In GifKaryoViewExportPanel.synchronizeTo() got exception " + e);
}
}
COM: <s> save image to the currently selected file </s>
|
funcom_train/15540155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(int indent) {
for (int i = 0; i < size(); i++) {
for (int j = 0; j < indent; j++) System.out.print(" ");
System.out.print("synon: ");
WordList w = (WordList)elementAt(i);
w.print(indent);
}
}
COM: <s> prnt the synonym lists </s>
|
funcom_train/40765954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCommonNoteLineLists() {
makeLineLists( headLines, prop( og_firstIn ), prop( og_nextIn ) );
makeLineLists( tailLines, prop( og_firstOut ), prop( og_nextOut ) );
headLines.clear();
tailLines.clear();
}
COM: <s> create the lists of lines sharing common notes </s>
|
funcom_train/15914264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HashMap hashParameters( List parameterL ) {
HashMap hashMap = new HashMap();
if ( null != parameterL ) {
Iterator parameterI = parameterL.iterator();
while ( parameterI.hasNext() ) {
Parameter parameter = (Parameter)parameterI.next();
hashMap.put( parameter.getName(), parameter.getValue() );
}
}
return hashMap;
}
COM: <s> convert request parameters to hashtable </s>
|
funcom_train/50086019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(Object[] params) throws CDKException {
if (params.length != 1)
throw new CDKException("ChargeRule expects only one parameter");
if(!(params[0] instanceof Double))
throw new CDKException("The parameter must be of type Double");
charge = (Double) params[0];
}
COM: <s> sets the parameters attribute of the charge rule object </s>
|
funcom_train/28977951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importData(InputStream in) throws SQLException, DatabaseUnitException, ClassNotFoundException, IOException {
logger.info("importing data...");
ConnectionFactory factory = ConnectionFactory.getFactory();
factory.setProperties(System.getProperties());
logger.info("create connection...");
Connection connection = factory.getConnection();
try {
importData(in, connection);
}
finally {
factory.close(connection);
}
}
COM: <s> inserts data in existing tables </s>
|
funcom_train/3702590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setBoolean(String strTupleName, String strErr, boolean flag){
try {
Tuple t = getOrCreateTuple(strTupleName);
t.setAttribute(ATTR_VALUE, "" + flag);
save();
}
catch (Exception e) {
System.out.println(strErr + getPath());
e.printStackTrace();
}
} // of method
COM: <s> internal method for setting a boolean value within the policies </s>
|
funcom_train/45251081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerNode(WorkbenchPreferenceNode node) {
PlatformUI.getWorkbench().getExtensionTracker().registerObject(
node.getConfigurationElement().getDeclaringExtension(), node,
IExtensionTracker.REF_WEAK);
IPreferenceNode[] subNodes = node.getSubNodes();
for (int i = 0; i < subNodes.length; i++) {
registerNode((WorkbenchPreferenceNode) subNodes[i]);
}
}
COM: <s> register a node with the extension tracker </s>
|
funcom_train/8496965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Integer calculateLastPage(Long totalRecords, Integer pageSize) {
Integer lastPage = 0;
Integer lastRecordNum = totalRecords.intValue();
if (pageSize > 0) {
lastPage = (lastRecordNum / pageSize) + ((lastRecordNum % pageSize > 0) ? 1 : 0);
}
return lastPage;
}
COM: <s> calculate the last page number for pagination </s>
|
funcom_train/32069830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDocumentContents(Collection<DocumentContent> documentContents) {
boolean addOk = getDocumentContents().addAll(documentContents);
if (addOk) {
for(DocumentContent documentContent : documentContents) {
documentContent.setDocument((Document)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed document contents collection to the document collection </s>
|
funcom_train/11007034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void BROKENtestEscherDrawing() {
HWPFDocument docD = HWPFTestDataSamples.openSampleFile(docDFile);
List<Picture> allPictures = docD.getPicturesTable().getAllPictures();
assertEquals(1, allPictures.size());
Picture pic = allPictures.get(0);
assertNotNull(pic);
byte[] picD = readFile(imgDFile);
assertEquals(picD.length, pic.getContent().length);
assertBytesSame(picD, pic.getContent());
}
COM: <s> pending the missing files being uploaded to </s>
|
funcom_train/45251347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processChildElement(Map map, IConfigurationElement element) {
String tag = element.getName();
if (tag.equals(PropertyPagesRegistryReader.TAG_FILTER)) {
String key = element
.getAttribute(PropertyPagesRegistryReader.ATT_FILTER_NAME);
String value = element
.getAttribute(PropertyPagesRegistryReader.ATT_FILTER_VALUE);
if (key == null || value == null)
return;
map.put(key, value);
}
}
COM: <s> parses child element and processes it </s>
|
funcom_train/45608203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProperties(List propertiesElementList) throws Exception {
for ( Iterator properties = propertiesElementList.iterator() ; properties.hasNext() ; ) {
Element element = (Element) properties.next();
resolveElementAttribtues( element );
String name = getAttributeValue( element, TagsAttributes.PROPERTY_NAME );
String value = getAttributeValue( element, TagsAttributes.PROPERTY_VALUE );
putProperty( name, value );
}
}
COM: <s> loads all properties defined in project file </s>
|
funcom_train/23246913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double parseLatitude(final String aLatitude, final String aHemisphere) {
final int commaIndex = 2;
double degrees = Double.parseDouble(aLatitude.substring(0, commaIndex));
double minutes = Double.parseDouble(aLatitude.substring(commaIndex, aLatitude.length()));
double result = degrees + minutes / MINUTESPERHOUR;
if (aHemisphere.equals("N"))
return result;
return -result;
}
COM: <s> convert between gps string representation and double </s>
|
funcom_train/15532411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void incWeakRefPlusProxySubscriberCount() {
synchronized(listenerLock) {
weakRefPlusProxySubscriberCount++;
// System.out.println(weakRefPlusProxySubscriberCount);
if (cleanupStartThreshhold == null || cleanupPeriodMS == null) {
return;
}
if (weakRefPlusProxySubscriberCount >= cleanupStartThreshhold) {
startCleanup();
}
}
}
COM: <s> increment the count of stale proxies and start a cleanup task if necessary </s>
|
funcom_train/18596724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addXmlToCache(String uri, Element xml) throws CacheException {
JeevesJCS xmlCache = JeevesJCS.getInstance(XMLRESOLVER_JCS);
Element cachedXml = (Element) xmlCache.get(uri.toLowerCase());
if (cachedXml == null) {
Log.info(Log.XML_RESOLVER, "Caching "+uri.toLowerCase());
xmlCache.put(uri.toLowerCase(), xml);
}
}
COM: <s> add an xlink to the cache </s>
|
funcom_train/39317429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /** public void testGetBrown() {
System.out.println("testGetBrown");
System.out.println("this function was created to help in JUnit testing.");
assertEquals(f.getBrown(),f.red);//its a weird thing isn't it
}
COM: <s> public void test get red </s>
|
funcom_train/31625801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GroupMembers addToGroup(final User user, final String grpname) throws DBException {
GroupMembers oneMember = new GroupMembers();
oneMember.setGroupName(grpname);
oneMember.setUID(user.getUid());
if (!oneMember.find()) {
oneMember.add();
}
return oneMember;
}
COM: <s> add the specified group name to the given user </s>
|
funcom_train/43103599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onPreWindowOpen(ApplicationWindowConfigurer configurer) {
// If you override this method, it is critical to allow the superclass
// implementation to run as well.
super.onPreWindowOpen(configurer);
// Uncomment to hide the menubar, toolbar, or alter window size...
// configurer.setShowMenuBar(false);
configurer.setShowToolBar(false);
configurer.setInitialSize(new Dimension(610, 645));
}
COM: <s> this method is called prior to the opening of an application window </s>
|
funcom_train/13955173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Cipher createCipher(int mode) {
try {
Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
cipher.init(mode, _secretKey());
return cipher;
}
catch (java.security.NoSuchAlgorithmException ex) {
throw new NSForwardException(ex, "Couldn't find the AES algorithm; perhaps you do not have the SunJCE security provider installed properly?");
}
catch (Exception e) {
throw new NSForwardException(e);
}
}
COM: <s> creates an aes cipher for a given mode </s>
|
funcom_train/47768164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerWithCollector() {
logger.debug(" indirectly create endpoints by subscribing to message event");
RapidMessageCollector.instance().addRapidMessageListener(Examples.participantId,
Examples.agent,
MessageType.POSITION_SAMPLE_TYPE,
this);
RapidMessageCollector.instance().addRapidMessageListener(Examples.participantId,
Examples.agent,
MessageType.POSITION_CONFIG_TYPE,
this);
}
COM: <s> register this object with the message collector </s>
|
funcom_train/11745680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DbEntity findDbEntity(DataMap map, String caseInsensitiveName) {
// TODO: create a Map with upper case keys?
for (DbEntity e : map.getDbEntities()) {
if (e.getName().equalsIgnoreCase(caseInsensitiveName)) {
return e;
}
}
return null;
}
COM: <s> case insensitive search for a </s>
|
funcom_train/51792402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dataEvent(byte[] data) {
//show application if it was minimized into background
minimizeGame(false);
switch (data[0]) {
case Connection.DC_FINISH_GAME:
frameManager.setCurrentFrame(gameCanvas);
SavingScreen.autoSaveGame(this); //auto save the current game
finishGame();
break;
}
}
COM: <s> handle the another events from server </s>
|
funcom_train/32070735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDocumentGroup(DocumentGroup documentGroup) {
boolean addOk = getDocumentGroups().add(documentGroup);
if (addOk) {
documentGroup.setLabel((Label)this);
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed document group to the label collection </s>
|
funcom_train/3907951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChildren(Element parentElement, String childName) {
Iterator it = parentElement.getChildren(childName, parentElement.getNamespace()).iterator();
while(it.hasNext()) {
Element element = (Element)it.next();
LD_Component ldComponent = createComponent(element);
if(ldComponent != null) {
addChild(ldComponent);
}
}
}
COM: <s> add any given child elements </s>
|
funcom_train/18303393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragSetData(DragSourceEvent event) {
IStructuredSelection selection = (IStructuredSelection) viewer
.getSelection();
if (BSCWArtefactTransfer.getInstance().isSupportedType(event.dataType)) {
event.data = BSCWArtefactTransfer.toByteArray(selection);
}
// @@@GST PluginTransfer.getInstance().isSupportedType(event.dataType)
// allows to DND of BSCW object in the Eclipse Framework
// but this in not supported yet
}
COM: <s> method declared on drag source listener </s>
|
funcom_train/33609564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumRows(){
switch(layoutType.getValue()){
case LAYOUT_HLINE:
return 1;
case LAYOUT_VLINE:
return elements.size();
case LAYOUT_BOX:
default:
int nRows=(int)((getHeight()-2*padding+spacing)/(buttonSize+spacing));
return (nRows<1)?1:nRows;
}
}
COM: <s> returns number of rows </s>
|
funcom_train/11096734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Entry removeEntry(String id) throws IOException {
Entry result = null;
if (timeout > 0) {
evict();
}
try {
result = parseEntry(redisNode.get(id));
} catch (ClassNotFoundException e) {
throw new IOException("Could not load object from store", e);
}
redisNode.del(id);
return result;
}
COM: <s> removes an object with the specified id </s>
|
funcom_train/18605521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Query makeQuery(String objectType, String path) {
BooleanQuery booleanQuery = new BooleanQuery();
Query objectTypeQuery = new TermQuery(new Term("objectType.value", QueryParser.escape(objectType)));
Query nodeQuery = new RegexQuery(new Term("path", path));
booleanQuery.add(objectTypeQuery, BooleanClause.Occur.MUST);
booleanQuery.add(nodeQuery, BooleanClause.Occur.MUST);
return booleanQuery;
}
COM: <s> gets a lucene query using object type and classification node properties </s>
|
funcom_train/21325830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double EScafferF6NonCont(double[] x) {
double sum = 0.0;
double prevX, currX;
currX = myXRound(x[0]);
for (int i = 1 ; i < x.length ; i ++) {
prevX = currX;
currX = myXRound(x[i]);
sum += ScafferF6(prevX, currX);
}
prevX = currX;
currX = myXRound(x[0]);
sum += ScafferF6(prevX, currX);
return (sum);
}
COM: <s> non continuous expanded scaffers f6 function </s>
|
funcom_train/40451768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSuccessfulBuild(String user) {
if (this.userToSuccessMap.containsKey(user)) {
Integer count = this.userToSuccessMap.get(user) + 1;
this.userToSuccessMap.put(user, count);
}
else {
this.userToSuccessMap.put(user, 1);
}
this.members.add(user);
}
COM: <s> adds a successful build for a user </s>
|
funcom_train/20897237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClusterCollection buildClusterCollection() {
ClusterCollection collection = new ClusterCollection(1, // collection ID
1, // group ID
1, // criteria ID
1, // build number
"" // comment
);
collection.setClusters(buildClustersList());
return collection;
}
COM: <s> the code build cluster collection code method builds a cluster collection with id </s>
|
funcom_train/50505323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Element config){
Element relationManConfig = new Element("relationships");
config.addContent(relationManConfig);
Iterator iter = this.relationships.iterator();
while (iter.hasNext()) {
Relationship relation = (Relationship)iter.next();
Element relConfig = new Element("relationship");
relation.save(relConfig);
relationManConfig.addContent(relConfig);
}
}
COM: <s> saves the config from a jdom element saves the relations </s>
|
funcom_train/42864339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*
* private void accelerate() { if (_currSpeed.toMeters() <
* currentRoad().getMaxVelocity().toMeters() && _currSpeed.toMeters() <
* getMaxVelocity().toMeters()) {
* _currSpeed.setVal(getAcceleration().getVal() * _time); }
*
* }
COM: <s> todo calculate new speed </s>
|
funcom_train/36469803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionOnPenClick(Point p) {
tmpPt=displayToBase(p.x,p.y,tmpPt);
mThread thPen=new mThread(new Runnable() {
public void run() {
registerNewRefPoint(tmpPt);
}
});
thPen.start();
}
COM: <s> pen clickon the displayed image display a dialog form to register </s>
|
funcom_train/13519604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DoubleArrayList intArrayToDoubleArrayList(int[] intArray) {
int intSize = intArray.length;
double [] doubleArray = new double[intSize];
for (int i = 0; i<intSize; i++) {
doubleArray[i] = ((Integer)intArray[i]).doubleValue();
}
DoubleArrayList DoubleArrayListArray = new DoubleArrayList(doubleArray);
return DoubleArrayListArray;
}
COM: <s> format an int array into a double one </s>
|
funcom_train/25204157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFlags() {
if (rangeGaspBehavior == GASP_DOGRAY_GRIDFIT) {
return "Use grayscale rendering and gridfitting";
} else if (rangeGaspBehavior == GASP_DOGRAY) {
return "Use grayscale rendering";
} else if (rangeGaspBehavior == GASP_GRIDFIT) {
return "Use gridfitting";
} else if (rangeGaspBehavior == GASP_NONE) {
return "none";
}
return "???";
}
COM: <s> returns the flags as string </s>
|
funcom_train/34567746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean skipWS() throws QueryException {
final int p = qp;
while(more()) {
final int c = curr();
if(c == '(' && next() == ':') {
comment();
} else {
if(c <= 0 || c > ' ') return p != qp;
qp++;
}
}
return p != qp;
}
COM: <s> consumes all whitespace characters from the remaining query </s>
|
funcom_train/40451102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdObservacionesVisita() {
if (cmdObservacionesVisita == null) {//GEN-END:|117-getter|0|117-preInit
// write pre-init user code here
cmdObservacionesVisita = new Command("Agregar observaciones", Command.OK, 0);//GEN-LINE:|117-getter|1|117-postInit
// write post-init user code here
}//GEN-BEGIN:|117-getter|2|
return cmdObservacionesVisita;
}
COM: <s> returns an initiliazed instance of cmd observaciones visita component </s>
|
funcom_train/7629763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitInsn(int opcode) {
if (mIsInitMethod) {
switch (opcode) {
case Opcodes.RETURN:
case Opcodes.ARETURN:
case Opcodes.DRETURN:
case Opcodes.FRETURN:
case Opcodes.IRETURN:
case Opcodes.LRETURN:
// Pop the last word from the stack since invoke will generate its own return.
generatePop();
generateInvoke();
mMessageGenerated = true;
default:
mParentVisitor.visitInsn(opcode);
}
}
}
COM: <s> for non constructor rewrite existing return instructions to write the message </s>
|
funcom_train/35672085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertFileContainsAll(final File file, final String[] strings) {
try {
String content = FileUtils.readFileToString(file);
assertStringContainsAll(content, strings);
} catch (IOException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
COM: <s> checks that a file contains all character strings </s>
|
funcom_train/9851297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMainMessage(HtmlData[] html) {
int mainMessage = -1;
File bodyFile = new File(body);
for (int i = 0; i < html.length; i++) {
File testFile = new File(html[i].filename);
if (bodyFile.getName().equalsIgnoreCase(testFile.getName())) {
mainMessage = i;
break;
}
}
return mainMessage;
}
COM: <s> method responsible for checking if inside the annotated part is also body </s>
|
funcom_train/41078577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewObjectType(int newObjectType) {
if (this.newObjectType == newObjectType) return;
if (newObjectType == ReportElementType.NONE) {
this.setCursor( java.awt.Cursor.getDefaultCursor());
} else {
this.setCursor( java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.CROSSHAIR_CURSOR));
}
this.newObjectType = newObjectType;
}
COM: <s> setter for property new object type </s>
|
funcom_train/15470135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recoverFailureReport() {
logger.fatal("Current Identified Patient ID: " + ip.getUuid());
logger
.fatal("Current Identified Pathology Report ID: "
+ ipr.getUuid());
Transaction txPvt = sessionPvt.beginTransaction();
ipr.setDocumentText("ERROR");
sessionPvt.saveOrUpdate(ipr);
sessionPvt.flush();
txPvt.commit();
deid.unloadDeidLibrary();
iprs.clear();
iprs = sessionPvt.createCriteria(IdentifiedDocumentImpl.class)
.add(Expression.like("documentText", "PENDING")).setMaxResults(
BATCH_SIZE).list();
}
COM: <s> recover failure report </s>
|
funcom_train/15739838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findInsertionPoint(SortedListEntry entry) {
int insertionPoint = sortedModel.size();
if (sortOrder != SortOrder.UNORDERED) {
insertionPoint = Collections.binarySearch((List)sortedModel, entry);
if (insertionPoint < 0) {
insertionPoint = -(insertionPoint +1);
}
}
return insertionPoint;
}
COM: <s> internal helper method to find the insertion point for a new </s>
|
funcom_train/4013892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeValidationRule(ValidationRule validationRule){
if(validationRules == null)
return false;
boolean ret = validationRules.remove(validationRule);
if(dataNode != null){
QuestionDef questionDef = getQuestion(validationRule.getQuestionId());
if(questionDef != null){
Element node = questionDef.getBindNode() != null ? questionDef.getBindNode() : questionDef.getControlNode();
if(node != null){
node.removeAttribute(XformConstants.ATTRIBUTE_NAME_CONSTRAINT);
node.removeAttribute(XformConstants.ATTRIBUTE_NAME_CONSTRAINT_MESSAGE);
}
}
}
return ret;
}
COM: <s> removes a validation rule from the form </s>
|
funcom_train/17903922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEditorText(String s) {
try {
textComponent.setText(s);
} catch (OutOfMemoryError e) {
System.gc();
GUIUtilities.displayErrorMessage("Out of Memory.\nThe file is " +
"too large to\nopen for viewing.");
textComponent.setText(Constants.EMPTY);
return;
}
}
COM: <s> sets the text component text to that specified </s>
|
funcom_train/28308464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node createNode(ComponentConfiguration configuration) throws Exception {
Node node = (Node) Class.forName(configuration.getClassName()).newInstance();
node.init(configuration);
if (node instanceof Forwarder) {
forwarderManager.registerForwarder((Forwarder) node);
}
logger.debug("Created new instance of node " + node.getName() + " " + node.hashCode());
return node;
}
COM: <s> create an instance of a node based on the given configuration </s>
|
funcom_train/35322882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int awaitAdvance(int phase) {
final Phaser root = this.root;
long s = (root == this) ? state : reconcileState();
int p = (int)(s >>> PHASE_SHIFT);
if (phase < 0)
return phase;
if (p == phase)
return root.internalAwaitAdvance(phase, null);
return p;
}
COM: <s> awaits the phase of this phaser to advance from the given phase </s>
|
funcom_train/38288679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillLocalMenu(IMenuManager manager) {
manager.add(this.attributeSwitcher);
manager.add(this.cdataSwitcher);
manager.add(this.commentSwitcher);
manager.add(this.prociSwitcher);
manager.add(this.textNodeSwitcher);
// manager.add(sourceSwitcher);
}
COM: <s> fills menu shown after click on arrow in right upper corner </s>
|
funcom_train/39534109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color showColorChooserDialog(Color initialColor) {
setColor(initialColor);
SVGColorTracker ok = new SVGColorTracker(this);
JDialog dialog=createDialog(Editor.getParent(), "", true, this, ok, null);
dialog.setVisible(true);
return ok.getColor();
}
COM: <s> shows a color chooser dialog </s>
|
funcom_train/45251453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void availableWorkingSetsChanged() {
boolean enable = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets().length > 0;
if (!(selectAllButton == null || selectAllButton.isDisposed())){
selectAllButton.setEnabled(enable);
}
if (!(deselectAllButton == null || deselectAllButton.isDisposed())){
deselectAllButton.setEnabled(enable);
}
}
COM: <s> notifies the dialog that there has been a change to the sets available </s>
|
funcom_train/37190230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropSchema(String databaseName, String schemaName, Vector schemaList) throws SQLException {
final java.sql.Statement statement = (java.sql.Statement)(serverAccess.runStatement(ServerAccess.STATEMENT_EXECUTE, "DROP SCHEMA "+schemaName));
serverAccess.getSchemaHashMap().remove(schemaName);
if(statement != null) {
final Connection connection = statement.getConnection();
statement.close();
if(!connection.getAutoCommit()) connection.commit();
}
}
COM: <s> drops a schema from the server </s>
|
funcom_train/2883667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void asyncDeactivatePart() {
if( !running ) {
return;
}
try {
register.sfUnloadAll();
} catch (RemoteException e) {
if( sfLog().isDebugEnabled() ) {
sfLog().debug("Activator: Unexpected remote exception in asyncDeactivatePart()");
}
}
}
COM: <s> this method unloads components </s>
|
funcom_train/5774453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPopupMenu getResPopup() {
if (resPopup == null) {
resPopup = new JPopupMenu();
resPopup.add(getResAdd());
resPopup.add(getResDel());
resPopup.add(getResEdit());
resPopup.add(getResExtract());
}
return resPopup;
}
COM: <s> this method initializes res popup </s>
|
funcom_train/33280866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlForm getFormByName(final String name) throws ElementNotFoundException {
final List<HtmlForm> forms = getDocumentElement().getElementsByAttribute("form", "name", name);
if (forms.size() == 0) {
throw new ElementNotFoundException("form", "name", name);
}
return forms.get(0);
}
COM: <s> returns the first form that matches the specified name </s>
|
funcom_train/18660668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetHighresFilename() {
PictureInfo pi = new PictureInfo();
pi.setHighresLocation( "file:///dir/picture.jpg" );
String filename = pi.getHighresFilename();
assertEquals( "Testing that the filename can be derived from the Highres Location correctly", filename, "picture.jpg" );
}
COM: <s> test of get highres filename method of class picture info </s>
|
funcom_train/36534431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getParkID(String mapName, int number) {
int id = 0;
try {
String selectStatement = "SELECT pid FROM carpark WHERE ParkNum=? AND MapID=?;";
PreparedStatement pstmt = con.prepareStatement(selectStatement);
pstmt.setInt(1, number);
pstmt.setInt(2, mdb.getMapID(mapName));
ResultSet result = pstmt.executeQuery();
while (result.next()) {
id = result.getInt(1);
}
result.close();
pstmt.close();
} catch(SQLException sqle) {
System.out.println(sqle);
}
return id;
}
COM: <s> gets the database assigned park id </s>
|
funcom_train/30157713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEarnedPoints(int earned) {
int current = getEarnedPoints();
if (current != earned) {
Integer value = new Integer(earned);
postUndoEdit(MSG_EARNED_POINTS_UNDO, ID_EARNED_POINTS, new Integer(current), value);
mTotalPoints = earned + getSpentPoints();
startNotify();
notify(ID_EARNED_POINTS, value);
notify(ID_TOTAL_POINTS, new Integer(getTotalPoints()));
endNotify();
}
}
COM: <s> sets the earned character points </s>
|
funcom_train/21688698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initSnippetService() {
try {
HessianProxyFactory factory = new HessianProxyFactory();
snippetService = (SnippetService) factory.create(SnippetService.class, MvnSnippetSearchAgent.serviceUrl, this.getClass().getClassLoader());
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> create snippet service proxy </s>
|
funcom_train/47373624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getFitness(){
double result = (double)_totalScore / ((double)_gamesPlayed * (double)Constants.ONE_ROUND_SCORE_REWARD);
if (result < 1.0) {
return result;
} else {
return 1.0 - (Constants.PENALTY_FOR_NOT_NICE*(result -1.0));
}
}
COM: <s> calculates the strategy fitness </s>
|
funcom_train/40412065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeRemove(T f) {
String dataSourceId = f.getDataSourceId();
if (dataSourceId != null) {
DataProviderObject dataSourceProvider = map.get(dataSourceId);
if (dataSourceProvider != null) {
f.setSingleDto(dataSourceProvider.removeData(f));
}
}
}
COM: <s> performs a data remove operation </s>
|
funcom_train/20741968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedTransitionTitle() {
if (newTaskBean.getSelectedTransition() == null) {
return null;
} else {
for (SelectItem selectItem : newTaskBean.getTransitionSelectItems()) {
if (newTaskBean.getSelectedTransition().equals(selectItem.getValue())) {
return selectItem.getLabel();
}
}
}
return null;
}
COM: <s> calling get label from selected transition may produce lazy initialization error </s>
|
funcom_train/11734765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNodeType(String name) throws RepositoryException {
try {
Name qname = context.getQName(name);
return getNodeTypeRegistry().isRegistered(qname);
} catch (NamespaceException e) {
return false;
} catch (NameException e) {
throw new RepositoryException("Invalid name: " + name, e);
}
}
COM: <s> checks whether a node type with the given name exists </s>
|
funcom_train/21025518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void extractSuggestedSubjects() throws MetadataExtractionException {
List<String> sugSubjects = subjectExtractor.extractSuggestedSubjects(rdf.getString(NIE.plainTextContent));
Iterator<String> iter = sugSubjects.iterator();
while (iter.hasNext()) {
mdDTO.addSubject(iter.next());
}
}
COM: <s> extract suggested subjects </s>
|
funcom_train/16454332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void intervalAdded(ListDataEvent e) {
int startIdx = e.getIndex0();
int endIdx = e.getIndex1() + 1;
for(int idx = startIdx; idx < endIdx; idx++) {
this.add(model.getElementAt(idx), idx);
}
}
COM: <s> sent after the indices in the index0 index1 </s>
|
funcom_train/50139888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean shouldHide(String fileName){
String thirdPart = null;
String[] partsIsParts = fileName.split("\\.");
try{
thirdPart = partsIsParts[partsIsParts.length - 1];
thirdPart = "." + thirdPart;
}catch(NullPointerException npe){
return false;
//this is fine, just means no extension so we don't put it in.
}
if(hiddenFileTypes.get(thirdPart) == null){
return false;
}
return true;
}
COM: <s> check to see if file type should be displayed in the file explorer </s>
|
funcom_train/3102346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeControls() {
Iterator<Control> iterator= fCheckBoxes.keySet().iterator();
while (iterator.hasNext()) {
final Button button= (Button) iterator.next();
button.setSelection(fPreferenceStore.getBoolean(fCheckBoxes.get(button)));
}
iterator= fTextFields.keySet().iterator();
while (iterator.hasNext()) {
final Text text= (Text) iterator.next();
text.setText(fPreferenceStore.getString(fTextFields.get(text)));
}
}
COM: <s> initializes the controls of this preference page </s>
|
funcom_train/46857335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void SelectedElementChanged() {
if (cmbElements.getSelectedIndex() != -1) {
// Instruct the current layer to apply the new selection
currentLayer.SelectElement((ProjectElement)cmbElements.getSelectedItem());
// Refresh the map display
mapDisplay.Refresh();
// Show the properties for the selected element
ShowElementProperties((ProjectElement) cmbElements.getSelectedItem());
//Enable the center button
btnCenterOnSelectedElement.setEnabled(true);
}
else{
//Disable the center button
btnCenterOnSelectedElement.setEnabled(false);
}
}
COM: <s> handler for the selection changed event of the combobox </s>
|
funcom_train/45248177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldTaxaF84() {
if (jNumberFloatFieldTaxaF84 == null) {
jNumberFloatFieldTaxaF84 = new JNumberFloatField();
jNumberFloatFieldTaxaF84.setLocation(new Point(345, 216));
jNumberFloatFieldTaxaF84.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldTaxaF84;
}
COM: <s> this method initializes j number float field taxa f84 </s>
|
funcom_train/20240449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdOKListUsuario() {
if (cmdOKListUsuario == null) {//GEN-END:|178-getter|0|178-preInit
// write pre-init user code here
cmdOKListUsuario = new Command("Ok", Command.OK, 0);//GEN-LINE:|178-getter|1|178-postInit
// write post-init user code here
}//GEN-BEGIN:|178-getter|2|
return cmdOKListUsuario;
}
COM: <s> returns an initiliazed instance of cmd oklist usuario component </s>
|
funcom_train/15615679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getCardList(Element element) {
List compatibles = new ArrayList();
NodeList nl = element.getElementsByTagName("Card"); //$NON-NLS-1$
if (nl != null && nl.getLength() > 0) {
for (int i = 0; i < nl.getLength(); i++) {
Element el = (Element) nl.item(i);
Card card = getCard(el);
compatibles.add(card);
}
}
return compatibles;
}
COM: <s> get vendor compatibility list </s>
|
funcom_train/7641042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseTime(String line, int startPos) {
String timeString = line.substring(startPos);
try {
float timeSeconds = Float.parseFloat(timeString);
mTestTime = (long) (timeSeconds * 1000);
} catch (NumberFormatException e) {
Log.e(LOG_TAG, "Unexpected time format " + timeString);
}
}
COM: <s> parses out and store the elapsed time </s>
|
funcom_train/43827872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParameterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ParameterAssignment_parameter_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ParameterAssignment_parameter_feature", "_UI_ParameterAssignment_type"),
ModelPackage.Literals.PARAMETER_ASSIGNMENT__PARAMETER,
true,
false,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the parameter feature </s>
|
funcom_train/3155977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkMinMax(GeoPos pos) {
if (pos.lat > _latMax) {
_latMax = pos.lat;
}
if (pos.lat < _latMin) {
_latMin = pos.lat;
}
if (pos.lon > _lonMax) {
_lonMax = pos.lon;
}
if (pos.lon < _lonMin) {
_lonMin = pos.lon;
}
}
COM: <s> checks the geopos passes in agains the member fields </s>
|
funcom_train/33606035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TemperleyLiebTerm setToPermutation(Permutation p){
initPuts(p.getN());
g.clear();
for(int i=1;i<=p.getN();i++){addEdge(i,2*p.getN()+1-p.get(i));}
return this;
}
COM: <s> returns a tl element corresponding to a given permutation </s>
|
funcom_train/3403828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse( Element e, ContentHandler handler ) throws SAXException {
// it might be better to set receiver at the constructor.
receiver = handler;
setCurrentLocation( e );
receiver.startDocument();
receiver.setDocumentLocator(locator);
visit(e);
setCurrentLocation( e );
receiver.endDocument();
}
COM: <s> parses a subtree starting from the element e and </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.