__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/19636582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPredicate() {
Iterator iter = Collections.singleton(null).iterator();
FilterIterator filterIterator = new FilterIterator(iter);
filterIterator.setPredicate(TruePredicate.getInstance());
// this predicate matches
assertEquals(true, filterIterator.hasNext());
// this predicate doesn't match
filterIterator.setPredicate(NotNullPredicate.getInstance());
assertEquals(false, filterIterator.hasNext());
}
COM: <s> test that when the predicate is changed the has next method returns the </s>
|
funcom_train/49320982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(final String s) {
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
setText(s);
}
});
return;
}
textField.setText(s);
textField.setCaretPosition(0);
textField.setScrollOffset(0);
}
COM: <s> set the text to display short cut for get text field </s>
|
funcom_train/37831798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfRepetitions(final String name, final int index) {
if (!player.hasQuest(name)) {
logger.error(player.getName() + " does not have quest " + name);
return 0;
}
String questState = player.getQuest(name, index);
return MathHelper.parseIntDefault(questState, 0);
}
COM: <s> gets the number of repetitions in a substate of quest slot </s>
|
funcom_train/34356579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateConsistency() throws ValidationException {
try {
ontModel.prepare();
PelletInfGraph pellet = (PelletInfGraph) ontModel.getGraph();
// try to query the underlying ontModel to check inconsistency
if (!pellet.isConsistent()) {
// if the check succeeds, we have inconsistency
throw new ValidationException("The document is inconsistent (owl:Thing rdfs:subClassOf owl:Nothing)");
}
}
catch (InconsistentOntologyException e) {
handleInconsistentOntologyException(e);
}
}
COM: <s> verifies the consistency of the underlying ontologies together </s>
|
funcom_train/26414339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean requestApplies(AttributeValue root) {
// make sure the resource-id is a URI
if (! root.getType().toString().equals(AnyURIAttribute.identifier))
return false;
// make sure that the root is urn:root
if (! ((AnyURIAttribute)root).getValue().toString().equals("urn:root"))
return false;
return true;
}
COM: <s> private helper method that checks if the given resource is the root </s>
|
funcom_train/32891289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remSignconfig(Sign[] conf) throws InfraException {
if (conf == null) throw new InfraException("Parameter conf is null");
int i = Arrayutils.findElement(signconfigs, conf);
if (i == -1) throw new InfraException("Sign configuration is not in the list");
signconfigs = (Sign[][])Arrayutils.remElement(signconfigs, i);
}
COM: <s> removes a sign configuration </s>
|
funcom_train/4461965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateDisplay() {
sortedColumns = currentDisplayMode.getAdditionalColumns();
sortedCharsets = currentDisplayMode.getSortedColumns(dataStore.getColumns());
sortedColumns.addAll(sortedCharsets);
sortedSequences = currentDisplayMode.getSortedSequences(dataStore.getSequences());
Hashtable widths = currentDisplayMode.saveWidths();
currentDisplayMode.updateDisplay();
currentDisplayMode.restoreWidths(widths);
resizeColumns();
updateStatusBar();
}
COM: <s> update display calls on current display mode to do its duty </s>
|
funcom_train/50167685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected OntologyContextField getOntologyContextField(String fieldName) {
int numberOfContextFields = ontologyContextFields.size();
for ( int i = 0; i < numberOfContextFields; i++) {
OntologyContextField currentOntologyContextField
= (OntologyContextField) ontologyContextFields.get(i);
String currentFieldName
= currentOntologyContextField.getFieldName();
if ( fieldName.equals(currentFieldName) == true) {
return currentOntologyContextField;
} //end if ()
} // end for ()
return null;
}
COM: <s> returns the first instance of field name found </s>
|
funcom_train/23240260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
flag = false;
if (addr == hub.cogGetPC(currentCog)) {
runThread = null;
return;
}
do {
flag = hub.runTo(currentCog, addr, 100000);
updateAsmView();
updateRegView();
memdumpATM.fireTableDataChanged();
} while (!flag && !end);
runThread = null;
}
COM: <s> runs the code </s>
|
funcom_train/8095223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getMultiInstanceCapabilities() {
Capabilities result = new Capabilities(this);
// attributes
result.enableAllAttributes();
result.disable(Capability.RELATIONAL_ATTRIBUTES);
result.enable(Capability.MISSING_VALUES);
// class
result.enableAllClasses();
result.enable(Capability.MISSING_CLASS_VALUES);
result.enable(Capability.NO_CLASS);
// other
result.setMinimumNumberInstances(0);
return result;
}
COM: <s> returns the capabilities of this multi instance filter for the </s>
|
funcom_train/1752716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseLinks() {
String fileName = getClass().getResource("/responses/dwc14/dwc14_links.gz").getFile();
RawOccurrenceRecord ror = setupRor(fileName).get(0);
// showLinks(ror);
assertEquals(0, ror.getLinkRecords().size());
}
COM: <s> todo find test record with links </s>
|
funcom_train/19541463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintFarHorizontalBorder(Graphics2D g, int xOff, int yOff, int gridSize, Quadrant q) {
int x = vertex.x + getXMult(q) * xOff;
int y = vertex.y + getYMult(q) * yOff + getYMult(q) * gridSize;
Line2D l = new Line2D.Double(x, y, x + getXMult(q) * gridSize, y);
g.draw(l);
}
COM: <s> paint the far horizontal line of a cells border </s>
|
funcom_train/22951043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void normalizeWeights(double[] weights) {
double sum=0;
for(int i=0;i<weights.length;i++) {
sum += weights[i];
}
for(int i=0;i<weights.length;i++) {
weights[i] = weights[i]/sum;
}
}
COM: <s> normalizes input array of weights </s>
|
funcom_train/12119723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC86(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.uscitaJMenuItem_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c86 uscita jmenu item </s>
|
funcom_train/3883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String replaceQuotes(String str) {
if (str == null) {
return "";
}
StringBuffer buf = new StringBuffer();
for (int i = 0; i < str.length(); i++) {
if (str.charAt(i) == QUOTE)
buf.append(QUOTE_ENTITY);
else
buf.append(str.charAt(i));
}
return buf.toString();
}
COM: <s> replace quotes in the string </s>
|
funcom_train/19317805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doStart() throws Exception {
// set logger, user jfox logger
Log.instance().disableLog(); // remove default logger
Log.instance().add(logSink);
logSink.start();
Thread thread = new Thread(this);
thread.setName(getName());
thread.start();
thread.join();
}
COM: <s> because jetty use thread context classloader </s>
|
funcom_train/29063107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(new DescriptionPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_AdviceType_description_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_AdviceType_description_feature",
"_UI_AdviceType_type"), AspectxPackage.eINSTANCE
.getAdviceType_Description(), true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the description feature </s>
|
funcom_train/1301493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(LogInfo other) {
int result = this.timeMillis > other.timeMillis ? -1 : this.timeMillis < other.timeMillis ? 1 : 0;
if (result == 0) {
result = (this.nodeNum - other.nodeNum);
if (result == 0) {
if (this.isErrLog != other.isErrLog) {
result = this.isErrLog ? 1 : -1;
}
}
}
return result;
}
COM: <s> sorts in reverse timestamp order in node num order with </s>
|
funcom_train/1786485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String arrayToString(String[] array, String terminator) {
StringBuilder outputString = new StringBuilder();
outputString.append("");
for (String element : array) {
outputString.append(element);
outputString.append(terminator);
}
return outputString.toString();
}
COM: <s> converts string array into a readable string </s>
|
funcom_train/20262265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult executeQuery(String strSOQLStmt,Integer queryBatchSize) throws UnexpectedErrorFault, InvalidIdFault, LoginFault, RemoteException,Exception {
checkLogin();
setBatchSizeHeader(queryBatchSize ==null ? querySize : queryBatchSize);
return binding.query(strSOQLStmt, sh, queryOptions, null, null);
}
COM: <s> this method queries the database and returns the results </s>
|
funcom_train/3842098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt (int row, int column) {
System.out.println ("row "+row+" col "+column+" resultList "+resultList.size());
Object [] resultRow = (Object [])resultList.get(row);
if (resultRow == null) {
return (null);
}
if (resultRow.length < column) {
return (null);
}
return (resultRow[column]);
}
COM: <s> get the value in a specific cell </s>
|
funcom_train/51418498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProjectDependenciesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProjectNode_projectDependencies_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProjectNode_projectDependencies_feature", "_UI_ProjectNode_type"),
JetsetPackage.Literals.PROJECT_NODE__PROJECT_DEPENDENCIES,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the project dependencies feature </s>
|
funcom_train/35301483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBaseline(JComponent c, int width, int height) {
int baseline;
if (MetalLookAndFeel.usingOcean() && height >= 4) {
height -= 4;
baseline = super.getBaseline(c, width, height);
if (baseline >= 0) {
baseline += 2;
}
}
else {
baseline = super.getBaseline(c, width, height);
}
return baseline;
}
COM: <s> returns the baseline </s>
|
funcom_train/1665953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installListeners() {
if (window != null) {
windowListener = createWindowListener();
window.addWindowListener(windowListener);
propertyChangeListener = createWindowPropertyChangeListener();
window.addPropertyChangeListener(propertyChangeListener);
windowMoveListener = new WindowMoveListener();
window.addComponentListener(windowMoveListener);
}
}
COM: <s> installs the necessary listeners </s>
|
funcom_train/39527673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer();
result.append(href).append(":").append(description).append(":").append(extended).append(":").append(hash).append(":")
.append(tag).append(":").append(time).append(":").append(shared).append(":").append(others);
return result.toString();
}
COM: <s> object as href description extended hash tag time string </s>
|
funcom_train/50776936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNodeSibling(BackendTreeNode anotherNode) {
boolean retval;
if (anotherNode == null) {
retval = false;
} else if (anotherNode == this) {
retval = true;
} else {
BackendTreeNode myParent = getParent();
retval = (myParent != null && myParent == anotherNode.getParent());
if (retval
&& !((BackendTreeNode) getParent()).isNodeChild(anotherNode)) {
throw new Error("sibling has different parent");
}
}
return retval;
}
COM: <s> returns true if code another node code is a sibling of has the </s>
|
funcom_train/22189958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void UpdateStatus(String message) {
if(message != null){
ErrorMessage.setBackground(ColorConstants.WHITE);
ErrorMessage.setText(message);
ok_b.setEnabled(false);
return;
}
ErrorMessage.setBackground(formColor);
ErrorMessage.setText("");
if(Name_t.getText().trim().length() > 0 && Summay_t.getText().trim().length() >0)
ok_b.setEnabled(true);
else
ok_b.setEnabled(false);
}
COM: <s> updates the errormessage on the dialog </s>
|
funcom_train/37021702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getActiveTools(){
System.out.println("entering activetools");
if(entityList.isEmpty() == true)
return new Vector();
Enumeration enum = entityList.elements();
Vector v = new Vector();
System.out.println("Adding elements");
while(enum.hasMoreElements() == true) {
v.add(enum.nextElement());
}
System.out.println("activetools - done");
return v;
}
COM: <s> returns a list with the currently active tools for the currently active workspace </s>
|
funcom_train/32040896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TimeLimitType_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TimeLimitType_value_feature", "_UI_TimeLimitType_type"),
ImsldPackage.eINSTANCE.getTimeLimitType_Value(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/27849436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStat(){
int curHP = myStat + myAdj + mySubdual + myTemporary + myCon.getModifier() * myLevel.getStat();
if(curHP > (getBaseHP() + myTemporary)) return (getBaseHP() + myTemporary);
else return curHP;
}
COM: <s> current adjusted hit point value </s>
|
funcom_train/11515584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsValue(final Object value) {
for (int i = 0; i < buckets.length; i++) {
synchronized (locks[i]) {
Node<K, V> n = buckets[i];
while (n != null) {
if (n.value == value || (n.value != null && n.value.equals(value))) {
return true;
}
n = n.next;
}
}
}
return false;
}
COM: <s> checks if the map contains the specified value </s>
|
funcom_train/13275140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setArcExtentInDegrees(Float arcExtentInDegrees) {
if (arcExtentInDegrees != this.arcExtentInDegrees) {
Float oldArcExtent = this.arcExtentInDegrees;
this.arcExtentInDegrees = arcExtentInDegrees;
this.propertyChangeSupport.firePropertyChange(Property.ARC_EXTENT_IN_DEGREES.name(), oldArcExtent, arcExtentInDegrees);
}
}
COM: <s> sets the edited arc extent </s>
|
funcom_train/25394568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNormal(final double aX, final double aY, final double aZ) {
if (normal == null) {
normal = new JVector3d(aX, aY, aZ);
} else {
normal.set(aX, aY, aZ);
}
}
COM: <s> set normal vector of vertex by passing its x y and z components </s>
|
funcom_train/14141140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processMessage( Object message ) throws Exception {
// If the log appender has been shut down or is in the middle of shutting down,
// do not try to log any more records, or the client will probably deadlock.
// if( ! LogAppender.isShutdown() ) { XXX TODO Uncomment this later when we finish the capsela port
LogRecordI logRecord = (LogRecordI) message;
NexusLog.log( logRecord );
// }//if
}//processMessage()
COM: <s> logs all messages received as long as the log appender has not been </s>
|
funcom_train/48622446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FolderInfo createFolder(FileDatabase fileDatabase, String uniqueName) throws LocationAlreadyExistsException {
DefaultFileDatabase defaultFileDatabase = (DefaultFileDatabase)fileDatabase;
TreeFolderInfo folderInfo = defaultFileDatabase.createRootFolder(uniqueName, uniqueName);
folderInfo.setDisplayName(uniqueName);
treeFolderInfoDAO.makePersistent(folderInfo);
return folderInfo;
}
COM: <s> create a folder with the specified unique name </s>
|
funcom_train/34641076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object instantiateParser(Object scanner) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException{
Object o = null;
for (Constructor<?> c : fParserConstructors) {
Class<?>[] parameters = c.getParameterTypes();
if (parameters.length == 1
&& parameters[0].equals(scanner.getClass())) {
o = c.newInstance(scanner);
}
}
return o;
}
COM: <s> use java reflection to instantiate a new parser </s>
|
funcom_train/44284756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDeviceName() {
String di = "";
try {
di = MidiUtil.getOutputName(getPort());
} catch (Exception ex) {}
return getManufacturerName() + " " + getModelName() // [email protected]
+ " <" + getSynthName() + "> - MIDI Out Port: "
+ ((di == "") ? "None" : di)
+ " - MIDI Channel: " + getChannel();
}
COM: <s> getter for device name </s>
|
funcom_train/26019104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readProxyAuthenticateHeader(SipResponse response) {
ProxyAuthenticateHeader header = (ProxyAuthenticateHeader)response.getHeader(ProxyAuthenticateHeader.NAME);
if (header != null) {
// Get domain name
digest.setRealm(header.getRealm());
// Get qop
digest.setQop(header.getQop());
// New nonce to be used
digest.setNextnonce(header.getNonce());
}
}
COM: <s> read parameters of the proxy authenticate header </s>
|
funcom_train/14093078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDragEventData2() {
m_event1 = new DragEventData(this, SRC1, DST1);
validate(m_event1, this, SRC1, DST1, DEFAULT_SLEEPTIME);
m_event2 = new DragEventData(this, SRC2, DST2);
validate(m_event2, this, SRC2, DST2, DEFAULT_SLEEPTIME);
}
COM: <s> test constructor 2 </s>
|
funcom_train/24221274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewPartner(Partner partner) {
partner.setDBId(this.uniquePartnerIdCounter);
this.uniquePartnerIdCounter--;
SortableTreeNode node = new SortableTreeNode(partner);
this.root.add(node);
((DefaultTreeModel) this.getModel()).nodeStructureChanged(this.root);
this.setSelectionPath(new TreePath(node.getPath()));
}
COM: <s> creates a new partner adds it to the tree and selects it </s>
|
funcom_train/33142439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getHostTextField() {
if (hostTextField == null) {
hostTextField = new JTextField();
hostTextField.setBounds(new java.awt.Rectangle(64, 32, 297, 19));
validator.newNonEmpty(hostTextField);
}
return hostTextField;
}
COM: <s> this method initializes host text field </s>
|
funcom_train/17847900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void firePluginLoaded(PluginProxy plugin) {
synchronized (mPluginStateListenerList) {
for (PluginStateListener listener : mPluginStateListenerList) {
try {
listener.pluginLoaded(plugin);
} catch (Throwable thr) {
mLog.log(Level.WARNING, "Fireing event 'plugin loaded' failed", thr);
}
}
}
}
COM: <s> tells all registered plugin state listeners that a plugin was deactivated </s>
|
funcom_train/15527592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCacheDir(File cachedir) {
cacheRootDir_ = cachedir.toString();
// update depending cacheDirs
previewCacheDir_ = cacheRootDir_ + File.separator
+ PREVIEW_CACHE_DIRNAME;
sampleCacheDir_ = cacheRootDir_ + File.separator + SAMPLE_CACHE_DIRNAME;
xmlCacheDir_ = cacheRootDir_ + File.separator + XML_CACHE_DIRNAME;
}
COM: <s> sets the cache dir wehere all files are stored downloaded </s>
|
funcom_train/11739057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFile(File file) {
file = file.getAbsoluteFile();
if (pathFiles.contains(file)) {
return;
}
if (classLoader != null) {
try {
classLoader.addURL(file.toURI().toURL());
}
catch (MalformedURLException ex) {
return;
}
}
pathFiles.add(file);
}
COM: <s> adds a new location to the list of configured locations </s>
|
funcom_train/4521128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Usuario entity) {
LogUtil.log("deleting Usuario instance", Level.INFO, null);
try {
entity = entityManager.getReference(Usuario.class, entity
.getUsuario());
entityManager.remove(entity);
LogUtil.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent usuario entity </s>
|
funcom_train/18024227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkGlue(Attributes attributes) throws SAXException {
String direction = attributes.getValue("direction");
if (!(direction.equals("horizontal") || direction.equals("vertical")))
errorInternal("The direction attribute of a glue element must be either 'horizontal' or 'vertical'");
}
COM: <s> checks the attribute values for a glue element </s>
|
funcom_train/31356443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(int parameterIndex,java.sql.Date x) throws SQLException {
if(Trace.TRACE) Trace.trace();
if(x==null) {
setNull(parameterIndex);
} else {
setParameter(parameterIndex,"'"+x.toString()+"'");
}
}
COM: <s> sets the designated parameter to a java </s>
|
funcom_train/22346993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public void purgeEntry (long req) {
// find entry
int found = locateRequest(req);
// When not here
if (found == 0) {
// can't do
return;
} // endif
// find the proper list
if (!locate(found)) {
// get out
return;
} // endif
// purge the sucker
current.details[loc].purgeEntry(found);
} // end-method
COM: <s> call the detail purge entry method </s>
|
funcom_train/16818483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMethodDesc() {
String s = Modifier.toString(m.getModifiers());
if (m instanceof Method) {
TypeDecomposer td = new TypeDecomposer(((Method)m).getReturnType());
s = s + " " + td.getName();
}
s = s + " " + m.getName();
return s;
}
COM: <s> return a string describing the method the methods modifiers </s>
|
funcom_train/5341307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String titleOf(ResultPanel rp) {
int current = rp.filteredSources();
int total = rp.totalSources();
if(current < total)
return rp.getTitle() + " (" + current + "/" + total + ")";
else
return rp.getTitle() + " (" + total + ")";
}
COM: <s> returns the title of the specified result panel </s>
|
funcom_train/36003280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Serializable receiveAMessage(final String correlationID) throws JMSException {
QueueReceiver receiver = _Session.createReceiver(_ResponseQueue,
"JMSCorrelationID = '" + correlationID + "'");
ObjectMessage tm = (ObjectMessage) receiver.receive(10000);
receiver.close();
return tm.getObject();
}
COM: <s> receive a message correlated with a correlation id </s>
|
funcom_train/443220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStrings(String[] strings) {
String[] selected = getSelectedStrings();
int old_size = _string_list.size();
_string_list.clear();
_string_list.addAll(Arrays.asList(strings));
setSelectedStrings(selected);
int new_size = _string_list.size();
fireTableRowsUpdated(0, new_size);
if (old_size > new_size) {
fireTableRowsDeleted(new_size, old_size - 1);
} else if (old_size < new_size) {
fireTableRowsInserted(old_size, new_size - 1);
}
}
COM: <s> set the list of available strings </s>
|
funcom_train/3362099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone () {
if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
MODELMBEAN_LOGGER.logp(Level.FINER,
ModelMBeanNotificationInfo.class.getName(),
"clone()", "Entry");
}
return(new ModelMBeanNotificationInfo(this));
}
COM: <s> creates and returns a new model mbean notification info which is a </s>
|
funcom_train/50445276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() {
fileName = "Dateiname";
ba = new byte[4096];
pic = new PictureImpl(fileName,ba);
fileName2 = "Dateiname2";
ba2 = new byte[8192];
pic2 = new PictureImpl(fileName2,ba2);
pic3 = new PictureImpl(null,null);
pic4 = new PictureImpl(null,null);
}
COM: <s> sets up the test environment for this test </s>
|
funcom_train/43917181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append((null == fEncoding) ? "[NULL]" : fEncoding);
if (null != fIsBigEndian) {
sb.append((fIsBigEndian.booleanValue()) ? " BIG ENDIAN" : " LITTLE ENDIAN");
}
if (fHasBOM) {
sb.append(" with BOM");
}
return sb.toString();
}
COM: <s> returns current state of this instance in human readable form </s>
|
funcom_train/25291442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getReflectionCoefficient() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes21"));
return ((AuralAttributesRetained)this.retained).getReflectionCoefficient();
}
COM: <s> retrieve reflective coefficient </s>
|
funcom_train/3394045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendDouble(double x) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream(8);
DataOutputStream bufout = new DataOutputStream(buffer);
try {
bufout.writeDouble(x);
appendBytes(buffer.toByteArray(), 0, 8);
} catch (IOException e) {
throw new AssertionError("write");
}
}
COM: <s> append a double as a eight byte number </s>
|
funcom_train/22404651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean needToRecheck(boolean checkSubtypes, boolean inManualContext) {
assert (state == SerializableTypeOracleBuilder.CHECK_SUCCEEDED);
if (!qualifiesForSerialization() && !inManualContext
&& getCheckedInManualContext()) {
return true;
}
if (checkSubtypes && !getCheckedSubtypes()) {
return true;
}
return false;
}
COM: <s> returns code true code if this type needs to be rechecked </s>
|
funcom_train/3291301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getFieldNames() {
Vector results=new Vector();
FieldDefs node;
for (Enumeration e=fields.elements();e.hasMoreElements();) {
node=(FieldDefs)e.nextElement();
results.addElement(node.getDBName());
}
return results;
}
COM: <s> return a list of field names of this table </s>
|
funcom_train/45383397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getToolBarTop() {
if (toolBarTop == null) {
toolBarTop = new JToolBar();
toolBarTop.add(getBtnOpen());
toolBarTop.add(getBtnSave());
toolBarTop.addSeparator();
toolBarTop.add(getBtnImport());
toolBarTop.add(getBtnExport());
toolBarTop.addSeparator();
toolBarTop.add(getPanelActions());
}
return toolBarTop;
}
COM: <s> this method initializes tool bar top </s>
|
funcom_train/6484920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() {
this.platform.removeAgent(this);
this.group.removeAgent(this);
// break any assignment to a provider
this.breakAssignment();
// break the assignment between this and any processors
// the breakAssignment() method will call removeProcessor on this
// agent, so no need to do it here.
for (Agent a : this.processors) {
a.breakAssignment();
}
}
COM: <s> remove this agent from the system </s>
|
funcom_train/40622573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWidget(int row, int column, Widget widget) {
prepareCell(row, column);
if (widget != null) {
widget.removeFromParent();
// Removes any existing widget.
Element td = cleanCell(row, column, true);
DOM.setInnerHTML(td, "");
// Logical attach.
widgetMap.putWidget(widget);
// Physical attach.
DOM.appendChild(td, widget.getElement());
adopt(widget);
}
}
COM: <s> sets the widget within the specified cell </s>
|
funcom_train/9955990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(String description, Executable executable) throws Exception {
this.executable = executable;
this.description = description;
exception = null;
stackTrace = null;
if (owner == null)
GuiUtil.centerOnScreen(this);
else
GuiUtil.center(this, owner);
setVisible(true);
if (exception != null)
throw exception;
}
COM: <s> runs the executable and displays the busy dialog </s>
|
funcom_train/43915452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleKeywordList(List keywords) {
start("KeywordList");
if (keywords != null) {
for (Iterator it = keywords.iterator(); it.hasNext();) {
element("Keyword", String.valueOf(it.next()));
}
}
end("KeywordList");
}
COM: <s> turns the keyword list to xml </s>
|
funcom_train/41509271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() throws ClientException {
// check whether localPath is a working copy or not
try {
cleanup();
client.status(localPath, false, false, true);
} catch (ClientException e) {
// no working copy, checkout
initialCheckout();
return;
}
client.update(localPath, Revision.HEAD, true);
}
COM: <s> updates the working copy at local path or performs a new checkout from </s>
|
funcom_train/13364099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void error(SAXParseException ex) throws SAXException {
String msg = "SAXParserException ERROR: "
+ formatSAXParserExceptionMessage(ex);
m_log.warn("DocumentProcessor.error: " + msg + " -- parsing halted.",
null);
// throw a SAXException with the new formatted message
throw new SAXException(msg, ex);
}
COM: <s> handler for non fatal sax errors this method is invoked if a document </s>
|
funcom_train/18328360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAuthor(String author) {
Element authorElement = getFirstElementByTagName("author");
if (authorElement == null) {
authorElement =
(Element) DOMHelper.insertElement(
MQTI_NAMESPACE_URI, "author",
getDocumentElement().getFirstChild(),
DOMHelper.INSERT_AFTER);
}
authorElement.setTextContent(author);
}
COM: <s> sets the author of the question </s>
|
funcom_train/3352190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NativeStream createNativeStream() {
X86Constants.Mode mode = ((VmX86Architecture) getArchitecture())
.getMode();
return new X86BinaryAssembler(getCPUID(), mode, LOAD_ADDR,
INITIAL_OBJREFS_CAPACITY, INITIAL_SIZE, INITIAL_SIZE);
}
COM: <s> create a platform specific native stream </s>
|
funcom_train/9713866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExecutorService newListenerExecutor(int port) {
return new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue(),
new DefaultThreadFactory(
new ThreadGroup("Listener thread group"),
"HttpListener-" + this.port));
}
COM: <s> create the executor used to launch the single request connection listener </s>
|
funcom_train/51539195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int available() throws IOException {
if (count > 0) {
/*
* The next read will only return the bytes in the buffer,
* so only return the number of bytes in the buffer.
* While available can return a number less than than the next
* read will get, it should not return more.
*/
return count;
}
// The buffer is empty, so the next read will go directly to native
return socketPeer.available();
}
COM: <s> returns the number of bytes that can be read or skipped over from </s>
|
funcom_train/36074638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public FuzzyNorm getFuzzyNorm(String name){
if (fzNorm == null){
fzNorm= new HashMap<String,FuzzyNorm>();
}
/*check if the Hash Map contains the desired instance*/
if (fzNorm.containsKey(name)){
return fzNorm.get(name);
}
else{
/*create a new instance and return it to the caller*/
FuzzyNorm instance;
if (name =="Probabilistic"){
instance = new Probabilistic();
instance.name = "Probabilistic";
fzNorm.put("Probabilistic", instance);
return instance;
}
}
return null;
}
COM: <s> get a instance of a fuzzy norm operator </s>
|
funcom_train/4509580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element loadAvatarFromDatabase(String username) {
Element vcardElement = defaultProvider.loadVCard(username);
Element avatarElement = null;
if (vcardElement != null && vcardElement.element("PHOTO") != null) {
avatarElement = vcardElement.element("PHOTO").createCopy();
}
return avatarElement;
}
COM: <s> loads the avatar element from the users db stored vcard </s>
|
funcom_train/13784266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getValue(String serviceName, String fieldName) throws MethodInvocationException {
if (serviceName == null) {
throw new IllegalArgumentException("serviceName argument can't be null");
}
if (fieldName == null) {
throw new IllegalArgumentException("fieldName argument can't be null");
}
return getJavaClassRuleServicePublisher().getFrontend().getValue(serviceName, fieldName);
}
COM: <s> returns field value from published service </s>
|
funcom_train/3862161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
Iterator mSettingsIterator = cConfigurationSettings.values().iterator();
while (mSettingsIterator.hasNext()) {
ConfigurationSetting bSetting = (ConfigurationSetting)mSettingsIterator.next();
if (bSetting.isRequired() && (bSetting.getValue() == null)) {
return false;
}
}
return true;
}
COM: <s> returns true if all required settings have been set by calling </s>
|
funcom_train/32060931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endFullScreenMode(){
if (!infullscreen) return;
gdevice.setDisplayMode(originaldismode);
gdevice.setFullScreenWindow(null);
gameframe.setIgnoreRepaint(false);
gconfig = gdevice.getDefaultConfiguration();
startRendering(VisualMode.WINDOWED);
infullscreen = false;
Utility.sleep(150);
// rerender all the game graphics in windowed mode
vc.setAllViewsNeedRepaint();
render();
}
COM: <s> puts the game from full screen mode back to original windowed mode </s>
|
funcom_train/18465551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadConfiguration(Configuration configuration) throws ConfigurationException
{ // Get all memory classes from the configuration
Configuration[] memClasses = configuration.getChildren(MEMORY_CLASS_ELEMENT);
for(Configuration classConfig : memClasses)
{
MemoryClass currentClass = new MemoryClass(classConfig);
mMemoryClasses.put(currentClass.getName(),currentClass);
}
}
COM: <s> load this memory managers configuration </s>
|
funcom_train/13892869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public SrcDialog getNewSourceDialog(Component component, String text) {
while (component != null && !(component instanceof Frame)
&& !(component instanceof Dialog))
component = component.getParent();
if (component == null)
return new SrcDialog((Frame) null, text);
else if (component instanceof Dialog)
return new SrcDialog((Dialog) component, text);
else
return new SrcDialog((Frame) component, text);
}
COM: <s> this function allows to get a new source dialog by giving the </s>
|
funcom_train/2712182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyTableValueChange(TableModelEvent e) {
if (e != null && e.getType() == TableModelEvent.UPDATE &&
e.getColumn() == 1) {
this.selectedTool.setVisible((Boolean) this.tools.getValueAt(e.
getFirstRow(), 1));
}
}
COM: <s> updates the visibility in editor of selected provided tool when the corresponding </s>
|
funcom_train/51630860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openDialog(Shell parent) throws CoreException {
ensureChecked();
if (fPreCheckStatus.hasFatalError()) {
showInformation(parent, fPreCheckStatus);
return;
}
UserInterfaceStarter starter= RenameUserInterfaceManager.getDefault().getStarter(fRefactoring);
starter.activate(fRefactoring, parent, getJavaRenameProcessor().needsSavedEditors());
}
COM: <s> opens the refactoring dialog for this rename support </s>
|
funcom_train/3106956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isModified(String data) throws IloaException {
int index = this.getIndex(data);
if (this.data.get(index) != null) {
if (this.dataInit == null) {
return false;
} else if (this.existDataInit(data)) {
return !(this.data.get(index)).equals(this.dataInit.get(data));
}
return false;
}
return false;
}
COM: <s> return the modified status of a column </s>
|
funcom_train/4640955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDiffuseShader(Color color) {
// save internal status
this.color = color;
type = SHADER_DIFFUSE;
// save name for use with primitives
currentName = defaultName + nameID++;
// set parameter
sunflow.parameter("diffuse", colorSpace, color.getRed()/(float)255, color.getGreen()/(float)255, color.getBlue()/(float)255);
// set shader
sunflow.shader(currentName, SHADER_DIFFUSE);
}
COM: <s> sets diffuse shader </s>
|
funcom_train/35672255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String setterMethodName(final ICobolBinding binding) {
/* Jaxb objects export lists rather than wrappers */
if (binding instanceof ICobolArrayComplexBinding) {
return getterSetterMethodName("set",
((ICobolArrayComplexBinding) binding)
.getComplexItemBinding());
}
return getterSetterMethodName("set", binding);
}
COM: <s> builds a set method name for a field name </s>
|
funcom_train/6351182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void usePermanentConnection(boolean mode) throws SQLException {
this.usePermanentDatabaseConnection= mode;
if((mode) && (this.smdpDatabaseManager!= null) &&
((this.useDbSystem) && !(this.smdpDatabaseManager.isConnected()))) {
// not nice, but it will work for now
this.smdpDatabaseManager.openConnection();
}
}
COM: <s> toggle wether we use a permanent database connection </s>
|
funcom_train/5678678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element createRootElement() {
Element element = new DefaultElement( ADDRESS_BOOK, Namespace.get( NAMESPACE));
element.add( createElement( CUSTOM_LABEL1, "Custom 1"));
element.add( createElement( CUSTOM_LABEL2, "Custom 2"));
element.add( createElement( CUSTOM_LABEL3, "Custom 3"));
element.add( createElement( CUSTOM_LABEL4, "Custom 4"));
return element;
}
COM: <s> creates a root element </s>
|
funcom_train/20893746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addContinue() {
if (quizMain.gameIsRunning() && !continueOnScreen) {
continueOnScreen = true;
continuePosition = append("Continue game", null);
}else if (!quizMain.gameIsRunning() && continueOnScreen && continuePosition!=0){
continueOnScreen = false;
delete(continuePosition);
}
}
COM: <s> add or removes the continue game selection from </s>
|
funcom_train/9922006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void betRound(int after) {
int bettor=after;
mostRecentRaise= bigBlind;
int bets= 0;
if(count(State.NEEDS_TO_CALL)<2 && stage!=Stage.PREFLOP) return;
while ((bettor=next(State.NEEDS_TO_CALL,bettor))!=-1
&&
!(count(State.NEEDS_TO_CALL)==1&&(count(State.CALLED)+count(State.ALLIN))==0)
) { // Potential for an infinite loop
this.handdata.startAction(this,bettor,bets++);
int decision = players[bettor].ai.getDecision(handdata);
if (decision <= FOLD){
decision= -1;
fold(bettor);
}
else if (decision == CALL_CHECK) call(bettor);
else decision = bet(bettor, decision);
this.handdata.endAction(decision);
}
}
COM: <s> the set of betting rounds is preflop flop turn river </s>
|
funcom_train/21844480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(final InstructionContext env) throws JBasicException {
final Value container = env.pop();
Value containedValue = env.popForUpdate();
if( !containedValue.isType(Value.RECORD) || !container.isType(Value.RECORD))
throw new JBasicException(Status.INVOBJECT);
containedValue.setObjectAttribute("PARENT", new Value(container.getName()));
env.push(containedValue);
return;
}
COM: <s> execute the of instruction at runtime </s>
|
funcom_train/12130248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PNode removeChild(int index) {
if (children == null) {
return null;
}
PNode child = (PNode) children.remove(index);
if (children.size() == 0) {
children = null;
}
child.repaint();
child.setParent(null);
invalidateFullBounds();
firePropertyChange(PROPERTY_CODE_CHILDREN, PROPERTY_CHILDREN, null, children);
return child;
}
COM: <s> remove the child at the specified position of this group nodes children </s>
|
funcom_train/12265495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCompleteListener(IBodyCompleteListener listener) {
callBodyAccessListener();
synchronized (completeListeners) {
completeListeners.addListener(listener, isComplete.get(), getExecutor(), HttpUtils.getListenerExecutionMode(listener, "onComplete"));
}
}
COM: <s> adds a complete listener </s>
|
funcom_train/44432058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean rssBackEndHandleIdenticalTo(Object id) {
if (!( (rssBackEndhandle() instanceof Channel) &&
(id instanceof Channel) ) )
return false;
Channel thisChannel = (Channel) rssBackEndhandle();
Channel thatChannel = (Channel) id;
return thisChannel.getIntId() == thatChannel.getIntId();
}
COM: <s> rss back end handle identical to override method so that we apply hibernates </s>
|
funcom_train/39220430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNodeComplete(Node n) {
interp.remove(n.getName().intern());
Iterator edges = n.getIncidentEdges().iterator();
while (edges.hasNext())
removeEdgeComplete((Edge) edges.next());
if (n.getGraph() != null)
super.removeVertex(n);
nameToNode.remove(n.getName());
StorageFactory.getSL().removeComplete(n);
VisFactory.getFactory().remove(n);
lastMod = System.currentTimeMillis() - 1;
}
COM: <s> removes a node completely node and all edges connected to it </s>
|
funcom_train/48632214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void imageFormat(Document document) throws XPathExpressionException {
if (testIfNodeExists(document, imageFormatXpath + "/PNG")) {
imageFormat = "image/png";
}
else if (testIfNodeExists(document, imageFormatXpath + "/JPEG")) {
imageFormat = "image/jpeg";
}
else if (testIfNodeExists(document, imageFormatXpath + "/GIF")) {
imageFormat = "image/gif";
}
else {
logger.debug("No supported image formats found - mark service as broken");
broken = true;
}
}
COM: <s> image format for wms 1 </s>
|
funcom_train/26631354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("Property:");
buf.append(getPropertyName());
buf.append('[');
try {
String str = toDataString();
if (str == null) {
buf.append("<null>");
} else {
buf.append(str);
}
} catch (Exception ex) {
buf.append("<exception: ");
buf.append(ex.getMessage());
buf.append(">");
}
buf.append(']');
return buf.toString();
}
COM: <s> get a debug string for the property </s>
|
funcom_train/50072334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isHtml(final String url) {
String lowerUrl = url.toLowerCase();
// if dynamic, than html
// TODO dynamic url isn't always a html
if (url.indexOf("?") != -1) {
return true;
}
// check file suffix
for (String tmp : htmlTypes) {
if (lowerUrl.endsWith(tmp)) {
return true;
}
}
return false;
}
COM: <s> checks url is a html file </s>
|
funcom_train/4194432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SipURL getNexthop(SipURL sip_url)
{ String username=sip_url.getUserName();
if ((username!=null && username.startsWith(prefix)) || prefix.equalsIgnoreCase(DEFAULT_PREFIX))
{ return new SipURL(username,nexthop.getAddress().toString(),nexthop.getPort());
}
else return null;
}
COM: <s> gets the proper next hop sip url for the selected url </s>
|
funcom_train/34805786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemsRemoved(CacheItemEvent ev) {
Object files[] = ev.getAffectedItemKeys();
for (int n=0; n < files.length; n++) {
if ( !(files[n] instanceof String) ) continue;
File cachedFile = new File((String)files[n]);
if ( !cachedFile.exists() ) continue;
FileUtil.deleteFileIgnoringErrors(cachedFile);
}
}
COM: <s> called when items are removed from the cache </s>
|
funcom_train/36129685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerResourceManager(final ResourceManager manager, final boolean setDefault) {
String className = manager.getClass().getName();
// set this manager as default, if resource manager map is empty
boolean forceDefault = (resourceManagerMap.isEmpty()) ? true : setDefault;
resourceManagerMap.put(className, manager);
if (forceDefault) {
defaultResourceManagerClassName = className;
}
}
COM: <s> register new resource manager </s>
|
funcom_train/18625855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addField(String sectionName, String fieldName, String value) {
ArrayList<ServiceMonitorField> fields;
if (sections.containsKey(sectionName))
fields = sections.get(sectionName);
else
fields = new ArrayList<ServiceMonitorField>();
fields.add(new ServiceMonitorField(fieldName, value));
sections.put(sectionName, fields);
}
COM: <s> adds a new field value to a section of the report </s>
|
funcom_train/46378254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deliverMouseMotionEvent(MouseEvent event) {
if (mouseMotionListeners == null) {
return;
}
for (MouseMotionListener listener : mouseMotionListeners) {
switch (event.getID()) {
case MouseEvent.MOUSE_MOVED:
listener.mouseMoved(event);
break;
case MouseEvent.MOUSE_DRAGGED:
listener.mouseDragged(event);
break;
}
}
}
COM: <s> deliver the given mouse motion event to the window </s>
|
funcom_train/8881732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object read(String expression, QName returnType) {
try {
XPathExpression xPathExpression = xPath.compile(expression);
return xPathExpression.evaluate(xmlDocument, returnType);
} catch (XPathExpressionException ex) {
Logger.getLogger("global").log(Level.SEVERE, "VEPersonal Report: XPathExpressionException has been throwed", ex);
return null;
}
}
COM: <s> process xpath consult </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.