__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/34565113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishText() throws IOException {
if(tb.size() != 0) {
builder.text(tb);
tb.reset();
}
for(int i = 0; i < ns.size; i++) builder.startNS(ns.key[i], ns.val[i]);
ns.reset();
}
COM: <s> checks if a text node has to be written </s>
|
funcom_train/27912741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpectedJavaScriptAlert(String message) {
try {
getTestingEngine().setExpectedJavaScriptAlert(
new JavascriptAlert[] { new JavascriptAlert(message) });
} catch (ExpectedJavascriptAlertException e) {
fail("You previously tell that alert with message ["
+ e.getAlertMessage()
+ "] was expected, but nothing appeared.");
}
}
COM: <s> tell that the given alert box is expected </s>
|
funcom_train/50849963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkModel() {
List<SpacecraftState> orbitalPoints = getOrbitalPoints();
if (null == orbitalPoints) {
throw new IllegalStateException("Orbital points could not be created.");
}
if (orbitalPoints.isEmpty()) {
throw new IllegalStateException("Orbital points have zero count.");
}
}
COM: <s> tests whether everything works </s>
|
funcom_train/29287845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createOrForkName(Composite parent, String name) {
// Or Fork Name
final Label label = new Label(parent, SWT.NONE);
label.setText(Messages.getString("org.isistan.flabot.edit.ucmeditor.dialogs.EditOrForkConditionsDialog.orForkName")); //$NON-NLS-1$
orForkName = new Text(parent, SWT.BORDER);
orForkName.setText(name);
orForkName.setLayoutData(new GridData(
GridData.VERTICAL_ALIGN_BEGINNING |
GridData.FILL_HORIZONTAL));
}
COM: <s> creates a text box for the or fork name </s>
|
funcom_train/49756887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void upbError(String theMessage) {
synchronized(messageBuffer) {
messageBuffer.setLength(0);
messageBuffer.append(dateTimeFormatter.format(new Date()));
messageBuffer.append(" *ERROR* ");
messageBuffer.append(theMessage);
System.err.println(messageBuffer);
}
}
COM: <s> internal to upb4 java error logging primative </s>
|
funcom_train/35319056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shape(char[] text, int start, int count) {
checkParams(text, start, count);
if (isContextual()) {
if (rangeSet == null) {
shapeContextually(text, start, count, key);
} else {
shapeContextually(text, start, count, shapingRange);
}
} else {
shapeNonContextually(text, start, count);
}
}
COM: <s> converts the digits in the text that occur between start and </s>
|
funcom_train/36205134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String retrieveDataImageFolder() throws BasicException {
IFacade facade = ModelService.getFacade();
SystemParameter systemParameter = (SystemParameter) facade.load(new SystemParameter());
String folder = null;
if(systemParameter != null){
folder = systemParameter.getDataImageFolder();
}
if(StringUtils.isEmpty(folder)){
throw BasicException.errorHandling("Data image folder don't exist.",
"msgErrorValidateApprovalDontExistFolder", StringHelper.EMPTY_STRING_VECTOR,log);
}
return folder;
}
COM: <s> retrieve data image folder and verify if this folder exist </s>
|
funcom_train/3804562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double distance(double[] a, double[] b) {
if (a.length != b.length) {
throw new IllegalArgumentException("a and b must have same length (" + a.length + " ≠ " + b.length + ")");
}
double dsq = 0;
for (int i = 0; i < a.length; i++) {
double d = a[i] - b[i];
dsq += d * d;
}
return Math.sqrt(dsq);
}
COM: <s> compute the distance between points a and b </s>
|
funcom_train/37836656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void draw(final Graphics g, final int scale, final Color color) {
final int rx = worldToCanvas(x, scale);
final int ry = worldToCanvas(y, scale);
final int rwidth = width * scale;
final int rheight = height * scale;
g.setColor(color);
g.fillRect(rx, ry, rwidth, rheight);
}
COM: <s> draw the code rpentity code in specified color </s>
|
funcom_train/45698774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void killDevice(String device) {
if (!configured) {
System.err.println("not configured, terminate.");
System.exit(0);
}
Command kill = new Command();
kill.add(action, ZephyrOpen.kill);
kill.add(deviceName, device);
kill.send();
}
COM: <s> send a kill command to the given device name </s>
|
funcom_train/27678324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPixels() {
if (imp==null)
return;
ImageProcessor ip = imp.getProcessor();
Font font = new Font(name, style, size);
ip.setFont(font);
ip.setAntialiasedText(true);
FontMetrics metrics = ip.getFontMetrics();
int fontHeight = metrics.getHeight();
int descent = metrics.getDescent();
int i = 0;
int yy = 0;
while (i<MAX_LINES && theText[i]!=null) {
ip.drawString(theText[i], x, y+yy+fontHeight);
i++;
yy += fontHeight;
}
}
COM: <s> renders the text on the image </s>
|
funcom_train/19700237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initContentPanel() {
formatContentPanel();
contentPanel.add(logo);
contentPanel.add(new HTML("<br />"));
contentPanel.add(title);
contentPanel.add(new HTML("<br />"));
contentPanel.add(description);
contentPanel.add(new HTML("<br />"));
contentPanel.add(copyright);
contentPanel.add(new HTML("<br />"));
contentPanel.add(url);
contentPanel.add(new HTML("<br />"));
contentPanel.add(buttonPanel);
}
COM: <s> initializes the content panel with the actual content </s>
|
funcom_train/28371531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setResizable(false);
jFrame.setJMenuBar(getJJMenuBar());
jFrame.setSize(266, 147);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("ASDEL playr");
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/19322079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkMinDegree(int value) {
if (value < ROLE_CARDINALITY_INFINITY) {
return false;
} else if (value == ROLE_CARDINALITY_INFINITY) {
if (minDegree != ROLE_CARDINALITY_INFINITY)
return false;
} else {
if (minDegree != ROLE_CARDINALITY_INFINITY && value < minDegree)
return false;
}
return true;
}
COM: <s> returns a boolean to specify if given value is greater or equal than </s>
|
funcom_train/12759956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getEventClassNameFor(String rootElementName) {
String className = (String) eventMap.get(rootElementName.toLowerCase());
if (className == null) {
debug(rootElementName + " not in IOM event Map - checking CSI");
className = PropertyCatalog.getProperty(rootElementName
.toLowerCase());
if (className == null) {
debug(rootElementName + " not in IOM event Map or CSI");
className = "com.tradewellsystems.event.enyware."
+ rootElementName;
}
}
return className;
}
COM: <s> tries to map the specified string to an eny ware event </s>
|
funcom_train/40887720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onResume () {
if (mEGLConfigChooser == null) {
mEGLConfigChooser = new SimpleEGLConfigChooser(true);
}
mGLThread = new GLThread(mRenderer);
mGLThread.start();
mGLThread.setRenderMode(mRenderMode);
if (mHasSurface) {
mGLThread.surfaceCreated();
}
if (mSurfaceWidth > 0 && mSurfaceHeight > 0) {
mGLThread.onWindowResize(mSurfaceWidth, mSurfaceHeight);
}
mGLThread.onResume();
}
COM: <s> inform the view that the activity is resumed </s>
|
funcom_train/26536192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void thaw(Collection dataNames) {
synchronized (itemsToThaw) {
synchronized (itemsToFreeze) {
for (Iterator iter = dataNames.iterator(); iter.hasNext();) {
String dataName = (String) iter.next();
if (itemsToFreeze.remove(dataName) == false)
itemsToThaw.add(dataName);
}
}
}
stopWaitingForWork();
}
COM: <s> register the named data elements for thawing </s>
|
funcom_train/4519469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int tabForCoordinate(JTabbedPane pane, int x, int y) {
MyTabPane stabPane = (MyTabPane) tabPane;
int visibleCount = stabPane.getVisibleCount();
int visibleStartIndex = stabPane.getVisibleStartIndex();
for (int i = 0, index = visibleStartIndex; i < visibleCount; i++, index++) {
if (rects[index].contains(x, y)) {
return index;
}
}
return -1;
}
COM: <s> returns the tab index which intersects the specified point in the </s>
|
funcom_train/37864905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("Admin".equals(portName)) {
setAdminEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/31046903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCharacterOffset() {
if (fCurrentEntity != null) {
if (fCurrentEntity.isExternal()) {
return fCurrentEntity.baseCharOffset + (fCurrentEntity.position - fCurrentEntity.startPosition);
}
else {
// ask current entity to find appropriate character offset
return fCurrentEntity.getCharacterOffset();
}
}
return -1;
} // getCharacterOffset():int
COM: <s> returns the character offset where the current document event ends </s>
|
funcom_train/43253861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readWriteSchema(File schemaFile,File outputDir) throws LXBException {
SchemaData sd = readSchema(schemaFile);
try {
File outputFile = new File(outputDir,schemaFile.getName()+".ser");
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(outputFile));
oos.writeObject(sd);
oos.close();
} catch (IOException e) {
throw new LXBException("Cannot write schemas data resource",e);
}
}
COM: <s> reads the schemas file and produce the schema data object resource </s>
|
funcom_train/10860740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double distance(int doc, DocValues dv1, DocValues dv2) {
//Handle some special cases:
double[] vals1 = new double[source1.dimension()];
double[] vals2 = new double[source1.dimension()];
dv1.doubleVal(doc, vals1);
dv2.doubleVal(doc, vals2);
return DistanceUtils.vectorDistance(vals1, vals2, power, oneOverPower);
}
COM: <s> calculate the distance </s>
|
funcom_train/45827797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean appendAttributes(StringBuilder buff, boolean isPrefixed) {
buff.append(super.appendAttributes(buff, isPrefixed) ? ", " : " ");
buff.append("username=").append(username).append(", uid=").append(uid)
.append(", gid=").append(gid).append(", homeDirectory=")
.append(homeDirectory).append(", shell=").append(shell);
return true;
}
COM: <s> append attributes for debugging purposes </s>
|
funcom_train/48528117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void broadcastAll() {
BroadcastLeafSet bls = new BroadcastLeafSet(localHandle, leafSet,
BroadcastLeafSet.JoinAdvertise, 0);
NodeSet set = leafSet.neighborSet(Integer.MAX_VALUE);
for (int i = 1; i < set.size(); i++)
thePastryNode.send(set.get(i), bls,null, options);
}
COM: <s> broadcast the leaf set to all members of the local leaf set </s>
|
funcom_train/35831690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
try {
checkForInActiveGameStatus();
if (state != START_GAME) {
throw new IllegalStateException("Cannot start an already started game!");
}
board = new Board(eventHandler);
currPlayer = Constants.PLAYER_1;
status = ACTIVE;
state = GET_P1_NAME;
eventHandler.promptPlayerName("Enter Player 1's name:");
} catch (IllegalStateException ise) {
eventHandler.displayErrorMessage(ise.getMessage());
}
}
COM: <s> starts a new game </s>
|
funcom_train/49824076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pushResults(RowDataAcceptor acceptor, int startRow, String[] data) {
String[][] rows = new String[data.length][];
for (int i = 0, n = rows.length; i < n; i++) {
String row = data[i];
rows[i] = row.split("\t");
}
acceptor.accept(startRow, rows);
}
COM: <s> pushes results into table </s>
|
funcom_train/17728980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printHelp(PrintStream ps) {
ps.println();
ps.println("Sets the test environment to point to.");
ps.println("Usage : setenv <environment>");
ps.println("Options: oracle - sample oracle env");
ps.println(" p6spy - sample p6spy env");
ps.println(" hdsq1 - sample hsql env");
ps.println();
}
COM: <s> prints help on this command to the console </s>
|
funcom_train/46760123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final TranslationModel translation, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
Long translationId = store(translation, chain, call);
chain.execute();
// return primary key
return translationId;
} catch (Exception ex) {
Log.exception(ex);
Log.error(translation);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> save the translation model model creating a new translation or updating existing rows </s>
|
funcom_train/41593962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDisplayNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CD_displayName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CD_displayName_feature", "_UI_CD_type"),
V3Package.eINSTANCE.getCD_DisplayName(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the display name feature </s>
|
funcom_train/25217629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(PrintWriter w, String prefix) {
String[] keys = map.keySet().toArray(new String[map.size()]);
Arrays.sort(keys);
for (String key : keys) {
map.get(key).print(w, prefix);
}
}
COM: <s> print this net </s>
|
funcom_train/29706720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void highlightTask( Object highlightObject ) {
if ( highlightObject instanceof Task ) {
try {
application.highlightTask( ( (Task) highlightObject ).getId(), 3 );
} catch ( TaskNotActiveException e ) {}
} else if ( highlightObject instanceof Delegate ) {
( (Delegate) highlightObject ).highlightDelegate( 3 );
}
}
COM: <s> highlights controls in users application </s>
|
funcom_train/2949633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj instanceof Viewport) {
return scaleX == ((Viewport) obj).getScaleX() &&
scaleY == ((Viewport) obj).getScaleY() &&
transX == ((Viewport) obj).getTransX() &&
transY == ((Viewport) obj).getTransY();
} else {
return false;
}
}
COM: <s> indicates whether some other object is equal to this one </s>
|
funcom_train/25716705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void giveReinforcements(Player player) {
int numTerrs = 0;
int bonuses = 0;
for (Territory t : gameState.getTerritoryList()) {
if (t.getOwner().equals(player))
numTerrs++;
}
for (Continent c : gameState.getContinents()) {
if (playerOwnsAll(c, player)) {
bonuses += c.getMenPerTurn();
}
}
if (numTerrs / 3 < 3) {
player.setForcesLeft(3 + bonuses);
} else {
player.setForcesLeft(numTerrs / 3 + bonuses);
}
}
COM: <s> gives reinforcements to players </s>
|
funcom_train/35585865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getMsgItem() {
if (msgItem == null) {//GEN-END:|30-getter|0|30-preInit
// write pre-init user code here
msgItem = new StringItem("", "");//GEN-LINE:|30-getter|1|30-postInit
// write post-init user code here
}//GEN-BEGIN:|30-getter|2|
return msgItem;
}
COM: <s> returns an initiliazed instance of msg item component </s>
|
funcom_train/11377748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopTaskTracker(int id) {
TaskTrackerRunner tracker = taskTrackerList.remove(id);
tracker.shutdown();
Thread thread = taskTrackerThreadList.remove(id);
try {
thread.join();
// This will break the wait until idle loop
tracker.isDead = true;
--numTaskTrackers;
} catch (InterruptedException ex) {
LOG.error("Problem waiting for task tracker to finish", ex);
}
}
COM: <s> kill the tasktracker </s>
|
funcom_train/31208255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSchemaName(int column) throws SQLException {
try {
if(Trace.isDetailed()) Trace.trace(getId(),column);
// checkColumnIndex already calls checkClosed
rs.checkColumnIndex(column);
return "";
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> returns the schema name </s>
|
funcom_train/33058941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void procDBPass(String line,String useLine,DB db) throws Exception {
int start = line.indexOf("<password>") + 10;
int end = line.indexOf("</password>");
if (! connLoaded)
db.setPassword(useLine.substring(start,end));
}
COM: <s> retrieves the password for the report </s>
|
funcom_train/40877820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enterFailSafeKey(String keyOwner) throws NotYetException, SQLException {
if (!this.canFailSafeKeyBeEntered())
throw new NotYetException();
else {
this.reset();
bot.sendMessage(bot.getCountdownChannel(), keyOwner + Colors.GREEN + " has entered the FailSafe key and saved the world.");
bot.addUserPush(keyOwner, new java.util.Date().toString());
bot.addFailSafeToDB();
this.reset();
}
}
COM: <s> enters the fail safe key </s>
|
funcom_train/13690392 | /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(new BorderLayout());
jContentPane.add(getNordPanel(), java.awt.BorderLayout.NORTH);
jContentPane.add(getCenterSplitPane(), java.awt.BorderLayout.CENTER);
jContentPane.add(getSuedPanel(), java.awt.BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> initializes j content pane </s>
|
funcom_train/19410971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDtStartTimezone() throws ParseException {
DtStart dtStart = new DtStart(timezone);
dtStart.setValue(new DateTime().toString());
assertEquals(timezone, dtStart.getTimeZone());
// initialising with DATE value should reset timezone..
dtStart.setDate(new Date());
assertNull(dtStart.getTimeZone());
}
COM: <s> unit tests for timezone constructor </s>
|
funcom_train/44146728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInputPrefix(String prefix){
file = prefix+" "+file.toLowerCase();
files = prefix+" "+files.toLowerCase();
file_s = prefix+" "+file_s.toLowerCase();
directory = prefix+" "+directory.toLowerCase();
filelist = prefix+" "+filelist.toLowerCase();
resetType();
}
COM: <s> prepend a given prefix string to all the entries in the type chooser </s>
|
funcom_train/42977635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCategoriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ConstraintDescription_categories_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ConstraintDescription_categories_feature", "_UI_ConstraintDescription_type"),
ConstraintPackage.Literals.CONSTRAINT_DESCRIPTION__CATEGORIES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the categories feature </s>
|
funcom_train/42089398 | /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_EStringToStringMapEntry_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EStringToStringMapEntry_value_feature", "_UI_EStringToStringMapEntry_type"),
DecModelPackage.Literals.ESTRING_TO_STRING_MAP_ENTRY__VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/3904365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
super.paintComponent(g);
if(_isSelected && isEnabled()) {
Graphics2D g2d = (Graphics2D)g;
GradientPaint gradient =
new GradientPaint(0, 0, _color, (int)(getWidth() * .7), getHeight(), getBackground());
g2d.setPaint(gradient);
g2d.fillRect(0, 0, getWidth(), getHeight());
}
}
COM: <s> paint the bar </s>
|
funcom_train/19150040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int column) {
Object id = null;
// This test is to cover the case when
// getColumnCount has been subclassed by mistake ...
if (column < columnIdentifiers.size()) {
id = columnIdentifiers.get(column);
}
return (id == null) ? super.getColumnName(column) : id.toString();
}
COM: <s> returns the column name </s>
|
funcom_train/12190489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Session createNewSession() throws Exception {
Session session = (Session) objectFactory.makeObject();
active.add(session);
if (!validateIfRequired(session)) {
// If a new session is invalid we have a problem, so throw
// an exception and log a fatal error.
final String key = "cannot-create-session";
LOGGER.fatal(key);
throw new SessionException(EXCEPTION_LOCALIZER.format(key));
}
return session;
}
COM: <s> create a new active session validating it if validation on borrowing is </s>
|
funcom_train/39913378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetEh15() {
System.out.println("setEh15");
TextField tf = null;
Page1 instance = new Page1();
instance.setEh15(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set eh15 method of class timesheetmanagement </s>
|
funcom_train/14025840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bind(BindDestination dest, String destProperty, BindSource src, String srcProperty) {
// Store the bound destination property.
_bindings.put(destProperty, new SourceEntry(src, srcProperty));
// Start observing the source object.
src.addBindDestination(srcProperty, dest, destProperty);
}
COM: <s> performs a default implementation of the bind destination </s>
|
funcom_train/12563705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long doGetMediaTime() {
long mediaTime;
if (getState() < STARTED) {
mediaTime = mediaTimeOffset;
} else {
mediaTime = ((System.currentTimeMillis() - startTime) * 1000) + mediaTimeOffset;
mediaTime *= (rateControl.getRate() / 100000.0);
}
if (mediaTime >= duration) {
return duration;
}
return mediaTime;
}
COM: <s> retrieves the current media time </s>
|
funcom_train/23969638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDatabaseName(int index, boolean asconfigured) {
if (asconfigured) {
return serverProperties.getProperty(ServerProperties.sc_key_dbname
+ "." + index);
} else if (getState() == ServerConstants.SERVER_STATE_ONLINE) {
return (dbAlias == null || index < 0 || index >= dbAlias.length)
? null
: dbAlias[index];
} else {
return null;
}
}
COM: <s> retrieves the url alias network name of the ith database </s>
|
funcom_train/21826880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addEntry(AuctionEntry aeNew) {
if(aeNew == null) return true;
if(manageDeleted(aeNew)) return false;
boolean inserted = (_tSort.insert(aeNew) != -1);
if (inserted) {
AuctionServerManager.getInstance().add_entry(aeNew);
return true;
}
ErrorManagement.logMessage("JBidWatch: Bad auction entry, cannot add!");
return false;
}
COM: <s> add an auction entry that has already been created denying </s>
|
funcom_train/43691185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildList(Enumeration e) {
for (int i = 0; e.hasMoreElements() ; i++) {
ListDataEvent added =
new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, i, i + 1);
visible.add((FileNode) e.nextElement());
fireListDataEvent(added);
}
}
COM: <s> rebuilds the list from an enumeration and fires an </s>
|
funcom_train/3613340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnknownDirectory() {
files.add("directory/foo.txt");
fcf = new FileCollectionFormatter(files);
try {
fcf.getFiles("nonexistingDirectory/");
fail("should have thrown exception");
} catch (final NoSuchElementException e) {
// do nothing
}
}
COM: <s> method test unknown directory </s>
|
funcom_train/32061971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getFuelCapacity() {
float fuelcapacity = 0;
// add up all the fuel in the fuel cells
for (Component c : components) {
if (c instanceof StorageComponent ) {
if (c.getTechnology().getType() == TechnologyType.Fuelcell)
fuelcapacity +=
((StorageComponent)(c)).getStorageCapacity();
}
}
return fuelcapacity;
}
COM: <s> returns the amount of fuel the starship can carry when using all </s>
|
funcom_train/50189154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void atestRunTests4() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {}
long delta = exampleStreamSourceAndSAXResult(xmlId);
log.info("1. Stream2SAX Transformation length : " + delta + " ms");
delta = exampleStreamSourceAndSAXResult(xmlId);
log.info("2. Stream2SAX Transformation length : " + delta + " ms");
}
COM: <s> show the identity transformation with stream source and saxresult </s>
|
funcom_train/15620982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showCreateStatement() {
if (generatedSQLDefinitions != null) {
for (int i = 0; i < generatedSQLDefinitions.length; i++) {
this.doPrint(Print.OPERATOR, this.getName()
+ " generated: " + this.generatedSQLDefinitions[i]);
}
}
}
COM: <s> print method for the generated sql statement </s>
|
funcom_train/9364859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startTracking(KeyEvent event, Object target) {
if (event.getAction() != ACTION_DOWN) {
throw new IllegalArgumentException(
"Can only start tracking on a down event");
}
if (DEBUG) Log.v(TAG, "Start trackingt in " + target + ": " + this);
mDownKeyCode = event.getKeyCode();
mDownTarget = target;
}
COM: <s> start tracking the key code associated with the given event </s>
|
funcom_train/11514564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testSingletonPatternInSerialization() {
final Object[] singletones = new Object[] {
ExceptionPredicate.INSTANCE,
FalsePredicate.INSTANCE,
NotNullPredicate.INSTANCE,
NullPredicate.INSTANCE,
TruePredicate.INSTANCE
};
for (final Object original : singletones) {
TestUtils.assertSameAfterSerialization(
"Singletone patern broken for " + original.getClass(),
original
);
}
}
COM: <s> test that all predicate singletones hold singleton pattern in </s>
|
funcom_train/45134110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getAttributeInt(String attributeName) throws XMLInvalidTypeException, NullPointerException {
int value;
try {
value = Integer.parseInt(getAttributeString(attributeName));
}
catch (NullPointerException npe){
throw npe;
}
catch (Exception e){
throw new XMLInvalidTypeException("Attribute not an integer");
}
return value;
}
COM: <s> returns the integer value of the given attribute of the root tag </s>
|
funcom_train/49050875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getLangstringValue(List list, String lang) {
LangstringType langstring;
for (Iterator i = list.iterator(); i.hasNext(); ) {
langstring = (LangstringType) i.next();
if (langstring.getLang().equals(lang)) {
return langstring.getValue();
}
}
return null;
}
COM: <s> get code langstring code value for the given code lang code </s>
|
funcom_train/14461014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void decCRef(int idx) {
if (idx >= 0 && idx < cRef.size()) {
int cr= ((Integer)cRef.get(idx)).intValue() - 1;
cRef.remove(idx);
cRef.add(idx, new Integer(cr));
}
else
Logger.logErr("Msodrawinggroup: error encountered when decrementing Reference Count");
}
COM: <s> decrement the reference count for the specific image </s>
|
funcom_train/4509781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initClearspaceFieldsId(Element fields) {
List<Element> fieldsList = fields.elements("return");
for (Element field : fieldsList) {
String fieldName = field.elementText("name");
long fieldID = Long.valueOf(field.elementText("ID"));
ClearspaceField f = ClearspaceField.valueOfName(fieldName);
if (f != null) {
f.setId(fieldID);
}
}
}
COM: <s> init the fields of clearspace based on they name </s>
|
funcom_train/34339869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getPedido2() {
if (Pedido2 == null) {//GEN-END:|39-getter|0|39-preInit
// write pre-init user code here
Pedido2 = new TextField("Pedido2", null, 32, TextField.ANY);//GEN-LINE:|39-getter|1|39-postInit
// write post-init user code here
}//GEN-BEGIN:|39-getter|2|
return Pedido2;
}
COM: <s> returns an initiliazed instance of pedido2 component </s>
|
funcom_train/18790436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWorkFaxNumber(PhoneNumber workFaxNumber) {
if (((this.workFaxNumber != null) && !this.workFaxNumber.equals(workFaxNumber)) ||
((this.workFaxNumber == null) && (workFaxNumber != null))) {
this.workFaxNumber = workFaxNumber;
setModified(true);
}
}
COM: <s> sets the new value of the simple property work fax number </s>
|
funcom_train/41517215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mib load(String name) throws IOException, MibLoaderException {
MibSource src;
Mib mib;
mib = getMib(name);
if (mib == null) {
src = locate(name);
if (src == null) {
throw new FileNotFoundException("couldn't locate MIB: '" +
name + "'");
}
mib = load(src);
} else {
mib.setLoaded(true);
}
return mib;
}
COM: <s> loads a mib file with the specified base name </s>
|
funcom_train/15723052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getThreadCount(String size) {
switch (getThreadModel()) {
case SINGLE:
return 1;
case FIXED:
return getThreadFactor(size);
case PER_CPU: {
return threadCountOverride != 0 ? threadCountOverride : getThreadFactor(size) * Runtime.getRuntime().availableProcessors();
}
default:
throw new RuntimeException("Unknown thread model");
}
}
COM: <s> determine the multi threading level of this benchmark size </s>
|
funcom_train/35173230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel createRightGridLabels() {
JPanel labels = new JPanel();
labels.setLayout(new BorderLayout());
labels.setPreferredSize(new Dimension(40, GRAPHPANEL.getWidth() - 100));
Dimension lsize = new Dimension(40, 20);
JLabel h = new JLabel(GRID_LABEL_HEALTHY);
h.setFont(plaintext);
h.setPreferredSize(lsize);
labels.add(h, BorderLayout.NORTH);
JLabel d = new JLabel(GRID_LABEL_DEAD);
d.setFont(plaintext);
d.setPreferredSize(lsize);
labels.add(d, BorderLayout.SOUTH);
return labels;
}
COM: <s> method is responsible for creating the grid labels on the right for </s>
|
funcom_train/31294004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitAudioPlaying() {
synchronized (audioPlayedLock) {
if (isBusy()) {
try {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("waiting for end of audio");
}
audioPlayedLock.wait();
} catch (InterruptedException e) {
return;
}
}
}
}
COM: <s> waits until the previous audio playing has completed </s>
|
funcom_train/12547909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean ends(int level, int group) {
try {
if (level == bottom.length - 1)
return true; // Everything ends at last.
return !Arrays.equals(bottom[level][group], top[level + 1][group]);
} catch (ArrayIndexOutOfBoundsException e) {
throw new IllegalArgumentException("Level " + level + ", group "
+ group + " is out of range!");
}
}
COM: <s> returns if a group ends on a particular level </s>
|
funcom_train/24364301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String getCASstring(int STRING_TYPE, boolean symbolic) {
int oldPrintForm = kernel.getCASPrintForm();
kernel.setCASPrintForm(STRING_TYPE);
kernel.setTemporaryMaximumPrintAccuracy();
String ret = printCASstring(symbolic);
kernel.restorePrintAccuracy();
kernel.setCASPrintForm(oldPrintForm);
return ret;
}
COM: <s> returns a string representation of this node that can be used with </s>
|
funcom_train/11024196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimpleDoublePropertyAndDoubleValue() {
TestBean testBean = new TestBean();
new BeanPropertyValueChangeClosure("doubleProperty", expectedDoubleValue).execute(testBean);
assertTrue(expectedDoubleValue.doubleValue() == testBean.getDoubleProperty());
}
COM: <s> test execute with simple double property and double value </s>
|
funcom_train/23262075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unsetUser() {
this.user = new Contact();
northWidget.disableActions();
eastWidget.disableActions();
homePanel.getLogin().populateNameListBox();
homePanel.getLogin().setupNameDetailPanel( "", "", false );
}
COM: <s> removes any current user assigned to this session </s>
|
funcom_train/48190244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(PosFailMsg entity) {
LogUtil.log("deleting PosFailMsg instance", Level.INFO, null);
try {
entity = entityManager.getReference(PosFailMsg.class, entity
.getPosfailid());
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 pos fail msg entity </s>
|
funcom_train/51576043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateConnectionMenu() {
if (useSwingMenu) {
final JMainMenu swingMenu = JMainMenu.getInstance();
swingMenu.updateConnectionMenu(this);
} else {
// muckMainFrame.setMenuBar(tWMenuBar);
final anecho.JamochaMUD.legacy.MainMenu mainMenu = anecho.JamochaMUD.legacy.MainMenu.getInstance();
mainMenu.updateConnectionMenu();
}
}
COM: <s> update the connection menu with the proper </s>
|
funcom_train/2957244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flip(int fromIndex, int toIndex) {
checkRange(fromIndex, toIndex);
if (fromIndex == toIndex)
return;
long firstWordMask = WORD_MASK << fromIndex;
long lastWordMask = WORD_MASK >>> -toIndex;
long tmp = words.get();
tmp ^= (firstWordMask & lastWordMask);
words.set(tmp);
}
COM: <s> sets each bit from the specified tt from index tt inclusive to the </s>
|
funcom_train/23393902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addByActorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Action_byActor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Action_byActor_feature", "_UI_Action_type"),
ActionPackage.Literals.ACTION__BY_ACTOR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the by actor feature </s>
|
funcom_train/47985692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerBeanPrototypes() {
// TODO: add additionally needed packet types here (Chat, Buddy-List etc.)
ViewportBean viewportBeanPrototype = new ViewportBean(0);
Parceller.getInstance().registerXMPPBean(viewportBeanPrototype);
AwarenessEventBean awarenessEventBeanPrototype = new AwarenessEventBean();
Parceller.getInstance().registerXMPPBean(awarenessEventBeanPrototype);
}
COM: <s> registers all necessary bean prototypes at the xmpp </s>
|
funcom_train/3581470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeVertex(V vertex) {
for(Iterator<E> iterator=edges.iterator(); iterator.hasNext(); ) {
Edge<V> edge = iterator.next();
if(edge.getEndpoints().contains(vertex)) {
iterator.remove();
}
}
return vertices.remove(vertex);
}
COM: <s> remove the vertex </s>
|
funcom_train/42612428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serachduplicate(){
synchronized (datalist) {
for (AgentData a : datalist) {
logger.finer("Inspect: "+a.toString() );
for( AgentData b : datalist){
if( a.equals(b) && a.compareTo(b)<0 ){
logger.finer("Agent is smaller then "+b);
a.setSelect(true);
}
}
}
}
this.fireTableDataChanged();
}
COM: <s> mark all agent are replaced by new version in depot </s>
|
funcom_train/23329267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Process getValid(String str) {
int i = 0;
processing:
while (true) {
if (i <= data.length) {
if (data[i].Title.equals(str)) {
if (data[i].state != State.Stopped) {
return (Process) data[i];
}
}
} else {
if (i > data.length) {
i = 0;
} else {
i++;
}
}
//THIS CRASHES SERVER! HAHA
//THE STRING WAS INCORRECT
//PLEASE USE THE METHOD Contains(STRING) FIRST
}
}
COM: <s> gets the process for the given string thats currently not stopped </s>
|
funcom_train/48415530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void systemStore(Snip snip) {
//Logger.debug("systemStore - "+snip.getName());
Application app = Application.get();
long start = app.start();
storage.storageStore(snip);
indexer.reIndex(snip);
app.stop(start, "systemStore - " + snip.getName());
return;
}
COM: <s> method with with wich the system can store snips </s>
|
funcom_train/31056727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseAgentIcon arrangeRemoveAgent( Agent agent ) {
if( agentIcons.containsKey( agent ) ) {
BaseAgentIcon a = (BaseAgentIcon)agentIcons.get( agent );
agents.removeElement( a );
return ((BaseAgentIcon)agentIcons.remove( agent ));
} else {
Debug.warning( "Asked to remove agent '" + agent + "', which I'm not in charge of!" );
return null;
}
}
COM: <s> remove an icon from the display system </s>
|
funcom_train/5820610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLimitOffset(MultivaluedMap<java.lang.String, java.lang.String> params, OnmsCriteria criteria, int defaultLimit) {
int limit=defaultLimit;
if(params.containsKey("limit")) {
limit=Integer.parseInt(params.getFirst("limit"));
params.remove("limit");
}
if(limit!=0) {
criteria.setMaxResults(limit);
}
if(params.containsKey("offset")) {
criteria.setFirstResult(Integer.parseInt(params.getFirst("offset")));
params.remove("offset");
}
}
COM: <s> uses parameters in params to setup criteria with standard limit and offset parameters </s>
|
funcom_train/42181634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HomeTexture getGroundTexture() {
if (this.groundTextureRadioButton.isSelected()) {
TextureImage selectedTexture = (TextureImage)this.groundTextureButton.getTexture();
if (selectedTexture instanceof HomeTexture
|| selectedTexture == null) {
return (HomeTexture)selectedTexture;
} else {
return new HomeTexture(selectedTexture);
}
} else {
return null;
}
}
COM: <s> returns the edited ground texture </s>
|
funcom_train/12158664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeader(String name, String value) {
Vector existing = (Vector)headers.get(name);
if (existing == null) {
Vector multiValue = new Vector();
multiValue.add(value);
headers.put(name,multiValue);
} else {
existing.add(value);
headers.put(name,existing);
}
}
COM: <s> add the headers to the request </s>
|
funcom_train/19100414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveBarcode( String membernumber, String oldBarcode, String newBarcode ) throws SQLException {
saveField( membernumber, Constants.FIELD_BARCODE, newBarcode );
conn.createStatement().execute( "UPDATE history SET tapebarcode = '" + newBarcode + "' WHERE " +
"tapebarcode = '" + oldBarcode + "'" );
}
COM: <s> does additional work of also changing the barcode in the history table </s>
|
funcom_train/41165265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoDeliveryDate1 entity) {
EntityManagerHelper.log("saving CoDeliveryDate1 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 co delivery date1 entity </s>
|
funcom_train/44164304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateMapGeneratorOptions() {
getFreeColClient().getGame().getMapGeneratorOptions()
.getOption("model.option.mapWidth");
getFreeColClient().getGame().getMapGeneratorOptions()
.getOption("model.option.mapHeight");
}
COM: <s> updates the map generator options displayed on this panel </s>
|
funcom_train/5342747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PingReply createPingReply(byte[] guid) {
GUESSEndpoint endpoint = UNICASTER.getUnicastEndpoint();
if(endpoint == null) {
if(RouterService.isIpPortValid())
return PingReply.create(guid, (byte)1);
else
return null;
} else {
return PingReply.createGUESSReply(guid, (byte)1,
endpoint.getPort(),
endpoint.getAddress().getAddress());
}
}
COM: <s> creates a new tt ping reply tt from the set of cached </s>
|
funcom_train/26345249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer s = new StringBuffer();
s.append("ftp://" + user + "@");
for (int i = 0; i < hosts.size(); i++)
s.append(hosts.elementAt(i) + ",");
if (hosts.size() > 0)
s.deleteCharAt(s.length() - 1);
s.append(":" + port);
return s.toString();
}
COM: <s> to string without password </s>
|
funcom_train/14516327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameEndEntityProfile(String oldname, String newname) throws EndEntityProfileExistsException, AuthorizationDeniedException{
if(authorizedToProfileName(oldname, true)){
raadminsession.renameEndEntityProfile(administrator, oldname,newname);
this.info.endEntityProfilesEdited();
}else
throw new AuthorizationDeniedException("Not authorized to rename end entity profile");
}
COM: <s> metod to rename a end entity profile </s>
|
funcom_train/12861423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_ManyToOne_default_sideOne2Many() throws Exception{
parse(MagicDrawFilesPath+"ClassAImpl.hbm.xml");
setNodeList("/hibernate-mapping/class/*/key/column");
for(Node item:nodeList) {
assertEquals(item.valueOf("@name"), "classa");
}
setNodeList("/hibernate-mapping/class/list/index");
for(Node item:nodeList) {
assertEquals("classa_position",item.valueOf("@column"));
}
}
COM: <s> the generation of many to one references is tested </s>
|
funcom_train/43897861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getArea(GeometryCollection geometryCollection1) {
double area = 0.0d;
//double perimeter = 0.0d;
int numberOfGeometries1 = geometryCollection1.getNumGeometries();
// Go through geometryCollection1 and sum areas of component geometries
for (int i = 0; i < numberOfGeometries1; i++) {
area += getArea(geometryCollection1.getGeometryN(i));
}
return area;
}
COM: <s> returns the area of a geometry collection </s>
|
funcom_train/50688060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Command hCommand_next) {
if (hCommand_next.m_hCommand_next != null) {
throw new IllegalArgumentException("only one command can be added");
}
hCommand_next.m_hCommand_next = m_hCommand_next;
m_hCommand_next = hCommand_next;
}
COM: <s> adds a command to this command </s>
|
funcom_train/5459788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchCrawlerStoppingThread(final Crawler crawler) {
if (crawler == null) {
Exception e = new Exception();
log.log(Level.WARNING,"Trying to stop a null crawler",e);
}
Thread thread = new Thread() {
public void run() {
crawler.stop();
}
};
instantThreadPool.execute(thread);
}
COM: <s> dispatches a thread that stops the given crawler </s>
|
funcom_train/44459015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResetStatistics() throws Throwable {
TargetDescriptor descriptor =
new TargetDescriptor(AllTests.url(), 20000);
XINSServiceCaller caller = new XINSServiceCaller(descriptor);
XINSCallRequest request = new XINSCallRequest("_ResetStatistics", null);
caller.call(request);
// TODO: Test output
// TODO: Make sure _GetStatistics indicates no calls were done
// TODO: Make sure _GetStatistics returns proper _lastReset value
}
COM: <s> tests the code reset statistics code method </s>
|
funcom_train/32057479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSelectionCells() {
System.out.println("testSetSelectionCells");
JGraph jp = new JGraph();
DefaultGraphSelectionModel dg = new DefaultGraphSelectionModel(jp);
Object[] obj = new Object[5];
dg.setSelectionCells(obj);
assertTrue(dg.getSelectionCells() != null);
}
COM: <s> this function tests set selection cells function of default graph cell class </s>
|
funcom_train/15945902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Edge createEdge(Vertex some, Vertex other) {
//generate edge
Edge edge = elementFactory.createEdge(some, other);
//use data elements if they exist
if (!data.isEmpty())
addData(edge, data, keys);
data.clear();
return edge;
}
COM: <s> the code edge code is created in another function </s>
|
funcom_train/7266774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getEndOffset(long totalSize) {
if (totalSize < 0) {
throw new IllegalArgumentException("totalSize must be >= 0");
}
if (startOffset >= 0) {
if (endOffset >= 0 && endOffset < totalSize) {
return endOffset;
} else {
return totalSize - 1;
}
}
// format is -n, meaning return last n bytes
return totalSize - 1;
}
COM: <s> returns the inclusive end offset </s>
|
funcom_train/37182930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Country getCountry(long ipAddress) {
if (file == null) {
throw new IllegalStateException("Database has been closed.");
}
int ret = seekCountry(ipAddress) - COUNTRY_BEGIN;
if (ret <= 0 || ret >= countryCode.length) {
return UNKNOWN_COUNTRY;
}
else {
return new Country(countryCode[ret], countryName[ret]);
}
}
COM: <s> returns the country the ip address is in </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.