__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45112473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws Exception {
StringBuffer startCommand = appendCapturCommand(buildTSharkCommand());
cliApplication.cliCommand("");
WireSharkCliCommand cmd = new WireSharkCliCommand(startCommand.toString());
cmd.setPromptString("Capturing on");
cmd.setTimeout(2000);
cmd.setIgnoreErrors(true);
cliApplication.handleCliCommand("Start Capture", cmd);
setTestAgainstObject(cliApplication.getTestAgainstObject());
}
COM: <s> starts wire shark sniffig </s>
|
funcom_train/15831124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected QName purifyQName(QName qname) {
qname.prefix = purifyName(qname.prefix, true);
qname.localpart = purifyName(qname.localpart, true);
qname.rawname = purifyName(qname.rawname, false);
return qname;
} // purifyQName(QName):QName
COM: <s> purify qualified name </s>
|
funcom_train/48337741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pair getListTail(int i) throws BadPairStructureException {
Object o = this;
while (i > 0) {
if (EMPTY_LIST == o) {
throw new IndexOutOfBoundsException();
} else if (! (o instanceof Pair)) {
throw new BadPairStructureException("Not a list", this);
}
o = ((Pair)o).cdr;
i--;
}
return (Pair)o;
}
COM: <s> return the sublist of the list starting at this pair by omitting </s>
|
funcom_train/43269300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object object) throws ClassCastException {
if (!(object instanceof VideoArchive)) {
throw new ClassCastException("VideoArchive.compareTo");
}
int c = 0;
if (this != object) {
VideoArchive that = (VideoArchive) object;
String thatString = that.keyRepresentation();
String thisString = this.keyRepresentation();
c = thisString.compareTo(thatString);
}
return c;
}
COM: <s> compare this code video archive code object with the passed handle of another </s>
|
funcom_train/17141034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeDocVectors() {
VerbatimLogger.info("Initializing document vector store ... \n");
for (int i = 0; i < indexReader.numDocs(); ++i) {
Vector docVector = VectorFactory.createZeroVector(vectorType, dimension);
this.docVectors.putVector(Integer.toString(i), docVector);
}
}
COM: <s> allocate doc vectors to zero vectors </s>
|
funcom_train/24261272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Basket getCurrentlySelectedBasket() {
BasketNode selectedNode
= getSelectedNode();
if (selectedNode.isBasketVariable() == true) {
//selected node is one of the basket variable references
//find its parent basket
BasketNode basketNode
= (BasketNode) selectedNode.getParent();
return basketNode.getBasket();
}
else {
assert(selectedNode != rootNode);
//the selected node is a basket
return selectedNode.getBasket();
}
}
COM: <s> returns the currently selected basket </s>
|
funcom_train/39474633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon getCheckerIcon(int color) {
if (color == 1) {
return chip1;
}
if (color == 2) {
return chip2;
}
if (color == -1 || color == -2) {
return previewChip;
}
throw new IllegalArgumentException(
"One of {1,2,-1,-2} expected, but got: " + color);
}
COM: <s> get the image for the chip of player 1 </s>
|
funcom_train/1683787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void activateAllElements(){
textFieldName.setEditable(true);
passwordFieldPassword.setEditable(true);
passwordFieldReenterPassword.setEditable(true);
textFieldEmail.setEditable(true);
textFieldReenterEmail.setEditable(true);
buttonRegister.setEnabled(true);
buttonGTC.setEnabled(true);
}
COM: <s> activates all elements which are needed for registration </s>
|
funcom_train/48875224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getUmlSplitPane() {
if (umlSplitPane == null) {
umlSplitPane = new JSplitPane();
umlSplitPane.setContinuousLayout(true);
umlSplitPane.setOneTouchExpandable(true);
umlSplitPane.setDividerLocation(screenSize.width/5);
umlSplitPane.setDividerSize(8);
//umlSplitPane.setPreferredSize(screenSize);
umlSplitPane.setRightComponent(getGraphSplitPane());
umlSplitPane.setLeftComponent(getPropertySplitPane());
}
return umlSplitPane;
}
COM: <s> this method initializes uml split pane </s>
|
funcom_train/41725929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedItemIndex(int selectedItemIndex) {
this.selectedItemIndex = selectedItemIndex;
MenuGridItem mgi = (MenuGridItem) composite.drawableAt(selectedItemIndex);
mgi.setSelected(true);
mgi.setFrameForBigImg(isSelectedFrame);
// TextPanel selectedPanel = ((MenuGridItem) composite.drawableAt(selectedItemIndex)).getTextPanel();
// label.setText(mgi.getTextPanel().getText());
// label.layout();
}
COM: <s> set the index of item which is selected </s>
|
funcom_train/22396655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invokeLater(Runnable runnable) {
if(isShutdown) {
throw new IllegalStateException("Thread queue has been shutdown");
}
boolean queued = false;
synchronized(runnableQueue) {
if(threadQueueThread != null && threadQueueThread.isAlive()) {
runnableQueue.add(runnable);
queued = true;
}
}
if(!queued) {
if(threadQueueThread != null) {
try {
threadQueueThread.join();
} catch (InterruptedException e) { }
threadQueueThread = null;
}
threadQueueThread = new ThreadQueueThread();
runnableQueue.add(runnable);
threadQueueThread.start();
}
}
COM: <s> puts the provided tt runnable tt object on the </s>
|
funcom_train/38737149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processGetSuccessorList(Message message) {
String successorList;
Message getSuccesorListResponseMessage;
successorList = chordNode.getSuccessorList().toString();
getSuccesorListResponseMessage = new MessageXML(message
.getSequenceNumber(), SendType.RESPONSE,
Protocol.GET_SUCCESSOR_LIST_RESPONSE, message
.getMessageSource(), chordNode.getKey().getValue());
getSuccesorListResponseMessage.addParam(
GetSuccessorListResponseParams.SUCCESSOR_LIST.name(),
successorList);
communicationManager.sendMessageUnicast(getSuccesorListResponseMessage);
}
COM: <s> process message of type is get successor list </s>
|
funcom_train/46152286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fastForward() {
if (playerReady()) {
logger.info("video player: fast forward");
if (isSynced()) {
// sync other clients
sendCameraRequest(Action.FAST_FORWARD, null);
} else {
setPositionRelative(getPosition(), 5);
}
}
}
COM: <s> fast forwards the video by 5 seconds </s>
|
funcom_train/12644580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Rectangle r) {
int x1 = Math.min(x, r.x);
int x2 = Math.max(x + width, r.x + r.width);
int y1 = Math.min(y, r.y);
int y2 = Math.max(y + height, r.y + r.height);
x = x1;
y = y1;
width = x2 - x1;
height = y2 - y1;
}
COM: <s> adds a code rectangle code to this code rectangle code </s>
|
funcom_train/7647276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String substring(int start) {
if (0 <= start && start <= count) {
if (start == count) {
return ""; //$NON-NLS-1$
}
shared = true;
return new String(start, count - start, value);
}
throw new StringIndexOutOfBoundsException(start);
}
COM: <s> returns the string value of the subsequence from the </s>
|
funcom_train/27834927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(String table, String column) {
Vector tmpTable;
for (int i = 0; i < _tableList.size(); i++) {
tmpTable = (Vector) _tableList.get(i);
if (tmpTable.firstElement().equals(table)) {
tmpTable.add(column);
}
}
}
COM: <s> adds a column to the specified table </s>
|
funcom_train/43244878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPropertySetMethod() {
System.out.println("getPropertySetMethod");
Class cls = null;
String property = "";
Method[] expResult = null;
Method[] result = BeanTools.getPropertySetMethod(cls, property);
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 property set method method of class org </s>
|
funcom_train/22001937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescription() {
// If the type is a list of symbols, we can do better than just
// saying "Given Symbols".
if (getType() == GIVEN_SYMBOLS) {
String string = "";
Iterator iterator = getAllSymbols().iterator();
while (iterator.hasNext()) {
Symbol symbol = (Symbol) iterator.next();
string = string.concat(symbol.toString());
if (iterator.hasNext())
string = string.concat(", ");
}
return string;
} else
return getDescription(getType());
}
COM: <s> creates a string representation of the quote range without referring to </s>
|
funcom_train/2948773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatusBar(StatusBar stBar) {
statusBar = stBar;
Component[] components = getComponents();
//go through children and add listener
for (int i = 0; i < components.length; i++) {
if (components[i] instanceof EditorMenu) {
((EditorMenu) components[i]).configStatusListener(statusBar);
}
}
}
COM: <s> sets status bar to the menu propagates call to editor menues </s>
|
funcom_train/42183211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void chooseMark(final Mark mark) {
if (mark != null &&
JOptionPane.YES_OPTION ==
JLOptionPane.showConfirmDialog(
this,
Message.Dialog_SetMark_Message.get(mark),
Message.Dialog_SetMark_Title.get(),
JOptionPane.YES_NO_OPTION
)) {
new MarksUpdater(mark).execute();
}
}
COM: <s> assigns specified mark to the message </s>
|
funcom_train/21847436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChainDrawMark removeChain() {
ChainDrawMark thisNext = this.next;
ChainDrawMark thisPrev = this.prev;
if (thisPrev != null) { // not the first
thisPrev.next = thisNext;
this.prev = null;
}
if (thisNext != null) { // not the last
thisNext.prev = thisPrev;
this.next = null;
}
try {
this.remove(); // remove the mark from DocMarks
} catch (InvalidMarkException e) {
// already removed
}
return thisNext;
}
COM: <s> remove this mark from the chain </s>
|
funcom_train/12540864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageDescriptor getImageDescriptor(String iconPath, IConfigurationElement element) {
String pluginId= element.getDeclaringExtension().getNamespace();
Bundle bundle= Platform.getBundle(pluginId);
if (bundle == null)
return null;
try {
return ImageDescriptor.createFromURL(new URL(bundle.getEntry("/"), iconPath)); //$NON-NLS-1$
} catch (MalformedURLException x) {
EditorsPlugin.log(x);
}
return null;
}
COM: <s> returns the image descriptor for the icon path specified by the given configuration </s>
|
funcom_train/50440197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateState(StateChangedEvent evt) {
try {
// Get update
x=(((State)evt.getSource()).getState()).get(m_intIdxState);
// Debug statements
debug("Update received in "+this+" New value of state "+x);
}
catch (Exception error){
// Error logging goes here
error.printStackTrace();
}
}
COM: <s> update state called when state changes </s>
|
funcom_train/45255818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateForDialogFontChange(Font newFont) {
Iterator iterator = dialogFontWidgets.iterator();
while (iterator.hasNext()) {
((Control) iterator.next()).setFont(newFont);
}
//recalculate the fonts for the tree
labelProvider.clearFontCacheAndUpdate();
}
COM: <s> update for a change in the dialog font </s>
|
funcom_train/18480377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fromComp() {
ignore_refresh = true ;
if (hasChanged) {
for(ChannelComponentHolder<?> comp: comp_holders.values()) {
if (comp.holder.hasChanged()) {
comp.fromComp() ;
comp.holder.resetHasChanged() ;
}
}
hasChanged = false ;
setEnablement() ;
}
ignore_refresh = false ;
}
COM: <s> transfers data from any changed components to the channels </s>
|
funcom_train/8815407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CriterionTypeDTO getType(int level) {
Log.debug(toString());
if (level < 0) {
return null;
}
if (getTypes() == null) {
return null;
}
for (final CriterionTypeDTO type : getTypes()) {
if (type.getLevel() == level) {
return type;
}
}
return null;
}
COM: <s> retrieves the criterion type with the given level </s>
|
funcom_train/5460166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FileSelectorPanel getControlPanel() {
if (controlPanel == null) {
controlPanel = new FileSelectorPanel();
controlPanel.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
inspect(controlPanel.getFile(), controlPanel.getInferenceChecked());
}
});
}
return controlPanel;
}
COM: <s> this method initializes control panel </s>
|
funcom_train/22405765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SelectionAdapter MoveBackward() {
SelectionAdapter seladapt =
new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
setModel();
decPersonCount();
//the composite is disposed and a new one is created
composite.dispose();
composite = viewRenderer.createView(parentComposite, contr, persons.get(getPersonCount()), filename);
parentComposite.layout();
}
};
return seladapt;
}
COM: <s> implements the listner for the backward button </s>
|
funcom_train/22284441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
// sleeeeep
try {
if (getMenu() != null) {
sleep(getMenu().getMenuSpeed());
} else {
sleep(400);
}
} catch (InterruptedException e) {
}
// action!
WidgetMenu subMenu = getSubMenu();
if (subMenu != null) {
switch (action) {
case UP:
// popup
if (!subMenu.isPoppedUp()) {
subMenuPopup();
}
break;
case DOWN:
// popdown
if (subMenu.isPoppedUp()) {
subMenu.popdown();
}
break;
}
}
}
COM: <s> the delay before doing the action </s>
|
funcom_train/26512783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FIPA_AID_Address lookupFIPA(String name) {
Enumeration allNames = FIPA_Addresses.keys();
while (allNames.hasMoreElements()) {
String current = (String) allNames.nextElement();
if (current.equals(name)) {
return ((FIPA_AID_Address)FIPA_Addresses.get(current)); }
}
//improve this by raising an exception?
return (null);
}
COM: <s> find a proper address from a name of an agent </s>
|
funcom_train/2955048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containCherry(int pos) {
if(level.cherryAt(pos)) {
level.grabCherryAt(pos);
new ScreenText(this,"200 points!!", Const.STXPOS, Const.STYPOS-40, 3);
return true;
}
else return false;
}
COM: <s> check if position contain cherry </s>
|
funcom_train/2890267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OptionType lookupOption(URI name) {
assert name != null;
Iterator it = options.listIterator();
while (it.hasNext()) {
OptionType optionType = (OptionType) it.next();
if (name.equals(optionType.getName())) {
return optionType;
}
}
return null;
}
COM: <s> look up an option by name </s>
|
funcom_train/15615748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayName() {
String glxinfoStr = ConfigFileTools.findTextInInterval(glxinfo,
"name of display:", "display.*screen").trim(); //$NON-NLS-1$ //$NON-NLS-2$
if (!glxinfoStr.trim().equals("")) //$NON-NLS-1$
return glxinfoStr;
else
return glxInfoDialog.entryGlxDisplay.getText();
}
COM: <s> get display name </s>
|
funcom_train/22201730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TMReference getTMReference(String id) {
TMReference ref;
WsTopicMap map;
if (!tmRefMap.containsKey(id)) {
ref = new TMReference(id, proxy);
tmRefMap.put(id, ref);
} else {
ref = (TMReference) tmRefMap.get(id);
ref.checkTMReference();
}
return ref;
}
COM: <s> returns a tmreference instance for the given id </s>
|
funcom_train/18806918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrientation(PlotOrientation orientation) {
if (orientation == null) {
throw new IllegalArgumentException("XYPlot.setOrientation(...): null not allowed.");
}
if (orientation != this.orientation) {
this.orientation = orientation;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the orientation for the plot </s>
|
funcom_train/3405658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllHeaderLines() {
if(headerValueView==null)
headerValueView = new AbstractList() {
public Object get(int index) {
return ((hdr)headers.get(index)).line;
}
public int size() {
return headers.size();
}
};
return headerValueView;
}
COM: <s> return all the header lines as a collection </s>
|
funcom_train/15519317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte averageValues (int start_ind, int end_ind) {
if (end_ind < start_ind) {
throw new RuntimeException ("Corrupt SimilarityIndex");
}
end_ind++;
long sim_sum = 0;
int indexI = start_ind;
for (; indexI < end_ind; indexI++) {
sim_sum += getValue (indexI);
}
return (byte) (sim_sum / (indexI - start_ind));
}
COM: <s> returns the average of the value of the given range inclusive </s>
|
funcom_train/2501402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeValidate(FacesContext context, UIComponent component, Object componentValue) {
log.debug("Validating hour");
if (!Validator.validateHour((String) componentValue)) {
String[] params = {(String) componentValue};
FacesMessage message = createFacesMessage(params, HOUR_SUMARY_KEY, HOUR_DETAIL_KEY, DEFAULT_MESSAGE, context.getViewRoot().getLocale());
throw new ValidatorException(message);
}
}
COM: <s> call the validation of date implemented by </s>
|
funcom_train/18858723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String normalizeTitle(String title) {
if ('"' == title.charAt(0)) {
title = title.substring(1, title.length() - 1);
}
// Move prefixes to the front. ("..., The" -> "The ...")
final Matcher matcher = prefixPattern.matcher(title);
if (matcher.matches()) {
title = matcher.group(2) + " " + matcher.group(1); //$NON-NLS-1$
}
return title;
}
COM: <s> normalizes a title </s>
|
funcom_train/2429180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
if (hasEndDate()) {
if (endDate == null) {
return false;
}
Date start = getStartDate();
if (start != null) {
Date end = getEndDate();
if (end != null) {
return !start.after(end);
}
}
}
return true;
}
COM: <s> checks if the schedule duration is valid </s>
|
funcom_train/10500896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attachListeners(File buildFile, Project p) {
Iterator it = listeners.iterator();
while (it.hasNext()) {
AntUnitListener al = (AntUnitListener) it.next();
p.addBuildListener(new BuildToAntUnitListener(buildFile
.getAbsolutePath(),
al));
al.setCurrentTestProject(p);
}
}
COM: <s> wraps all registered test listeners in build listeners and </s>
|
funcom_train/2037104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countByDetachedCriteria(final DetachedCriteria detachedCriteria) {
return Integer.valueOf(getHibernateTemplate().execute(new HibernateCallback() {
public Object doInHibernate(Session session) throws SQLException {
Criteria criteria = detachedCriteria.getExecutableCriteria(session);
return criteria.uniqueResult();
}
}, true).toString());
}
COM: <s> counts by detached criteria </s>
|
funcom_train/10345853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
int i;
ASN1ObjectIdentifier oid;
if (!(o instanceof ASN1ObjectIdentifier)) {
return false;
}
oid = (ASN1ObjectIdentifier) o;
if (oid.value_.length != value_.length) {
return false;
}
for (i = 0; i < value_.length; i++) {
if (value_[i] != oid.value_[i]) {
return false;
}
}
return true;
}
COM: <s> compares two oids for equality </s>
|
funcom_train/51193153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHour(short hour) throws OperationNotSupportedException {
if (hour > 23) {
String err = "hour " + hour + " must be strictly less than 24";
throw new IllegalArgumentException(err);
} else if (hour < 0) {
String err = "hour " + hour + " cannot be negative.";
throw new IllegalArgumentException(err);
}
_hour = hour;
}
COM: <s> sets the hour field for this date time type </s>
|
funcom_train/28768824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource lookupResource(URI uri, WebServiceMessage message) throws IOException {
if (resourceExpressions != null) {
Document document = loadDocument(message);
for (String resourceExpression: resourceExpressions) {
try
{
Resource resultResource = findResourceForExpression(resourceExpression, uri, document);
if (resultResource!=null)
{
logger.debug("Found resource "+resultResource);
return processResource(uri, message, resultResource);
}
}
catch(ExpressionResolverException e)
{
logger.warn("Resolution of expression \""+resourceExpression+"\" failed.",e);
}
}
}
return null;
}
COM: <s> iterates over expressions evaluates them and looks for resource with corresponding name </s>
|
funcom_train/43865840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchComic(int number) throws SQLException {
Cursor cursor=
database.query(true, DATABASE_TABLE, ALL_COLUMNS,
KEY_NUMBER + "=" + number,
null, null, null, null, null);
if (cursor != null)
cursor.moveToFirst();
return cursor;
}
COM: <s> return a cursor to the comic indicated by number </s>
|
funcom_train/4377691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getDouble(String key) throws RJSONException {
Object object = get(key);
try {
return object instanceof Number ?
((Number)object).doubleValue() :
Double.parseDouble((String)object);
} catch (Exception e) {
throw new RJSONException("JSONObject[" + quote(key) +
"] is not a number.");
}
}
COM: <s> get the double value associated with a key </s>
|
funcom_train/12535546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCategory(AACDocCategory category) {
int rows = 1, columns = 0;
this.category = category;
if(category != null) {
rows = category.getRows();
columns = category.getColumns();
if(rows <= 0) rows = 1;
if(columns <= 0) columns = 1;
setLayout(rows, columns);
updateMaxPages();
loadPage(0);
} else {
currentPage = 0;
maxPages = 0;
setLayout(1, 0);
}
}
COM: <s> set the value of category </s>
|
funcom_train/44851888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEntry(String inMainValue, String inFormatString, String... inValues) {
String lTrimmed = inMainValue.trim();
if (lTrimmed.length() > 0) {
Object[] lArgs = new String[inValues.length + 1];
lArgs[0] = lTrimmed;
System.arraycopy(inValues, 0, lArgs, 1, inValues.length);
entries.add(String.format(inFormatString, lArgs).trim());
}
}
COM: <s> adds a formatted entry to the list </s>
|
funcom_train/29828519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableDataSet (TableDataSet theOriginal) {
//set column ids
this(theOriginal.getColumnIds());
//make rows
int rowCount = theOriginal.getRowCount();
for (int i = 0; i < rowCount; i++) {
this.addRow();
}
//set values
this.setValues(0, theOriginal);
}
COM: <s> allows a copy to be made </s>
|
funcom_train/40874051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PointList createPointList(Element e) {
PointList list = new PointList(graphicalRoot.getChildren().size());
Iterator j = e.getChildren(XMLObjectName.POSITION).iterator();
// Parse all Position nodes
while (j.hasNext()) {
Element position = (Element) j.next();
int x = Integer.parseInt(position.getAttributeValue(XMLObjectName.X));
int y = Integer.parseInt(position.getAttributeValue(XMLObjectName.Y));
list.addPoint(x, y);
}
return list;
}
COM: <s> create a position point list with all position nodes presents in the </s>
|
funcom_train/11302102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEscapeOneParam() {
LogCapture capture = new LogCapture(Level.INFO);
LogSF.info(logger, "\\{}\\{{}}, World}\\{","Hello");
assertEquals("{}{Hello}, World}{", capture.getMessage());
}
COM: <s> test escape sequence when only one parameter is present </s>
|
funcom_train/6487234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MdsButton (String alabel, URL afilename, int anaction){
filename=afilename;
label=alabel;
setLook();
setAction(anaction);
if (popable()){
popup = new PopupMenu();
add(popup);
}
addMouseListener(new ButtonHandler());
setDFont(new Font("Dialog",Font.PLAIN,10));
setBackground(Color.lightGray);
setForeground(Color.black);
margin= new Point(10,10);
if (label!=null)setLabelSize();
if (filename!=null){
loadImage();
setImageSize();
}
setMinSize();
}
COM: <s> the constructor takes a label string a image url either of </s>
|
funcom_train/1953292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFinishPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TimeLine_finish_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TimeLine_finish_feature", "_UI_TimeLine_type"),
TemporalPackage.Literals.TIME_LINE__FINISH,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the finish feature </s>
|
funcom_train/3080028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCellType(int column, int row) {
int cellType;
if (cellArray[rowMapping[row]][columnMapping[column]] == null) {
cellType = CELL_TYPE_EMPTY;
} else if (cellArray[rowMapping[row]][columnMapping[column]] instanceof OriginCell) {
cellType = CELL_TYPE_ORIGIN;
} else {
cellType = CELL_TYPE_POINTER;
}
return cellType;
}
COM: <s> returns the cell type at the specified coordinate </s>
|
funcom_train/19400494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IIndex registerIndex(String name, IIndex btree) {
assertOpen();
if (getIndex(name) != null) {
throw new IllegalStateException("Index already registered: name="
+ name);
}
// add to the persistent name map.
name2Addr.add(name, btree);
// report event (the application has access to the named index).
ResourceManager.openUnisolatedBTree(name);
return btree;
}
COM: <s> note you must </s>
|
funcom_train/2802581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reviewMsgDir() throws RaccoonException {
if (mTxtBizKey.getText().trim().length() != 0) {
mButtonReviewMsgDir.setEnabled(false);
AdvancedReview reviewer = new AdvancedReview();
reviewer.start();
} else {
mButtonReviewMsgDir.setEnabled(false);
SimpleReview reviewer = new SimpleReview();
reviewer.start();
}
}
COM: <s> reviews the given message folder and analyzes the contained message </s>
|
funcom_train/2344583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setdata(){
for(int i = 0; i < Configuration.FEATURES.length; i++)
onoff[i] = Long.parseLong(pia.getTypValue(modEx.getparameterListofGui(), Configuration.FEATURES[i].shortname + "Active")[1]);
for(int i = 0; i < Configuration.FEATURES.length; i++)
{
if (onoff[i] == 1)
Value[i].setChecked(true);
}
}
COM: <s> checks the activation state of the extraction units </s>
|
funcom_train/18894416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SchemaModel getSchemaModel() throws Exception {
validate();
if (schemaModel == null) {
schemaModel = new SchemaModelImpl();
//init
schemaModel.setResource(schemaModelResource);
schemaModel.setType(schemaModelType);
schemaModel.init(getModelContext());
}
return schemaModel;
}
COM: <s> returns the current schema model used by mp3 model </s>
|
funcom_train/31157879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findYear(List y, final String yearName) {
int year = 0;
for (Iterator iterator = y.iterator(); iterator.hasNext();) {
Year tempYear = (Year) iterator.next();
if (tempYear.getName().equals(yearName)) {
year = tempYear.getValue();
break;
}
}
return year;
}
COM: <s> finds the year as int in the list </s>
|
funcom_train/42639036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceRows(Matrix A, int index1, int index2) {
if (index1 == index2) return; //Do nothing.
//First row to be replaced.
Vector first = A.getRow(index1).copyVector();
//Second row to be replaced.
Vector second = A.getRow(index2).copyVector();
A.setRow(index1, second);
A.setRow(index2, first);
}
COM: <s> replacing two rows in matrix </s>
|
funcom_train/16513551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initDuplexType(IConnectionCategory duplexType) {
if (duplexType.getDuplex() == IConnectionCategory.DuplexOption.full) {
duplexButtonFull.setSelection(true);
duplexButtonHalf.setSelection(false);
} else {
duplexButtonHalf.setSelection(true);
duplexButtonFull.setSelection(false);
}
}
COM: <s> this method initializes the duplex type </s>
|
funcom_train/14588297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int intOrFumble(Play[] play, int dist) {
int blockRun = (int)(Math.atan(10 * Math.random())
* getOffense()
.sumRunAfterIntOrFumble(play, dist));
int run = (int)(Math.atan(10 * Math.random())
* getDefense()
.sumRunAfterIntOrFumble(play, dist));
swapPossession();
down = 0; // b/c passPlay always increments down
return (int)(.05 * (run - blockRun));
}
COM: <s> calculates yard changes in the return after an interception </s>
|
funcom_train/18730526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProtected(Geometric geometric) {
if (geometric instanceof Surface) {
addProtected((Surface) geometric);
} else if (geometric instanceof Edge) {
addProtected((Edge) geometric);
} else if (geometric instanceof Vertex) {
addProtected((Vertex) geometric);
} else if (geometric instanceof Item) {
add((Item) geometric);
}
}
COM: <s> adds a protected geometric </s>
|
funcom_train/27973008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int numContainers() {
int numContainers = 0;
ResultSet rs = sqlExchange.sql("SELECT COUNT(`ID`) as `rows` FROM `containers`;");
try {
while (rs.next()) {
numContainers = rs.getInt("rows");
}
} catch (SQLException e) {
System.out.println(e);
}
return numContainers;
}
COM: <s> retrieves the number of containers involved in the simulation </s>
|
funcom_train/20081346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupUI() {
setTitle("Nebula Grid - Execution Node");
setSize(WIDTH, HEIGHT);
setJMenuBar(setupMenu());
setLayout(new BorderLayout());
JTabbedPane tabs = new JTabbedPane();
add(tabs, BorderLayout.CENTER);
tabs.addTab("Control Center", setupGeneral());
tabs.addTab("History", setupHistory());
resetActiveJobInfo();
setStatus("Not Connected");
updateGridInfo();
updateExecutionTime();
setupTrayIcon(this);
}
COM: <s> ui setup operations </s>
|
funcom_train/4917274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFailIfAddOnlyEntryAgain() {
Entry entry = new Entry(); // added first time
try {
this.linkedList.addEntry(entry);
fail("Should not be able to re-add an entry");
} catch (IllegalStateException ex) {
assertEquals("Incorrect failure details",
"Entry already added (entry=" + entry + ", list="
+ this.linkedList + ")", ex.getMessage());
}
}
COM: <s> ensure failure if only entry added again </s>
|
funcom_train/27780328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int i) {
if (i == 0) {
used--;
if (used >= 0) {
first = a[0];
System.arraycopy(a, 1, a, 0, used);
}
} else {
System.arraycopy(a, i + 1, a, i, --used);
}
}
COM: <s> remove the item in the inverted list at the given position </s>
|
funcom_train/29018629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRowCount () {
checkWidget ();
if ((style & SWT.VERTICAL) != 0) {
return (int)/*64*/OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);
}
return (int)/*64*/OS.SendMessage (handle, OS.TB_GETROWS, 0, 0);
}
COM: <s> returns the number of rows in the receiver </s>
|
funcom_train/32870171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getTypeComment(ICompilationUnit parentCU, String lineDelimiter) {
try {
StringBuffer aspectName = new StringBuffer();
aspectName.append(getAspectName());
String comment = CodeGeneration.getTypeComment(parentCU, aspectName.toString(), lineDelimiter);
if (comment != null && isValidComment(comment)) { return comment; }
} catch (CoreException e) {
JavaPlugin.log(e);
}
return null;
}
COM: <s> get new java file template comment </s>
|
funcom_train/2302017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containSameStates(State[] states1, State[] states2) {
int len1 = states1.length;
int len2 = states2.length;
if (len1 != len2) return false;
for (int k = 0; k < states1.length; k++) {
if (!containsState(states1[k], states2)) return false;
}
return true;
}
COM: <s> returns true if code states1 code and code states2 code </s>
|
funcom_train/21469288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatDayOfWeek(StringBuffer buf, int count, Date date) {
int value = date.getDay();
if (count == 5) {
buf.append(dateTimeFormatInfo.weekdaysNarrow()[value]);
} else if (count == 4) {
buf.append(dateTimeFormatInfo.weekdaysFull()[value]);
} else {
buf.append(dateTimeFormatInfo.weekdaysShort()[value]);
}
}
COM: <s> formats day of week field according to pattern specified </s>
|
funcom_train/9139670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int insert(final int doc, final int freq, final int[] blockids) throws IOException{
final int c = insert(doc, freq);
final int blockCount = blockids.length;
docIds.writeUnary(blockCount+1);
if (blockCount > 0)
{
docIds.writeGamma(blockids[0]+1);
for (int i=1; i<blockCount; i++) {
docIds.writeGamma(blockids[i] - blockids[i-1]);
}
}
return c;
}
COM: <s> inserts a new document in the posting list </s>
|
funcom_train/48390063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addDayHeaderClickHandler(com.smartgwt.client.widgets.calendar.events.DayHeaderClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.calendar.events.DayHeaderClickEvent.getType()) == 0) setupDayHeaderClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.calendar.events.DayHeaderClickEvent.getType());
}
COM: <s> add a day header click handler </s>
|
funcom_train/32759892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scanCompleted() {
// String notification
getLogger().logInfo(this.getClass(), "DAQ CTRL - Scan completed and event notification: " + Calendar.getInstance().getTime().toString());
// Notify the registered scan complete event handlers
for (IDaqControllerListener hndlr : lstLsnCtlEvts)
hndlr.scanCompleted(lstDevCompleted);
}
COM: <s> clean up after a profile scan </s>
|
funcom_train/29775252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g,float xRaster,float yRaster){
// save the old color
Color oldColor = g.getColor();
// set the own color to draw
g.setColor(color);
// calculate the points of the triangle polygone
calcTriangle(xRaster, yRaster);
// draw the triangle
g.fillPolygon(xCoord, yCoord,3);
// restor the saved color
g.setColor(oldColor);
}
COM: <s> drawing funktion of the triangle draws the triangle onto a graphics plane </s>
|
funcom_train/889006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeClassFile(String anEnclosingClass, ClassFile aCf) {
// get the list of inner classes for the enclosing class
List innerClassList = (List) getEnclosingMap().get(anEnclosingClass);
if (null == innerClassList) {
innerClassList = new ArrayList();
getEnclosingMap().put(anEnclosingClass, innerClassList);
}
innerClassList.add(aCf);
}
COM: <s> store the class file in the package wide enclosing map </s>
|
funcom_train/38629140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void robotInit() {
System.out.println("Beginning robot initialization");
// Initialize event listener
onFieldModeChange = new OnFieldModeChangeListener(this, new FieldModeChange(),
10.0 * Units.ms);
// Start field mode change listener
onFieldModeChange.getThread().enable();
// Disable the WatchDog for now
getWatchdog().setEnabled(false);
System.out.println("LongShot v1.0 Initialized");
} // robotInit()
COM: <s> this function runs once when the robot is first turned on </s>
|
funcom_train/13393451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set createJarFile() throws IOException {
// perform ClassDep computation to retrieve class dependencies
String[] requiredClasses = getRequiredClasses();
// load classes found and place into jar file
Set set = loadClassesAndJar(requiredClasses);
// if the JarElementCollator was internally created, then close
if (collatorCreated == true) {
collator.closeJar();
}
return set;
}
COM: <s> creates the jar file from the class dep analysis </s>
|
funcom_train/26509452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBelow(Position p) {
if (stack.size()<=p.stack.size()) return false;
for (int i=0; i<p.stack.size(); i++)
if (((Entry)stack.get(i)).getIndex()!=
((Entry)p.stack.get(i)).getIndex()) return false;
return true;
}
COM: <s> checks if this position is below another position code p code </s>
|
funcom_train/45827878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fill(String name, long inode, int mode, long nextOffset) {
// encode into native ByteBuffer terminated with (byte)0
ByteBuffer bb = cs.encode(name);
ByteBuffer nbb = ByteBuffer.allocateDirect(bb.remaining() + 1);
nbb.put(bb);
nbb.put((byte) 0);
nbb.flip();
return fill(nbb, inode, mode, nextOffset, buf, fillDir);
}
COM: <s> method to add an entry in a readdir operation </s>
|
funcom_train/40768382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
run = true;
// change the rate of ball dropping
changeBallMovingDownSpeed();
// set pos to start at
index = 1;
/*
// wait before drop
Timer t = new Timer() {
public void run() {
// start moving
move();
}
};
t.schedule(getRandomStartTime());
*/
move();
}
COM: <s> start he ball dropping but wait for length of random time </s>
|
funcom_train/20769368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAnnotationEnabled() {
if (!(this instanceof FrameAnnotater)) {
return false;
}
if (annotationEnabled && isFilterEnabled() && !isEnclosed()) {
return true;
}
if (annotationEnabled && isFilterEnabled() && isEnclosed() && getEnclosingFilter().isFilterEnabled()) {
return true;
}
return false;
}
COM: <s> each filter has an annotation enabled flag that is used to graphical annotation </s>
|
funcom_train/44387200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameMethodURL(String oldMethodURL, String newMethodURL) {
int methodIndex = myMethodsURL.indexOf(oldMethodURL);
if (methodIndex >= 0) {
myMethodsURL.removeElementAt(methodIndex);
myMethodsURL.insertElementAt(newMethodURL, methodIndex);
}
}
COM: <s> rename an method url with a given name if the method url exists </s>
|
funcom_train/15866121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Poolable getInstanceFor( final String identifier ){
final Stack stack = (Stack)this.pool.get( identifier );
if(stack == null){
return getCloneFromOriginalObject(identifier);
}
try{
Object t = stack.pop();
if( t == null){
return getCloneFromOriginalObject(identifier);
}
return (Poolable)t;
}catch( EmptyStackException e){
return getCloneFromOriginalObject(identifier);
}
}
COM: <s> returns a pooled object or a new one if pool empty </s>
|
funcom_train/34355773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitTee(Tee tee) {
try {
result = new JSONObject();
result.put(PipelineJsonConstants.TYPE, PipelineJsonConstants.TEE);
URI datasetURI = tee.getDatasetURI();
if (datasetURI != null) {
result.put(PipelineJsonConstants.DATASET_URI, datasetURI.toString());
}
visitPipelineElement(tee, result);
}
catch (JSONException e) {
jsonException = e;
}
}
COM: <s> generates json for a tee </s>
|
funcom_train/11688928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTaskDescription(TaskDescription taskDescription) {
validateTaskDescription(taskDescription);
String name = taskDescription.getName();
validateName(name);
validateUniqueness(name);
if (log.isDebugEnabled()) {
log.debug("Storing a TaskDescription : " + taskDescription);
}
taskDescriptionMap.put(name, taskDescription);
}
COM: <s> stores a given task description </s>
|
funcom_train/10910972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AbstractBorderElement mergeSolid(SolidAndDoubleBorderElement sdb) {
AbstractBorderElement e = new SolidAndDoubleBorderElement(EN_SOLID, 0);
for (int i = 0; i < 4; i++) {
e.setData(i, Math.max(data[i], sdb.getData(i)));
}
return e;
}
COM: <s> merges dashed border element with instance of solid and double border </s>
|
funcom_train/43882111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
if (createdReader != null) {
createdReader.close();
createdReader = null;
}
if (deletedReader != null) {
deletedReader.close();
deletedReader = null;
}
if (fvReader != null) {
fvReader.close();
fvReader = null;
}
if (tvReader != null) {
tvReader.close();
tvReader = null;
}
}
COM: <s> release the underlying resources associated with this stream </s>
|
funcom_train/32630438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getRecipients(final List recipients) {
if (recipients != null) {
for (int i = 0; i < recipients.size(); i++) {
if (recipients.get(i) instanceof String) {
if (((String) recipients.get(i)).length() > 0) {
return recipients;
}
}
}
}
return null;
}
COM: <s> returns the given list of recipients if at least </s>
|
funcom_train/31545181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dataSinkUpdate(final DataSinkEvent evt) {
if (evt instanceof EndOfStreamEvent) {
synchronized (waitFileSync) {
fileDone = true;
waitFileSync.notifyAll();
}
} else if (evt instanceof DataSinkErrorEvent) {
synchronized (waitFileSync) {
fileDone = true;
fileSuccess = false;
waitFileSync.notifyAll();
}
}
}
COM: <s> event handler for the file writer </s>
|
funcom_train/1033534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void closeAllOpenResults() {
if (this.openResults != null) {
for (Iterator iter = this.openResults.iterator(); iter.hasNext();) {
ResultSetInternalMethods element = (ResultSetInternalMethods) iter.next();
try {
element.realClose(false);
} catch (SQLException sqlEx) {
AssertionFailedException.shouldNotHappen(sqlEx);
}
}
this.openResults.clear();
}
}
COM: <s> close any open result sets that have been held open </s>
|
funcom_train/10210382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
Graphics2D painter = (Graphics2D)g;
AffineTransform transform = painter.getTransform();
double textWidth = painter.getFont().
getStringBounds(this.text, painter.getFontRenderContext()).getWidth();
double textHeight = painter.getFont().
getStringBounds(this.text, painter.getFontRenderContext()).getHeight();
painter.translate(textHeight, textWidth+textHeight);
painter.rotate(1.5*Math.PI);
// super.paintComponent(painter);
painter.drawString(text, 0, 0);
painter.setTransform(transform);
}
COM: <s> draw the label </s>
|
funcom_train/24186181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOwners() {
for (Map.Entry<String, DCOPProblemInterface<AddableInteger, AddableInteger>> entry : this.trueSubProbs.entrySet())
assertEquals (entry.getValue().getOwners(), this.subProbs.get(entry.getKey()).getOwners());
}
COM: <s> test method for problem get owners </s>
|
funcom_train/12184186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoubleQuotedMixedEmbeddedDoubleEscaped() throws Exception {
final String expected = "some \"quotable\" and 'quoted' words";
final String str =
StringUtils.DOUBLE_QUOTE +
"some "quotable" and 'quoted' words" +
StringUtils.DOUBLE_QUOTE;
assertTrue("Quote removal failed",
doRemoveQuotesTest(str, expected));
}
COM: <s> tests that a string surrounded with double quotes with embedded </s>
|
funcom_train/6511987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitClassExpression(ClassExpression c) {
if(applyPreHook(c)) {
String _class = c.getType().qualifiedName();
String field_name = "class$" + _class.replace('.', '$');
increaseStack();
il.append(new GETSTATIC(added_fields.lookup(field_name, _class)));
}
applyPostHook(c);
}
COM: <s> generate code for object </s>
|
funcom_train/44121206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SavePoint savePoint() {
return(new SavePoint(asterisk, backSlash, characterLiteral, comment, currentCharacter,
index, leadingWhiteSpaceEnd, lineStart, inLineComment, slash,
startIndex, stringLiteral, unescapedJavaCode.toString(), unescapedStartIndex));
} // StringWithJavaSourceCode.savePoint()
COM: <s> returns code save point code with current state </s>
|
funcom_train/19538876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToDefault() {
final Zone zone = MapTool.getFrame().getCurrentZoneRenderer().getZone();
if (this == ExportLayers.LAYER_FOG) {
ExportLayers.LAYER_FOG.setChecked(zone.hasFog());
} else if (this == ExportLayers.LAYER_VISIBILITY) {
ExportLayers.LAYER_VISIBILITY.setChecked(zone.getVisionType() != Zone.VisionType.OFF);
} else {
setChecked(true);
}
}
COM: <s> sets the layer selection checkboxes to replicate the current view </s>
|
funcom_train/18215420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateXML(Element root, int num) {
int selectedIndex;
String nodeText;
if (num == 1) {
selectedIndex = weightBox.getSelectedIndex();
nodeText = weightBox.getValue(selectedIndex);
} else {
selectedIndex = weightBox2.getSelectedIndex();
nodeText = weightBox2.getValue(selectedIndex);
}
Document xmldoc = XMLParser.createDocument();
Element weightElement = xmldoc.createElement("weight");
Element weightValueElement = xmldoc.createElement(nodeText);
weightElement.appendChild(weightValueElement);
root.appendChild(weightElement);
}
COM: <s> generate xml for an event filter selections </s>
|
funcom_train/47358747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FractionalPermissions forgetShareAndPureStates() {
if(isBottom())
return this;
List<FractionalPermission> newPs =
PermissionSet.forgetShareAndPureStates(permissions, constraints);
List<FractionalPermission> newFramePs =
PermissionSet.forgetShareAndPureStates(framePermissions, constraints);
// original constraints unchanged
return createPermissions(newPs, newFramePs, constraints);
}
COM: <s> forgets state information for permissions known to be share or pure </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.