__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/24002410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void println(boolean x,final AsyncCallback<Boolean> callback) {
synchronized (lock) {
print(x,new AsyncCallback<Boolean>()
{
public void onSuccess(Boolean b)
{
println(callback);
}
public void onFailure(Throwable t)
{
callback.onFailure(t);
}
});
}
}
COM: <s> prints a boolean value and then terminates the line </s>
|
funcom_train/47980570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyConnectionListeners(boolean connected) {
if (!connected) {
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(XMPPSERVICE_STATUS);
}
int i = mConnectionCallbacks.beginBroadcast();
while (i > 0) {
i--;
try {
mConnectionCallbacks.getBroadcastItem(i)
.onConnectionChanged(connected);
} catch (RemoteException e) {
// The RemoteCallbackList will take care of
// removing the dead object for us.
}
}
mConnectionCallbacks.finishBroadcast();
}
COM: <s> notifies all remote connection listeners on connection changes </s>
|
funcom_train/50851877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGapManagerIntIntIntInt() {
GapManager gapManager = new GapManager(1, 2, 3, 4);
assertEquals(1, gapManager.getMinGapLength());
assertEquals(2, gapManager.getMaxGapLength());
assertEquals(3, gapManager.getMinGapDelay());
assertEquals(4, gapManager.getMaxGapDelay());
}
COM: <s> test method for </s>
|
funcom_train/18037140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttributeStringValue(Object contextNode) {
if (debugging) {
log.info("[DocumentNavigator] att string value");
}
if (!(contextNode instanceof Attribute)) {
throw new IllegalStateException("Cannot retreive attribute name on non-attribute event.");
}
return ((Attribute) contextNode).getValue();
}
COM: <s> get the string value of an attribute node </s>
|
funcom_train/38251934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String out = this._snpSource+"\t"+this._snpNumber+"\t"+this._snpSequence+"\t";
if(this._chromosome!=null) out=out+this._chromosome;
out=out+"\t";
if(this._coordinate > 0) out=out+this._coordinate;
return out;
}
COM: <s> returns the snp information as a string </s>
|
funcom_train/22477544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(final String name, final Object value, final CrosscheckObject js) {
if (this.setters.containsKey(name)) {
Context.call(new ContextAction() {
public Object run(Context cx) {
Function function = (Function) UserDefinedPropertyHandler.this.setters.get(name);
return function.call(cx, function, js, new Object[] {value});
}
});
}
}
COM: <s> calls the user defined setter function </s>
|
funcom_train/4366496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String s, int off, int len) throws IOException {
if (writer != null) {
writer.write(s, off, len);
} else {
ensureOpen();
if (len >= bufferSize - nextChar)
reAllocBuff(len);
s.getChars(off, off + len, cb, nextChar);
nextChar += len;
}
}
COM: <s> write a portion of a string </s>
|
funcom_train/124872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStringValue(JSCSArrayTable table, int row, int col) {
int convertCol = table.convertColumnIndexToModel(col);
if (table.isDisplayTransposed())
return table.getJSCSArray().stringAt(convertCol, row);
return table.getJSCSArray().stringAt(row, convertCol);
}
COM: <s> gets a code string code value from a data table </s>
|
funcom_train/36467152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double calcCoulombForce(TableView tv1, TableView tv2) {
double ccf = COULOMBS_CONSTANT * TIME_STEP * ((relativeAttraction[tv1.getId()][tv2.getId()])/(tv1.calcDistanceWRadius(tv2)*1000));
//System.out.println("CC: "+ccf);
return ccf;
}
COM: <s> calculates the amount of force according to coulombs law </s>
|
funcom_train/2657638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putProperty(Object component, Object key, Object value) {
Object table = get(component, ":bind");
if (value != null) {
if (table == null) {
set(component, ":bind", table = new Hashtable());
}
((Hashtable) table).put(key, value);
} else if (table != null) {
((Hashtable) table).remove(key);
}
}
COM: <s> binds the specified key to the specified value and stores in this </s>
|
funcom_train/25564695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDataOfNode(DataList dataToReturn, TreeNode node, boolean addNodeData) {
if(addNodeData)dataToReturn.add((Data)
((DefaultMutableTreeNode)node).getUserObject());
int childCount = node.getChildCount();
for (int i = 0; i < childCount; i++){
addDataOfNode(dataToReturn, node.getChildAt(i), true);
}
}
COM: <s> evdokimov your cant write recursive methods i change this one totally </s>
|
funcom_train/14362784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matchesCheckDigit(CheckDigit cd) {
if (cd == null || cd.isAlwaysInvalid() || cd.isBankCodeNotFound() || cd.
isNotImplemented()) {
return false;
} else if (cd.isAlwaysValid()) {
return true;
} else {
return getDigitAtPos(cd.getPos()) == cd.getDigit();
}
}
COM: <s> tests if the supplied check digit is matched by this account code </s>
|
funcom_train/51412972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshRowSelection() {
Table table = sSelector.getTable();
int totalRows = table.getAllRows().length;
int actRowPos = table.getIndexPosition(sSelector.getSelectedRow());
labelDataset.setText((actRowPos == -1 ? "-" : (actRowPos+1)) + " / " + totalRows);
}
COM: <s> refreshes the row selection label </s>
|
funcom_train/33259768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishTableEntry(final Table table) {
this.done = true;
if (!this.tableItem.isDisposed()) {
guiRun(new Runnable() {
public void run() {
SchedulerTableItem.this.progressBar.dispose();
SchedulerTableItem.this.progressBar = new ProgressBar(table, SWT.NONE);
SchedulerTableItem.this.progressSelection =
SchedulerTableItem.this.progressBar.getMaximum();
drawTableEntry(table, table.indexOf(SchedulerTableItem.this.tableItem));
}
});
}
}
COM: <s> mark the algorithm as finished </s>
|
funcom_train/21079932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void analyzeArtifactsAndDependencies(Collection<String> jars, Revision rev, RevisionDescriptor desc, File root, String path) {
for (String p : jars) {
searchArtifactsOrDependencies(rev, desc, root, p, DLExplorer.getFileName(p));
}
}
COM: <s> recursive analyse of file or directory that determines artifacts and dependencies </s>
|
funcom_train/37614261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntPoint convert(Point src) {
double mx = 1.0 * m_width / m_bounds.width();
int x = (int)(mx * (src.X - m_bounds.getPoint().X));
double my = -1.0 * m_height / m_bounds.height();
int y = (int)((my * (src.Y - m_bounds.getPoint().Y)) + m_height);
return new IntPoint(x, y);
}
COM: <s> converts the given point in real world coordinates to pixel coordinates </s>
|
funcom_train/2922893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInit(boolean b) {
super.setStandardUML2Setup(b);
// Add RSA/RSM specific uml file extensions
addExtensionMap(new Mapping("emx", "org.eclipse.uml2.uml.resource.UMLResource"));
addExtensionMap(new Mapping("epx", "org.eclipse.uml2.uml.resource.UMLResource"));
// Add plugins containing profiles or type libraries
addUriMaps(extensionProjects);
// Add pathmap entry
addUriMaps(pathMapEntries);
}
COM: <s> registers all necessary resources </s>
|
funcom_train/3500093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws ConfigurationException {
if (this.configElement == null) {
throw new ConfigurationException("Invalid usage: element was not set", new NullPointerException());
}
if (log.isTraceEnabled()) log.trace(" NECTAR: SchedulerConfiguration -- parsing configuration...");
parseInitialPause();
parseScheduledActionSets();
}
COM: <s> parses the scheduler configuration element of the nectar config </s>
|
funcom_train/23777592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimModelVersion(String aircraftAbrev) {
if (StringUtils.trimToNull(aircraftAbrev) != null) {
String val = aircraftAbrev.substring(aircraftAbrev.length());
if (StringUtils.isAlpha(val)) {
return aircraftAbrev.substring(0, aircraftAbrev.length() - 1);
}
}
return aircraftAbrev;
}
COM: <s> the aircraft abreviation might be something like this c 150 m we want </s>
|
funcom_train/12163460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderSelectionControlsSingleSelect() throws Exception {
doTestRenderSelection("controls",
"<select multiple=\"false\" name=" +
"\"testName\" type=\"radio\">" +
"<option title=\"Prompt\" value=\"Value\">Caption</option>" +
"</select>",
false);
}
COM: <s> test the complex rendering for controls single select </s>
|
funcom_train/9528069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
this.treeViewer = (TreeViewer)viewer;
if(oldInput != null && oldInput instanceof IPart) {
removeListenerFrom((IPart)oldInput);
}
if(newInput != null && newInput instanceof IPart) {
addListenerTo((IPart)newInput);
}
}
COM: <s> add listeners to all new ipart types children </s>
|
funcom_train/32865599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateForward(DigitalOrganism digorg){
try{
DigitalOrganism current = digorg.getNeighbour();
DigitalOrganismIterator neighbours = lifespace.getNeighbours(digorg);
while (!current.equals(neighbours.next()) && neighbours.hasNext()) {}
if (neighbours.hasNext()) {
digorg.setNeighbour(neighbours.next());
}
else{
neighbours.reset();
digorg.setNeighbour(neighbours.next());
}
} catch(Exception e){
Log.error(e);
}
}
COM: <s> rotates the organisms facing forward </s>
|
funcom_train/36019102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
Node n1 = (Node) o1;
Node n2 = (Node) o2;
BigInteger distance1 = relval.xor(n1.id.value());
BigInteger distance2 = relval.xor(n2.id.value());
return distance1.compareTo(distance2);
}
COM: <s> compare two objects which must both be of type code node code </s>
|
funcom_train/16105025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
if (iw && ih) {
return new Dimension(0, 0);
} else if (iw && !ih) {
Dimension dim = super.getPreferredSize();
return new Dimension(0, dim.height);
} else if (!iw && ih) {
Dimension dim = super.getPreferredSize();
return new Dimension(dim.width, 0);
} else {
// why do you're using me?!
return super.getPreferredSize();
}
}
COM: <s> returns an empty dimension as preferred size </s>
|
funcom_train/20846014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean notifyEventListeners(String requestURI, XMLElement soapHeader, XMLElement soapBody, ResponseOutput respOut) {
if (eventListeners == null) return false;
try {
eventListeners.lockRead();
IEventListener listener = (IEventListener) eventListeners.get(requestURI);
if (listener != null) {
listener.handleIncomingEvent(requestURI, soapHeader, soapBody, respOut);
return true;
}
return false;
} finally {
eventListeners.unlock();
}
}
COM: <s> notifies the registered event listeners </s>
|
funcom_train/8485234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMandNoOptAndNoRest() throws InterpreterException {
// fun4(3)
fun4.base_applyInScope(NATTable.atValue(new ATObject[] { NATNumber.atValue(3) }), bindCtx_);
ensureBound(at_a, NATNumber.atValue(3));
ensureBound(at_x, NATNumber.atValue(3));
ensureBound(at_rest, NATTable.EMPTY);
}
COM: <s> tests application with mandatory arguments </s>
|
funcom_train/33509931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getResourceTextField(), null);
jContentPane.add(getSubscribeBtn(), null);
jContentPane.add(getUnsubscribeBtn(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/13669468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object internalBuildEnumInstance(EnumNativeObjectInfo enoi) {
String className = session.getMetaModel().getClassInfoFromId(enoi.getEnumClassOid()).getFullClassName();
Class clazz = classPool.getClass(className);
Object theEnum = Enum.valueOf(clazz, enoi.getEnumName());
return theEnum;
}
COM: <s> builds an insatnce of an enum </s>
|
funcom_train/10912189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText() {
StringBuffer text = new StringBuffer();
// assemble the text
for (InlineArea inline : inlines) {
if (inline instanceof WordArea) {
text.append(((WordArea) inline).getWord());
} else {
text.append(((SpaceArea) inline).getSpace());
}
}
return text.toString();
}
COM: <s> get the whole text string </s>
|
funcom_train/18551729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createJTree(BEBeanCollection pBEBeanCollection) {
DefaultTreeModel treeModel = new DefaultTreeModel(createRootNode(pBEBeanCollection));
this.setModel(treeModel);
this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
// Set the Cell Renderer
this.setCellRenderer(new CustomTreeCellRenderer());
}
COM: <s> creates the jtree </s>
|
funcom_train/555255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String toString(String tagName) {
Hashtable<String, String> attributes = new Hashtable<String, String>();
if (id != -1) {
attributes.put(History.ID_KEY, String.valueOf(this.id));
}
XMLLine ret = new XMLLine(tagName, attributes);
return ret.toString();
}
COM: <s> returns a xml representation of the object reference the id </s>
|
funcom_train/33233888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand1() {
if (backCommand1 == null) {//GEN-END:|122-getter|0|122-preInit
// write pre-init user code here
backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|122-getter|1|122-postInit
// write post-init user code here
}//GEN-BEGIN:|122-getter|2|
return backCommand1;
}
COM: <s> returns an initiliazed instance of back command1 component </s>
|
funcom_train/38995822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File makeSubDir(String nameFile){
File subDir = null;
//int index = (correspondance.get(nameFile)).indexOf("_", nameFile.length()-5);
int index = (correspondance.get(nameFile)).indexOf("-");
if (index > 0){
String name = correspondance.get(nameFile);
subDir = new File( DirOut+name.substring(0,index));
if (!subDir.exists()) subDir.mkdir();
}
return subDir;
}
COM: <s> if are present in name file eg fbtest hi </s>
|
funcom_train/9913849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFields(List<Field> pFields) {
if(pFields == null) return; //pFields do not null
fields = pFields;
fieldSeq = null;
fieldSeq = new HashMap<String, Integer>();
for (int i = 0; i < pFields.size(); i++) {
fieldSeq.put(pFields.get(i).getAlias(), i);
}
}
COM: <s> sets this fields </s>
|
funcom_train/9663975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void moveToLastCell() {
EditableGrid grid = getPanel().getGrid();
if(!deactivateActiveCell())
return;
int row = grid.getRowCount() - 1;
if (row < 0)
return;
int column = grid.getCellCount(row) - 1;
if (column < 0)
return;
setCursor(row, column, false);
}
COM: <s> moves the cursor to the last cell on this page </s>
|
funcom_train/43245288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECOneZip() {
System.out.println("getECOneZip");
EmergencyContactDG3Object instance = new EmergencyContactDG3Object();
String expResult = "";
String result = instance.getECOneZip();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get econe zip method of class org </s>
|
funcom_train/32216876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSingleOutgoingTransition(ActivityNode node) throws TranslationException {
if (node.getOutgoings().size() == 0) throw new TranslationException(this, "Action \"" + node.getQualifiedName() + "\" has no outgoing edge.");
else if (node.getOutgoings().size() > 1) new TranslationException(this, "Action \"" + node.getQualifiedName() + "\" has multiple outgoing edges.");
}
COM: <s> checks if a node has only a single outgoing transition </s>
|
funcom_train/37039161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws LifecycleException {
// Validate and update our current state
if (started)
throw new LifecycleException
(sm.getString("coyoteConnector.alreadyStarted"));
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
try {
protocolHandler.start();
} catch (Exception e) {
throw new LifecycleException
(sm.getString
("coyoteConnector.protocolHandlerStartFailed", e));
}
}
COM: <s> begin processing requests via this connector </s>
|
funcom_train/48869492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Product create() {
String id = GUID.generate();
Product p = new ForSale(id);
Cache.getInstance().put(id, p);
System.out.println("The Product id in the For_Rent create method is: " + p.getId());
return p;
}
COM: <s> creates a rental object based on the transaction it is associated with </s>
|
funcom_train/1444470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSelf() {
this.self = new Player(-1, -1, this.myMaster.getNumber(), new Vektor(
-1, 0), new Vektor(), 0, 0, 4000.0, 1.0, 1.0, true, true,
this.myMaster.isGoalie(), this.self.getPConf());
this.me.initSelf(this.self);
this.players.initSelf(this.self);
}
COM: <s> inits the self after the arrial of an init info </s>
|
funcom_train/45018338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAffiliationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXuser_affiliation_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXuser_affiliation_feature", "_UI_NXuser_type"),
NexusPackageImpl.Literals.NXUSER__AFFILIATION,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the affiliation feature </s>
|
funcom_train/6266726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDialog(SIPDialog dialog) {
String id = dialog.getDialogId();
if (id != null) {
Object old = this.dialogTable.remove(id);
if (old != null
&& !dialog.testAndSetIsDialogTerminatedEventDelivered()) {
DialogTerminatedEvent event = new DialogTerminatedEvent(dialog
.getSipProvider(), dialog);
// Provide notification to the listener that the dialog has
// ended.
dialog.getSipProvider().handleEvent(event, null);
}
}
}
COM: <s> remove the dialog from the dialog table </s>
|
funcom_train/33057411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMethodToInclude(Class clazz, String methodName) {
List methodList = (List)inclusions.get(clazz);
if (methodList == null) {
methodList = new ArrayList();
inclusions.put(clazz, methodList);
}
methodList.add(methodName);
}
COM: <s> includes the given method name declared in the given class to be </s>
|
funcom_train/32965419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkForStateName(String stateCode){
String qs = null;
Query query = null;
qs = String.format(Locale.US, "SELECT sn FROM StateNames sn WHERE sn.stateCode = :code");
query = em.createQuery( qs );
query.setParameter( "code", stateCode);
if(query.getResultList() != null && query.getResultList().size() > 0){
return true;
}
return false;
}
COM: <s> method to check whether state name exists </s>
|
funcom_train/212820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue() {
try {
int index = Integer.parseInt(indexValueForm.get(0));
String value = indexValueForm.get(1);
formPanel.set(index,value);
}
catch (FormInputPanelException ex) {
errorOutput(ex.toString());
}
catch (NumberFormatException ex) {
errorOutput(ex.toString());
}
}
COM: <s> shows how to set the value of a field </s>
|
funcom_train/41336015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintSplitPaneDragDivider(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) {
paintBackground(context, g, x, y, w, h, null);
}
COM: <s> paints the divider when the user is dragging the divider of a split </s>
|
funcom_train/44314266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendDataShapes() {
if (oneDrawingMode)
objectDataOutput = new InDData (numClient, nameClient, true, shapes);
else
objectDataOutput = new InDData (numClient, nameClient, shapes);
synchronized (messagesList) {
messagesList.add(messagesList.size(), objectDataOutput);
messagesList.notifyAll();
}
}
COM: <s> creates the object to serialize vector shapes </s>
|
funcom_train/34067830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nodeLengthsToHeights(ReRootedNode node, double height) {
double newHeight = height;
if (node.getLength() > 0.0) {
newHeight += node.getLength();
}
node.setHeight(newHeight);
for (Node child : node.getChildren()) {
nodeLengthsToHeights((ReRootedNode)child, newHeight);
}
}
COM: <s> set the node heights from the current node branch lengths </s>
|
funcom_train/1941039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int processPaginateQuery(QueryCallback callback, int pageNo, int pageSize) {
QueryTemplate queryTemplate = this.pagDefinition.getQueryTemplate();
List dataList = queryTemplate.query(callback, pageSize, pageNo);
int rowsCount = queryTemplate.countRows(callback);
//handle search result data
this.saveSearchResult(dataList);
return rowsCount;
}
COM: <s> run the query to get the result </s>
|
funcom_train/38558738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean haveOptionalArcAvailable() {
boolean optionalArcAvailable = false;
Iterator i = outgoingArcIDs.iterator();
while (i.hasNext()) {
String arcID = (String)i.next();
PerformanceTreeArc arc = QueryManager.getData().getArc(arcID);
if (!arc.isRequired() && arc.getTarget() == null) {
optionalArcAvailable = true;
}
}
return optionalArcAvailable;
}
COM: <s> this method tells us whether the node has an optional outgoing arc </s>
|
funcom_train/30251400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage(UserData_Client sender, String toUser, String provider) {
// get the login and pwd for the user
CommAccountData_Client user = sender.getAccountByProvider(provider);
if (user != null) {
GoogleTalkCommunication comm = new GoogleTalkCommunication(user.login, user.password);
comm.Connect();
return comm.WaitForMessage(toUser);
}else {
return "utente inesistente";
}
}
COM: <s> get a message from a google talk conversation with a given user </s>
|
funcom_train/16221265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PropertyNameProcessor findJavaPropertyNameProcessor( Class beanClass ) {
if( !javaPropertyNameProcessorMap.isEmpty() ) {
Object key = javaPropertyNameProcessorMatcher.getMatch( beanClass, javaPropertyNameProcessorMap.keySet() );
return (PropertyNameProcessor) javaPropertyNameProcessorMap.get( key );
}
return null;
}
COM: <s> finds a property name processor registered to the target class </s>
|
funcom_train/45601495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(List<Mob> mobs) throws WriteException {
MobWriter out = null;
try {
out = new MobWriter(fileName);
out.println("#Mob master data file version 0.02");
for (Mob mob : mobs) {
writeMob(out, mob);
}
System.out.println("Written: " + mobs.size());
out.close();
} catch (IOException e) {
throw new WriteException(e);
}
}
COM: <s> write a list of mobs to the file </s>
|
funcom_train/3385304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFontIndex(char c) {
int blockIndex = c>>SHIFT;
int[] block = blocks[blockIndex];
if (block == null) {
block = new int[BLOCKSIZE];
blocks[blockIndex] = block;
}
int index = c & MASK;
if (block[index] == 0) {
block[index] = getIndexFor(c);
}
return block[index];
}
COM: <s> return an index for the given character </s>
|
funcom_train/31969044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStatusKey() {
switch (status) {
case START: return "starting";
case CREATE: return "creating";
case MERGE: return "merging";
case APPLY: return "applying personal text";
case FINISHED: return "finished";
case ERROR: return "errors - did not finish";
default: return null;
}
}
COM: <s> the translation key for the current status </s>
|
funcom_train/23713533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AFPropertyMsg createRoleRequestMsg(String actorid, String actorType) {
AFPropertyMsg pm = new AFPropertyMsg(ROLE_REQUEST_MSG, true);
pm.setProperty(ROLE_REQUEST_MSG_ROLE_ID, actorid);
pm.setProperty(ROLE_REQUEST_MSG_ROLE_TYPE, actorType);
return pm;
}
COM: <s> creates a role request message </s>
|
funcom_train/44658555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updatedEnabledState() {
boolean isEnabled = isEnabled();
if (oldEnabledState == null || hasChanged(oldEnabledState.booleanValue(), isEnabled)) {
firePropertyChange(ENABLED_PROPERTY_NAME, oldEnabledState == null ? !isEnabled : oldEnabledState
.booleanValue(), isEnabled);
}
oldEnabledState = Boolean.valueOf(isEnabled);
}
COM: <s> this method is called when any predicate for enabled state has changed </s>
|
funcom_train/47603349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitInputeCodeCommand() {
if (exitInputeCodeCommand == null) {//GEN-END:|68-getter|0|68-preInit
// write pre-init user code here
exitInputeCodeCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|68-getter|1|68-postInit
// write post-init user code here
}//GEN-BEGIN:|68-getter|2|
return exitInputeCodeCommand;
}
COM: <s> returns an initiliazed instance of exit inpute code command component </s>
|
funcom_train/12309455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL asURL() throws IOException {
String fileName =
jarContentReference.asFile().getAbsolutePath().replace(File.separatorChar, '/');
return new URL("jar:file:" + fileName + "!/" + entry.getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
COM: <s> returns the content reference as a url </s>
|
funcom_train/24002296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush(final AsyncCallback<Boolean> callback) {
/* try {
synchronized (lock) {
ensureOpen();
out.flush();
}
}
catch (IOException x) {
trouble = true;
}
*/
try {
synchronized (lock) {
ensureOpen();
out.flush(callback);
}
}
catch (IOException x) {
trouble = true;
callback.onFailure(x);
}
}
COM: <s> flushes the stream </s>
|
funcom_train/5380027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void backPressed() {
IWizardPage page = currentPage.getPreviousPage();
if (page == null)
// should never happen since we have already visited the page
return;
// set flag to indicate that we are moving back
isMovingToPreviousPage = true;
// show the page
showPage(page);
}
COM: <s> the back button has been pressed </s>
|
funcom_train/10906789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OutputStream applyFilters(OutputStream stream) throws IOException {
OutputStream out = stream;
if (filters != null && !isDisableAllFilters()) {
for (int count = filters.size() - 1; count >= 0; count--) {
PDFFilter filter = (PDFFilter)filters.get(count);
out = filter.applyFilter(out);
}
}
return out;
}
COM: <s> applies all registered filters as necessary </s>
|
funcom_train/35840372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatArray(String[] array) {
if (array == null) {
return null;
}
String result = "[";
for (int i = 0; i < array.length; i++) {
result = result + array[i] + ", ";
}
return result.substring(0, result.length() - 2) + "]";
}
COM: <s> formatters for debug output </s>
|
funcom_train/48868993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getClassAssociationButton() {
if (classAssociationButton == null) {
classAssociationButton = new JToggleButton("Class Association",new ImageIcon("resources/images/association.png"));
classAssociationButton.setToolTipText("Class Association");
group.add(classAssociationButton);
classAssociationButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setSelectedButton(CLASS_ASSOCIATION);
}
});
}
return classAssociationButton;
}
COM: <s> this method initializes class association button </s>
|
funcom_train/41266317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Mngcco entity) {
EntityManagerHelper.log("saving Mngcco instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved mngcco entity </s>
|
funcom_train/7661208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructorNullPointerException8() {
try {
ThreadFactory f = null;
new ThreadPoolExecutor(1,2,LONG_DELAY_MS, TimeUnit.MILLISECONDS,new ArrayBlockingQueue<Runnable>(10),f,new NoOpREHandler());
shouldThrow();
}
catch (NullPointerException successdn8){}
}
COM: <s> constructor throws if thread factory is set top null </s>
|
funcom_train/23938790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Response doIsConnected(String name) throws ContainerException {
Response response = null;
if (commander != null) {
Request request = new Request();
request.setCommand(Command.ISCONNECTED);
request.addParameter("name", name);
response = commander.sendReceive(request);
} else {
throw new ContainerException("No Commander Defined.");
}
return response;
}
COM: <s> the container b is connected b operation sends a command to the </s>
|
funcom_train/1548931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void start() {
if (values == null) {
values = new ArrayList<E>(iterators.size());
valueSet = new BitSet(iterators.size());
for (int i = 0; i < iterators.size(); i++) {
values.add(null);
valueSet.clear(i);
}
}
}
COM: <s> initializes the collating state if it hasnt been already </s>
|
funcom_train/41612700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector randomExpansion(int maxDepth, int depth) {
int n = (int) (5.0 * Math.random());
char[] letters = new char[n + 2];
letters[0] = '"';
letters[n + 1] = '"';
for (int i = 0; i < n; i++) {
int c = (int) (26.0 * Math.random()) + 'a';
letters[i + 1] = (char) c;
}
Vector v = new Vector();
v.addElement(new String(letters));
return v;
}
COM: <s> create a set with one random quoted string with 2 to </s>
|
funcom_train/31801164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ForumHome getForumHome() throws Exception {
if(forumEjb == null) {
try {
// create and get the ejb
Context initial = new InitialContext();
Object objref = initial.lookup("java:/comp/env/ejb/Forum");
ForumHome home =
(ForumHome) PortableRemoteObject.narrow(objref, ForumHome.class);
/* Save this interface */
forumEjb = home;
} catch (Exception e) {
throw new ServletException(e);
} /* try */
} /* if */
return forumEjb;
} /* getForumHome() */
COM: <s> get home interface for forum ejb </s>
|
funcom_train/20894692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set getAspectsForState(String name) {
String[] splits = name.split("XX");
Set states = fsm.getStates();
Set res = new HashSet();
for (int i=0; i<splits.length; i++) {
if (splits[i].startsWith(aspectStatePrefix)) {
Iterator it = states.iterator();
while (it.hasNext()) {
State st = (State)it.next();
if (st.toString().compareTo(splits[i])==0) {
res.add(st);
}
}
}
}
return res;
}
COM: <s> the method gives the set of all aspect states that are </s>
|
funcom_train/37423280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User findUserByRemoteId(long pId, String pUrl) throws ClassNotFoundException, SQLException {
Vector tVect = this.findUserByQuery("select * from user where url = '" + Utility.Replace(pUrl) + "' and idLocal="+pId);
if (tVect.size() > 0)
return (User) tVect.firstElement();
else
return null;
}
COM: <s> finds the user in the database using the remote id and url </s>
|
funcom_train/10575599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace() {
if (createdBy != null && config != null) {
createdBy.printStackTrace(config.getLogWriter());
}
synchronized(this.traceList) {
Iterator<AbandonedTrace> it = this.traceList.iterator();
while (it.hasNext()) {
AbandonedTrace at = it.next();
at.printStackTrace();
}
}
}
COM: <s> prints a stack trace of the code that </s>
|
funcom_train/1749330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean populateData(String sTableName){
boolean result=true;
log.setModuleStep("populateData");
try {
CallableStatement cs = pParser.getConnection().prepareCall(
"{call LOADING.COPY_RECORDS(v_SourceData =>?)}" );
cs.setString(1, sTableName);
cs.execute();
} catch (SQLException ex) {
log.log(Log.ERROR,"SQLException:" + ex.getMessage());
result= false;
}
return result;
}
COM: <s> delete all records from the schema main table and copy into this table </s>
|
funcom_train/50505210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FinderDescriptor getFinder(String name) {
synchronized(finders) {
Iterator iter = finders.iterator();
while(iter.hasNext()) {
FinderDescriptor item = (FinderDescriptor) iter.next();
if(item.getSignature().equals(name)) {
return item;
}
}
return null;
}
}
COM: <s> gets the finder attribute of the entity bean info object </s>
|
funcom_train/18801791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddMonthsTo5Oct2003() {
final SerialDate d1 = SerialDate.createInstance(5, SerialDate.OCTOBER, 2003);
final SerialDate d2 = SerialDate.addMonths(2, d1);
assertEquals(d2, SerialDate.createInstance(5, SerialDate.DECEMBER, 2003));
}
COM: <s> a test case for a reported bug now fixed </s>
|
funcom_train/37831565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEmotion(final Collection<String> triggerStrings, final String npcAction) {
add(ConversationStates.IDLE, triggerStrings,
ConversationStates.IDLE, null, new NPCEmoteAction(npcAction));
add(ConversationStates.ATTENDING, triggerStrings,
ConversationStates.ATTENDING, null, new NPCEmoteAction(npcAction));
}
COM: <s> make npcs emotion </s>
|
funcom_train/24912626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XAConnection getXAConnection() throws SQLException {
// Comment out before public release:
/*
System.err.print("Executing " + getClass().getName()
+ ".getXAConnection()...");
*/
JDBCConnection connection =
(JDBCConnection) DriverManager.getConnection(url, user, password);
JDBCXAConnection xaConnection = new JDBCXAConnection(this, connection);
return xaConnection;
}
COM: <s> get new xaconnection connection to be managed by a connection manager </s>
|
funcom_train/26459160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHandler(Path path, SubHandler handler) {
if (LOG.isDebugEnabled()) {
LOG.debug("Removing handler " + handler + " with path " + path);
}
List handlers = getHandlersForPath(path);
handlers.remove(handler);
activeHandlers.remove(handler);
}
COM: <s> unregisters the given handler from the default delegating handler with the given path </s>
|
funcom_train/29554643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate(final IExecutionDetails<? extends SpreadBetTransaction> details) {
SpreadBetTransaction transaction = details.getTransaction();
if (transaction.getStopLoss() < transaction.getProduct().getMinStopLoss()) {
StringBuilder b = new StringBuilder();
b.append("The stop loss of the transaction ").append(transaction);
b.append(" is smaller than the minimum required.");
throw new ValidationException(b.toString());
}
}
COM: <s> validates the fact that the stop loss of a transaction is greater than </s>
|
funcom_train/3704275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initMessageProcessorChain() {
if (DEBUG == true) {
msgChain.add(MessageProcessor.DEBUG);
}
msgChain.add(new MessageProcessorIgnored());
msgChain.add(new MessageProcessorRequestLocation());
msgChain.add(new MessageProcessorKeepClose());
msgChain.add(new MessageProcessorShowMessage());
} // of method
COM: <s> specify what goes into the chain </s>
|
funcom_train/28308097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HostMessage sendHostMessage() {
/*HostMessage sendHostMessage = new HostMessage(getID(), this.bodyID,
arena.getBodyById(this.bodyID).getLocation());
try {
outputStream.writeObject(sendHostMessage);
}
catch (IOException e) {
e.printStackTrace();
}
return sendHostMessage;
//sendClientMessage
return null; //TODO implement*/
}
COM: <s> sends the a host message to all of the regiestered clients </s>
|
funcom_train/34080428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBestMoveLeastOpposite() {
int ocolor = 5000;
// int mcolor = 0;
String move = null;
Map<String,FanoronaLinkBoard> states = allPossibleBoardStates(new FanoronaLinkBoard(board), color);
for (String m : states.keySet()) {
FanoronaLinkBoard b = states.get(m);
// int nmc = countColor(b,color);
int noc = countColor(b,color.opposite());
if (noc < ocolor) {
move = m;
ocolor = noc;
}
}
move = move.trim();
System.out.format("Selected %s out of %d possible\n",move,states.size());
return move;
}
COM: <s> gets the best move least opposite </s>
|
funcom_train/8568823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RunStats run(Simulation sim) {
try {
RunStats stats = simulate(sim);
System.out.print('.');
return stats;
} catch (Throwable t) {
System.err
.println("Unable to run simulation " + sim + ", got error " + t);
t.printStackTrace(System.err);
return null;
}
}
COM: <s> runs the simulator on a single simulation returns its stats </s>
|
funcom_train/14500393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test09SigOkCertRevokedByUpdatingFile() throws Exception {
LOG.info("test09SigOkCertRevocedByUpdatingFile");
// Change the file to be one with CRL revoked
crlToUse.delete();
copyFile(crlWithCertRevoked, crlToUse);
// OK signature, revoked cert
assertCertRevoked();
}
COM: <s> changes the crl to a crl with the certificate revoked </s>
|
funcom_train/33842831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document getFileInfo(File file,Module mod) throws Exception {
String filepath = file.getAbsolutePath();
ByteArrayOutputStream out = new ByteArrayOutputStream();
OutputStreamWriter out2 = new OutputStreamWriter(out,"UTF-8");
PrintWriter pWriter = new PrintWriter(out2);
xh.setWriter(pWriter);
jhove.process(jhoveApp, mod, xh, filepath);
pWriter.close();
out2.close();
Document dom = saxBuilder.build(new StringReader(out.toString()));
out.close();
return dom;
}
COM: <s> invokes jhove against a file returning the dom representation of the jhove xml </s>
|
funcom_train/43890866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(File plugins, File testsuites) throws Exception {
Map pluginDTOs = XMLReader.loadPlugIns(TestData.file(this, "plugins"));
Map testSuiteDTOs = XMLReader.loadValidations(TestData.file(this, "validation"), pluginDTOs);
load(testSuiteDTOs, pluginDTOs);
}
COM: <s> load testsuites from provided directories </s>
|
funcom_train/8528178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStatusToProcessing() throws ServiceException {
logger.fine("updating file status to processing");
DbHelper dh = new DbHelper().open();
try {
dh.setFileStatus(this.mId, STATUS_PROCESSING);
} catch (SQLException se) {
logger.severe("SQL Exception:" + se.getMessage());
throw new ServiceException("SQL Exception:" + se.getMessage());
}
}
COM: <s> update status to processing </s>
|
funcom_train/1864039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readForkListenerPort() throws NumberFormatException, IOException, IllegalAccessException, InterruptedException {
int cnt = 0;
while (getStatusInfo() == null) {
Thread.sleep(200);
if (cnt > 30) {
throw new RuntimeException("Reading fork listener port timed out.");
}
cnt++;
}
if (! getStatusInfo().startsWith("port:")) {
throw new RuntimeException("no input port available");
}
return Integer.parseInt(getStatusInfo().substring(5));
}
COM: <s> retrieves io port from task link process </s>
|
funcom_train/6268183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeader(Header sipHeader) {
// Content length is never stored. Just computed.
SIPHeader sh = (SIPHeader) sipHeader;
try {
if (sipHeader instanceof ViaHeader) {
attachHeader(sh, false, true);
} else {
attachHeader(sh, false, false);
}
} catch (SIPDuplicateHeaderException ex) {
try {
if (sipHeader instanceof ContentLength) {
ContentLength cl = (ContentLength) sipHeader;
contentLengthHeader.setContentLength(cl.getContentLength());
}
} catch (InvalidArgumentException e) {
}
}
}
COM: <s> add a sip header </s>
|
funcom_train/46261253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTransactionValid() {
boolean isValid = true;
if (request.transactionId != (transactionId - 1)) {
System.out.println("Error 201 : Invalid transaction ID");
isValid = false;
errorCode = 201;
} else if (!isMessageFormatValid()) {
System.out.println("Error 204: Wrong message format");
isValid = false;
errorCode = 204;
}
return isValid;
}
COM: <s> check if a requested transaction is valid </s>
|
funcom_train/36110311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(File f) {
try {
FileSeekableStream s = new FileSeekableStream(f);
load(s);
imgname = f.toString();
} catch (FileNotFoundException e) {
JOptionPane.showMessageDialog(null, "Error: could not find file " + f, "File not Found", JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> loads the image from a file </s>
|
funcom_train/41573575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if (!(o instanceof JpPlan) || this == o) return 0;
JpPlan otherPlan = (JpPlan)o;
if (getPreSortOrder() < otherPlan.getPreSortOrder()) return -1;
if (getPreSortOrder() > otherPlan.getPreSortOrder()) return +1;
return 0;
}
COM: <s> sorting is based purely on the advice dec </s>
|
funcom_train/46759933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApplicationControlPrefModel getApplicationControlPref(final long applicationControlPrefId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SecurityData.getApplicationControlPref(applicationControlPrefId, chain, call);
}}; return (ApplicationControlPrefModel) call(method, call);
}
COM: <s> same transaction return the single application control pref model for the primary key </s>
|
funcom_train/37611421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendResponse(Message message) throws CommunicationException {
if (m_responder == null) {
throw new CommunicationException("Response sender not set");
}
if (m_responseSent) {
throw new CommunicationException("One response message only");
}
m_responseSent = true;
m_responder.send(message);
}
COM: <s> send the response </s>
|
funcom_train/8367817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand3() {
if (okCommand3 == null) {//GEN-END:|111-getter|0|111-preInit
// write pre-init user code here
okCommand3 = new Command("OK", Command.OK, 0);//GEN-LINE:|111-getter|1|111-postInit
// write post-init user code here
}//GEN-BEGIN:|111-getter|2|
return okCommand3;
}
COM: <s> returns an initiliazed instance of ok command3 component </s>
|
funcom_train/51100689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataDomain getDomain() {
int size = this.dataDomains.size();
if (size == 0) {
return null;
}
else if (size == 1) {
return (DataDomain) this.dataDomains.values().iterator().next();
}
else {
throw new CayenneRuntimeException(
"More than one domain is configured; use 'getDomain(String name)' instead.");
}
}
COM: <s> returns default domain of this configuration </s>
|
funcom_train/1613025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addORComparison(Operator op, ComparableOperand op1, ComparableOperand op2, Class type){
expressions[current] = facade.addORComparison(expressions[current], createComparison(op, op1, op2, type));
//expressions[current] = facade.addORComparison(expressions[current], comparison);
}
COM: <s> adds an or comparison </s>
|
funcom_train/39535344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshTestTable(LinkedList<TestSimulationTagValues> testSimulationValues){
component.removeAll();
if(testSimulationValues!=null){
//the model of the table
TestTableModel tableModel=new TestTableModel(testSimulationValues);
//creating the table
table=new TestTable(tableModel, testSimulationValues);
component.add(new JScrollPane(table));
component.revalidate();
}
}
COM: <s> creates a test table </s>
|
funcom_train/13487441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int walkTree(TreeNodeCallback<T> callbackHandler) {
int code = callbackHandler.handleTreeNode(this);
if (code != TreeNodeCallback.CONTINUE) {
return code;
}
for (TreeNode<T> child : children) {
code = child.walkTree(callbackHandler);
if (code >= TreeNodeCallback.CONTINUE_PARENT) {
return code;
}
}
return code;
}
COM: <s> walk through subtree of this node </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.