__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/33257507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCentered() {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension dialogWidth = this.getMinimumSize();
Dimension dialogHeight = this.getMinimumSize();
// Put dialog box in center of screen
this.setLocation((screenSize.width / 2) - (dialogWidth.width / 2), (screenSize.height / 2) - (dialogHeight.height / 2));
}
COM: <s> sets the centered attribute of the window initialisation object </s>
|
funcom_train/9869452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue1(Integer newVal) {
if ((newVal != null && this.value1 != null && (newVal.compareTo(this.value1) == 0)) ||
(newVal == null && this.value1 == null && value1_is_initialized)) {
return;
}
this.value1 = newVal;
value1_is_modified = true;
value1_is_initialized = true;
}
COM: <s> setter method for value1 </s>
|
funcom_train/22384628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderFrame(Graphics g, Flob f, float fract) {
// XXX the interpolation path isn't necessarily linear!
Flob r = f.interpTo;
renderFrame(g, (BoxedFlob)f,
(int)(f.x + fract*(r.x-f.x)),
(int)(f.y + fract*(r.y-f.y)),
(int)(f.d + fract*(r.d-f.d)),
(int)(f.w + fract*(r.w-f.w)),
(int)(f.h + fract*(r.h-f.h))
);
}
COM: <s> render the interpolated frame around the flob </s>
|
funcom_train/19418953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionForward moveToFolder(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request, final HttpServletResponse response) {
logger.debug("=== ModifyMessageAction.moveToFolder()...");
return mapping.findForward("moveMessage");
}
COM: <s> forwards this request to the move message action </s>
|
funcom_train/8418036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildSums() {
freqSum = 0;
for (int i : set.values()) {
freqSum += i;
}
ratioThreshold = set.size()/freqSum * 0.001;
//System.out.println("See ratio threshold: "+ratioThreshold);
/*
for(String s: set.keySet())
{
//
freqSum/=(s.length()+1);
System.out.println("Frequent Sum: "+freqSum);
break;
}
*/
/*HashSet<String> patterns = (HashSet<String>) set.keySet();
patternSum = patterns.size();
*/
}
COM: <s> sets the sum values </s>
|
funcom_train/35486250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endSparql() throws IOException {
//Preconditions
if(_connection == null) return;
//End request
_writer.write("%7D");
_writer.close();
//Check response
if(_connection.getResponseCode() == 200) {
_log.info(_statements + " statements written to Store.");
} else {
_log.warning("Cannot write to Store. Server response: " + _connection.getResponseCode() + " " + _connection.getResponseMessage() + ".");
}
_connection = null;
_writer = null;
}
COM: <s> ends the current sparql update request </s>
|
funcom_train/46738478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHelpUrl(String helpUrl) {
if (Converter.isDifferent(this.helpUrl, helpUrl)) {
String oldhelpUrl= null;
oldhelpUrl = this.helpUrl;
this.helpUrl = helpUrl;
setModified("helpUrl");
firePropertyChange(String.valueOf(APPLICATIONVIEWS_HELPURL), oldhelpUrl, helpUrl);
}
}
COM: <s> url to html help file associated with this view </s>
|
funcom_train/49695300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setICalendarParsingMode( boolean parseMode ) {
logger.debug( "In setICalendarParsingMode( boolean ) ... in class " + CLASSNAME );
CompatibilityHints.setHintEnabled( CompatibilityHints.KEY_RELAXED_PARSING, parseMode );
CompatibilityHints.setHintEnabled( CompatibilityHints.KEY_RELAXED_UNFOLDING, parseMode );
CompatibilityHints.setHintEnabled( CompatibilityHints.KEY_RELAXED_VALIDATION, parseMode );
}
COM: <s> set the parsing mode for i calendar data to either relaxed or strict </s>
|
funcom_train/2892000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setForegroundColor(Color c) {
int n = screenElementList.getSelectedIndex();
if (n != -1) {
String styleName = ((StyleName) textStyleModel.getElementAt(n)).getStyleName();
MutableAttributeSet attributes = (MutableAttributeSet) attributeMap.get(styleName);
StyleConstants.setForeground(attributes, c);
setSampleText(styleName);
}
}
COM: <s> sets a new foreground color for the currently selected text item if </s>
|
funcom_train/39184265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setComment(boolean contains, String name){
crit8CheckBox.setSelected(true);
crit8ComboBox.setSelectedIndex(contains?0:1);
crit8TextField.setText(name);
crit8ComboBox.setEnabled(true);
crit8TextField.setEnabled(true);
crit8Label.setEnabled(true);
}
COM: <s> changes the settings for the comment criteria </s>
|
funcom_train/34197384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanUp() {
try {
closeOutputStream();
} catch(IOException e) {
LogLog.error("Could not close outputStream.", e);
}
if(connector != null) {
//LogLog.debug("Interrupting the connector.");
connector.interrupted = true;
connector = null; // allow gc
}
}
COM: <s> drop the connection to the remote host and release the underlying </s>
|
funcom_train/4135861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BibTexEntry_date_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BibTexEntry_date_feature", "_UI_BibTexEntry_type"),
BibtexPackage.Literals.BIB_TEX_ENTRY__DATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the date feature </s>
|
funcom_train/3168183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int actualHashForEqual() {
return getClass().hashCode() + 1;
// TODOreturn getCategory().hashForEqual() + 1;
/*
udanax-top.st:15037:HeaperSpace methodsFor: 'testing'!
{UInt32} actualHashForEqual
"is equal to any basic space on the same category of positions"
^self getCategory hashForEqual + 1!
*/
}
COM: <s> is equal to any basic space on the same category of positions </s>
|
funcom_train/48792814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(String item_id) throws RemoteException {
ItemQuantity cur_item_qty;
for (int i = 0; i < items_list.size(); i++) {
cur_item_qty = (ItemQuantity) items_list.elementAt(i);
if (cur_item_qty.itemId.equals(item_id)) {
items_list.removeElementAt(i);
return;
}
}
}
COM: <s> delete delete item from the cart </s>
|
funcom_train/46759653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MedModel getMed(final long medId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return MedData.getMed(medId, chain, call);
}}; return (MedModel) call(method, call);
}
COM: <s> same transaction return the single med model for the primary key </s>
|
funcom_train/51180102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String removeNonLettersAtEnd(String input) {
input = input.trim();
if (input.length() == 0)
return input;
char lastC = input.charAt(input.length()-1);
while (!Character.isLetter(lastC) && (lastC!=')')) {
// if there is an asterix, a dot or something else at the end: remove it
input = input.substring(0, input.length()-1);
if (input.length()>0) {
lastC = input.charAt(input.length()-1);
} else {
break;
}
}
return input;
}
COM: <s> removes all non letter characters at the end </s>
|
funcom_train/31078750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOffsets(int[] offsets) {
int bi = getByteIndex();
_cases.clear();
for (int i = 0; i < offsets.length; i++) {
InstructionPtrStrategy next = new InstructionPtrStrategy(this);
next.setByteIndex(offsets[i] + bi);
_cases.add(next);
}
}
COM: <s> sets the offsets for the instructions representing the different </s>
|
funcom_train/39100945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLayoutComponent(Component comp) {
synchronized (comp.getTreeLock()) {
for (Enumeration e = tab.keys(); e.hasMoreElements();) {
String key = (String) e.nextElement();
if (tab.get(key) == comp) {
tab.remove(key);
if (comp == current) {
setCurrent(null);
}
return;
}
}
}
}
COM: <s> removes the specified component from the layout </s>
|
funcom_train/5737490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(BatchReport report){
batchSize+=report.batchSize;
completedCount+=report.completedCount;
successfulCount+=report.successfulCount;
getChangedPaths().addAll(report.getChangedPaths());
getDeletedPaths().addAll(report.getDeletedPaths());
getErrors().addAll(report.getErrors());
}
COM: <s> add the results of the provided report to this report enables </s>
|
funcom_train/10208873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(final double x, final double y, final double w, final double h) {
if ((npoints <= 0) || !bounds.intersects(x, y, w, h)) {
return false;
}
updateComputingPath();
return closedPath.contains(x, y, w, h);
}
COM: <s> tests if the interior of this code polygon code entirely contains the </s>
|
funcom_train/31402625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProblemReport analyze() {
refs = new ArrayList<VariableReference>();
if (newName.equals(vs.getName())) {
return setProblemReport(IDENTITY);
}
refs.addAll(getCrossReferenceSourceInfo().getReferences(vs));
return setProblemReport(EQUIVALENCE);
}
COM: <s> collects all references to the variable </s>
|
funcom_train/50345493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RouteLocation addLocation (Location location, int sequence){
RouteLocation rl = addLocation (location);
if (sequence < 0 || sequence > _routeHashTable.size())
return rl;
for (int i = 0; i < _routeHashTable.size()- sequence; i++)
moveLocationUp(rl);
return rl;
}
COM: <s> add a route location at a specific place sequence in the route </s>
|
funcom_train/3366328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void installNonRolloverBorders ( JComponent c ) {
// Put non-rollover borders on buttons. These borders reduce the margin.
Component[] components = c.getComponents();
for ( int i = 0; i < components.length; ++i ) {
if ( components[ i ] instanceof JComponent ) {
( (JComponent)components[ i ] ).updateUI();
setBorderToNonRollover( components[ i ] );
}
}
}
COM: <s> installs non rollover borders on all the child components of the jcomponent </s>
|
funcom_train/32814364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String key, String resourceName, String language) throws IllegalArgumentException {
if (key == null || key.trim().length() == 0) {
return "";
} else {
return this.getResource(resourceName, language).getString(key);
}
}
COM: <s> return the requested translation </s>
|
funcom_train/4737864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImage(String filename) {
Debug.write(this, "getImage(" + xjava.io.File.getVirtualRoot() + filename + ")");
return java.awt.Toolkit.getDefaultToolkit().getImage(xjava.io.File.getVirtualRoot() + filename);
}
COM: <s> modified to find images with relative relative path with a virtual root </s>
|
funcom_train/49892506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String parentPath, String tagName, AttrAccess aa) {
Element e = getEntity(parentPath);
Element child = make(tagName, aa);
e.appendChild(child);
this.changes.add(Change(parentPath, tagName, aa));
checkandincver();
}
COM: <s> to add youll find the parent somehow and then call this </s>
|
funcom_train/7291321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendAction(int number) {
float num = number * fMultiplier;
StyleModifier modifier = StyleModifier.createAddModifier(
fKey,
new Float(num));
if (fCharacter == MenuItemSet.CHARACTER) {
fTextPanel.modifyCharacterStyleOnSelection(modifier);
}
else {
fTextPanel.modifyParagraphStyleOnSelection(modifier);
}
}
COM: <s> handle the user input </s>
|
funcom_train/3276214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCheck () {
boolean check = false;
if (lastMove != null)
return lastMove.isCheck();
if (staleLegalDests)
genLegalDests();
check = (isBlackMove) ? blackKing.isInCheck() : whiteKing.isInCheck();
if (Log.debug)
Log.debug(ChessBoard.DEBUG, "the King in check: " + check);
return check;
}
COM: <s> returns true if the king in the side to move is in check </s>
|
funcom_train/30207491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getSessionExpirationTime(String name){
if(sessionExpirationTime == 0){
String xpath = String.format("repository[name='%s']/sessionExpirationTime", name);
String time = getField(xpath, "3600000");
sessionExpirationTime = Long.parseLong(time);
}
return sessionExpirationTime;
}
COM: <s> reads the string value of repository name s session expiration time </s>
|
funcom_train/14241642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
FigNote figClone = (FigNote)super.clone();
Vector v = figClone.getFigs();
figClone._bigPort = (FigRect)v.elementAt(0);
figClone._body = (FigPoly)v.elementAt(1);
figClone._urCorner = (FigPoly)v.elementAt(2);
figClone._text = (FigText) v.elementAt(3);
return figClone;
}
COM: <s> clone this figure </s>
|
funcom_train/8103617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Open(boolean b_append, String encode) {
this.b_append = b_append;
this.encode = encode;
try {
osw = new OutputStreamWriter(new FileOutputStream(path, b_append),encode);
} catch (Exception e) {
System.out.println("Problem serializing: " + e);
}
}
COM: <s> opens file stream </s>
|
funcom_train/49046047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonReal() {
if (buttReal == null) {
buttReal = new JRadioButtonMenuItem();
buttReal.setText("Real");
buttReal.setPreferredSize(new Dimension(60,10));
buttReal.setToolTipText("calculates the real part");
buttReal.addActionListener(this);
buttReal.setActionCommand("parameter");
//buttReal.setEnabled(false);
}
return buttReal;
}
COM: <s> this method initializes the option real </s>
|
funcom_train/50819159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getForcedFocusOwner() {
assertValid();
synchronized (this.sync) {
if (this.currentFocus == null || this.currentFocus.get() == null) {
Component newOwner = discoverFocusOwner(getWindow());
this.currentFocus = new WeakReference<Component>(newOwner);
}
return this.currentFocus.get();
}
}
COM: <s> gets the current focus owner or the next available focus if none is </s>
|
funcom_train/31911672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFailed(final UpdateManagerEvent e) {
EventQueue.invokeLater(new Runnable() {
public void run() {
Object[] dll = updateManagerListeners.toArray();
if (dll.length > 0) {
for (int i = 0; i < dll.length; i++) {
((UpdateManagerListener)dll[i]).
updateFailed(e);
}
}
}
});
}
COM: <s> called when an update failed </s>
|
funcom_train/50359725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getToolTipLocation(MouseEvent me) {
int index = locationToIndex(me.getPoint());
if (index > -1) {
Rectangle r = getCellBounds(index, index);
if (r != null) {
//Preferred position is 0.25 of the left
//and 0.75 from the top
return new Point(r.x + r.width/4, r.y+(r.height/4)*3);
}
}
return null;
}
COM: <s> returns the tooltip location in this components coordinate system </s>
|
funcom_train/3155285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ParamProperties createNadirViewBitmaskInfo() {
ParamProperties paramProps = _defaultFactory.createBitmaskParamProperties();
paramProps.setLabel(SstConstants.NADIR_VIEW_BITMASK_LABELTEXT);
paramProps.setDescription(SstConstants.NADIR_VIEW_BITMASK_DESCRIPTION);
paramProps.setDefaultValue(SstConstants.DEFAULT_NADIR_VIEW_BITMASK);
return paramProps;
}
COM: <s> creates the parameter information for the parameter nadir view bitmask </s>
|
funcom_train/12561438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean belongToCmdLayers(int x, int y) {
return containsPoint(x,y) ||
(menuLayer != null &&
(menuLayer.containsPoint(x,y) ||
(menuLayer.cascadeMenu != null &&
menuLayer.cascadeMenu.containsPoint(x,y))
)
);
}
COM: <s> returns true if the point lies in the bounds of commnad layers </s>
|
funcom_train/12807358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSimilar(String name) {
int idx = name.indexOf('[');
name = name.substring(0, idx + 1);
for (int k = 0; k < part.size(); ++k) {
if (part.get(k).startsWith(name))
return true;
}
return false;
}
COM: <s> search the current node for a similar name </s>
|
funcom_train/44457917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addParameter(Element parent, String name, String value) {
Element builderParam = parent.getOwnerDocument().createElement("parameter");
builderParam.setAttribute("name", name);
builderParam.setTextContent(value);
parent.appendChild(builderParam);
}
COM: <s> adds a parameter element to the xml result </s>
|
funcom_train/19913273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProperty(String propertyName, AbstractFile file) {
for (int i = 0; i < propertyResolvers.length; i++) {
if (propertyResolvers[i].getName().equals(propertyName)) {
values.put(propertyResolvers[i].getName(), new Integer(
propertyResolvers[i].operate(file)));
break;
}
}
}
COM: <s> this method will reread the property given by name if property exists </s>
|
funcom_train/31485866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(String data) {
if (data.length() == 0) {
throw new IllegalArgumentException("String size == 0");
}
try {
this.data = data.getBytes("UTF-8");
} catch (UnsupportedEncodingException uee) {
throw new InternalError("UTF-8 encoding not supported - "+uee);
}
binary = false;
}
COM: <s> set a text payload of this packet </s>
|
funcom_train/31910512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AffineTransform getGlobalTransform(){
AffineTransform ctm = new AffineTransform();
GraphicsNode node = this;
while (node != null) {
if(node.getTransform() != null){
ctm.preConcatenate(node.getTransform());
}
node = node.getParent();
}
return ctm;
}
COM: <s> returns the concatenated transform of this node </s>
|
funcom_train/18050985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enumFoundEntries(IKeydbGroupContentRecever receiver, int start, int limit) throws KeydbLockedException {
passLock();
KeydbEntry entry;
for(int i = 0; i < header.numEntries; ++i) {
if (this.entriesSearch[i] == 1) {
if (start > 0) {
--start;
} else if (limit > 0) {
--limit;
entry = new KeydbEntry(this);
entry.read(this.entriesOffsets[i], i);
receiver.addKeydbEntry(entry);
} else {
break;
}
}
}
}
COM: <s> enumerate entries in search result </s>
|
funcom_train/31702088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPolyline(int[] xCoords, int[] yCoords, int iLen) {
final GL gl = getGL();
gl.glBegin(GL.GL_LINE_STRIP);
for (int pos = 0; pos < iLen; pos++) {
gl.glVertex3f(xCoords[pos], -yCoords[pos], 0);
}
gl.glEnd();
}
COM: <s> draws a poly line not automatically closed </s>
|
funcom_train/19089969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void parseTimeZone (String buffer, int start, int end, int[] date, int[] timeZone) throws RuntimeException{
//fStart points right after the date
if ( start<end ) {
int sign = findUTCSign(buffer, start, end);
if ( sign<0 ) {
throw new RuntimeException ("Error in month parsing");
}
else {
getTimeZone(buffer, date, sign, end, timeZone);
}
}
}
COM: <s> shared code from date and year month datatypes </s>
|
funcom_train/11016616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLateHeaderFooter(HeaderFooterRecord rec) {
if (_headerFooter != null) {
throw new IllegalStateException("This page settings block already has a header/footer record");
}
if (rec.getSid() != HeaderFooterRecord.sid) {
throw new RecordFormatException("Unexpected header-footer record sid: 0x" + Integer.toHexString(rec.getSid()));
}
_headerFooter = rec;
}
COM: <s> headerfooter is new in 2007 </s>
|
funcom_train/13586488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SavePersonsIds(final String outFile){
final String NR= "\n";
StringBuffer sBuff = new StringBuffer();
for(Id id: this.population.getPersons().keySet()){
sBuff.append(id + NR);
}
//write to output text file
new TextFileWriter().write(sBuff.toString(),outFile,true);
System.out.println("Num of agents: " + this.population.getPersons().size());
}
COM: <s> saves ids in text file </s>
|
funcom_train/37400955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleFlagged(BrowserContext context, String flagValue, Set elements) {
Iterator i = elements.iterator();
while (i.hasNext()) {
ActionHandlerParam p = new ActionHandlerParam(context, (Element) i.next(), flagValue);
handle(p);
}
}
COM: <s> gets called when this handler is specified as parameter to a </s>
|
funcom_train/37514010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(/*@ non_null @*/ Object o) {
//System.out.println("CT " + compareString() + " " + ((MjDoc)o).compareString() + " " + compareString().//compareTo(((MjDoc)o).compareString()));
return compareString().compareToIgnoreCase(((MjDoc)o).compareString());
}
COM: <s> this compares two doc objects </s>
|
funcom_train/24536837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void erase() {
if (getParent() == null || !isVisible())
return;
Rectangle r = getBounds().getCopy();
r = new Rectangle(r.x - 15, r.y - 15, r.width + 15, r.height + 30);
getParent().translateToParent(r);
getParent().repaint(r.x, r.y, r.width, r.height);
}
COM: <s> make sure to repaint area outside border to handle clipping area </s>
|
funcom_train/18199879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showErrorDialog(final String message) {
Runnable showError = new Runnable() {
@Override
public void run() {
JOptionPane.showMessageDialog(ossobookFrame, message,
Messages.getString("GuiController.2"), //$NON-NLS-1$
JOptionPane.ERROR_MESSAGE);
}
};
if (SwingUtilities.isEventDispatchThread()) {
showError.run();
} else {
SwingUtilities.invokeLater(showError);
}
}
COM: <s> for simplified creation of error typed message dialogs </s>
|
funcom_train/978098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntrarNove() {
System.out.println("entrarNove");
Calculadora instance = new Calculadora();
String expResult = "9.0";
String result = instance.entrarNove();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
}
COM: <s> test of entrar nove method of class calculadora </s>
|
funcom_train/25187446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetAdditionalProperties_JSchema() throws Exception {
System.out.println("setAdditionalProperties");
JSchema instance = new JSchema();
assertNull(instance.getAdditionalProperties());
instance.setAdditionalProperties(new JSchema());
assertEquals(new JSchema(), instance.getAdditionalProperties());
assertTrue(instance.isAdditionalProperties());
}
COM: <s> test of set additional properties method of class jschema </s>
|
funcom_train/8009949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Skin getSkin() {
HttpSession sess = getSession();
Skin ret = _skin;
if (ret == null)
ret = (Skin) sess.getAttribute(getApplicationName() + "%$DEFAULT_SKIN$%");
if (ret == null)
ret = (Skin) sess.getAttribute("%$DEFAULT_SKIN$%");
return ret;
}
COM: <s> gets the skin for this page </s>
|
funcom_train/1540957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shear(double shx, double shy) {
currentTransform.shear(shx, shy);
try {
writeTransform(new AffineTransform(1, shy, shx, 1, 0, 0));
} catch (IOException e) {
handleException(e);
}
}
COM: <s> shears the current transform </s>
|
funcom_train/18864310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionPath(TreePath path) {
if (path != null) {
Object o = path.getLastPathComponent();
if (o != null) {
if ( isAccountEnabled((Account)o) ) {
super.setSelectionPath(path);
}
}
} else {
super.setSelectionPath(null);
}
}
COM: <s> overrides the super to prevent selection of place holder accounts </s>
|
funcom_train/51204661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loginPasswordFieldKeyReleased(java.awt.event.KeyEvent evt)
{//GEN-FIRST:event_loginPasswordFieldKeyReleased
String pass = new String(loginPasswordField.getPassword());
String user = loginUsernameField.getText();
if (user.equals("") || pass.equals(""))
loginButton.setEnabled(false);
else
loginButton.setEnabled(true);
}//GEN-LAST:event_loginPasswordFieldKeyReleased
COM: <s> used to enable and disable the login button depending on the states </s>
|
funcom_train/41016782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getClickedButtonIndex(int x, int y) {
if (alignType == ALIGN_HORIZONTAL)
return getClickedButtonIndexHorizontal(x, y);
else if (alignType == ALIGN_VERTICAL)
return getClickedButtonIndexVertical(x, y);
else if (alignType == ALIGN_VERTICAL_SCROLL)
return getClickedButtonIndexScroll(x, y);
// no else
else
return 0;
}
COM: <s> get index of clicked button pointer press wrapper </s>
|
funcom_train/22783983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateLayout() {
String sel = (String) typeSelection.getSelectedItem();
// clear current
editor.remove(width);
editor.remove(slash);
editor.remove(height);
editor.remove(pixel);
if (BIGGER.equals(sel) || SMALLER.equals(sel)) {
// all must be shown
editor.add(width);
editor.add(slash);
editor.add(height);
} else if (WIDER.equals(sel) || THINNER.equals(sel)) {
// just width must be added
editor.add(width);
} else if (HEIGHER.equals(sel) || LOWER.equals(sel)) {
// just height must be added
editor.add(height);
}
// pixel must be added anyway
editor.add(pixel);
}
COM: <s> this methode will reassemble the editor to show just required fields </s>
|
funcom_train/44018124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void authenticate() throws Exception {
// Create an authentication token
auth = client.auth_createToken();
// System.out.println("auth token: " + auth);
// The following functions can generate exceptions
final BrowserLauncher browserLauncher = new BrowserLauncher(null);
browserLauncher.openURLinBrowser(Facebook.LOGIN_URL + "?api_key="
+ Facebook.API_KEY + "&auth_token=" + auth);
}
COM: <s> called from either the advanced options or when not authenticated and </s>
|
funcom_train/32060676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doPickEvent(PickEvent pe) {
Vector<Taskforce> mergegroup =
tf.getTotalMergeGroup(sf.game);
taskforcepicker.basePickerRangeOnList(mergegroup);
if (mergegroup.size() > 1) {
sf.dc.map.selectThing(mergegroup.get(taskforcepicker.getPick()));
} else {
throwRE("The taskforce view has a contradictory"
+ " state regarding the taskforce picker control"
+ " and the taskforce merge group.");
}
}
COM: <s> sets the taskforce view to the next friendly taskforce in merge </s>
|
funcom_train/28418677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPinged(Controller client, String token) {
/*
* In case we manually ping while waiting for ping
*/
if (clients.contains(client)) {
tokens.remove(clients.indexOf(client));
clients.remove(client);
}
client.setPinged();
clients.add(client);
tokens.add(token);
}
COM: <s> adds a client to the list of pinged </s>
|
funcom_train/17279610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void query(CompletionResultSet resultSet) {
assert (resultSet != null);
assert (SwingUtilities.isEventDispatchThread());
if (component != null) {
doc = (NotebookDocument)component.getDocument();
} else {
doc = null;
}
queryInvoked = true;
synchronized (this) {
performQuery(resultSet);
}
}
COM: <s> called by completion infrastructure in awt thread to populate </s>
|
funcom_train/49991678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
RootPanel titlePanel = RootPanel.get("TitlePanel");
Label label = new HTML("<b><font size='5'>ICAT Usage Reports</font></b>");
titlePanel.add(label);
RootPanel root = RootPanel.get("MainPanel");
root.setTitle("Root Panel");
FlexTable table = createReportTable();
root.add(table);
}
COM: <s> the entry point method called automatically by loading a module </s>
|
funcom_train/31156708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) throws ClassCastException {
GregorianCalendar otherCalendar = ((LogBookEntry) o).calendar;
if (this.calendar.before(otherCalendar)) {
return -1;
}
if (this.calendar.after(otherCalendar)) {
return 1;
}
return this.toString().compareTo(o.toString());
}
COM: <s> compares this log book entry with the specified object for order </s>
|
funcom_train/16461827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transport connect(Session session) throws MessagingException {
LOG.trace("ENTER");
LOG.debug("Host [" + server + "]");
LOG.debug("Port [" + serverPort + "]");
LOG.debug("Account [" + account + "]");
Transport transport = session.getTransport();
transport.connect(server, serverPort, account, password);
LOG.debug("Connection OK!");
LOG.trace("EXIT");
return transport;
}
COM: <s> connects to the server </s>
|
funcom_train/32959767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIncludeValueset() throws JAXBException, IOException {
JAXBContext jc = setupJAXBContext("org.tolven.trim");
InputStream prescriptionMedStream = getClass().getResourceAsStream("PrescriptionMedications.trim.xml");
Trim trim = (Trim) unmarshalStream(jc, prescriptionMedStream, factory);
SpecialIncludeScanner scanner = new SpecialIncludeScanner();
scanner.setTrim( trim );
scanner.setJc(jc);
scanner.scan();
logger.info( marshal(jc, trim ) );
}
COM: <s> test valueset binds </s>
|
funcom_train/46935236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ConfigurableApplicationContext loadContext() {
ConfigurableApplicationContext context = getBaseContext(getConfigLocations());
List<Class> classHierarchy = getClassHierarchy();
for (int i = 0; i < classHierarchy.size(); i++) {
Class clazz = classHierarchy.get(i);
context = getApplicationContext(clazz,
ClassUtils.getShortName(clazz) + "Context.xml", context);
}
this.context = context;
return context;
}
COM: <s> load the test spring context </s>
|
funcom_train/12183366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ObjectListSelector addAttributeSelector(Composite parent) {
final ObjectListSelector selector = new ObjectListSelector(parent,
SWT.NORMAL, PARSER_FACTORY.createAttributeSelectorParser(),
new AttributeSelectorProviderFactory(), null, false,
"AttributeSelector.");
GridData objectSelectorGridData =
new GridData(GridData.FILL_HORIZONTAL);
selector.setLayoutData(objectSelectorGridData);
return selector;
}
COM: <s> add a object list selector for attribute selectors </s>
|
funcom_train/20728060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getFields(int WhyGet) {
switch (WhyGet) {
case DataMovementPane.FIRST:
break;
case DataMovementPane.CHANGE:
case DataMovementPane.ADD:
getWholeList(1);
break;
case DataMovementPane.DELETE:
getCompanyId(1);
break;
}
}//}}}
//{{{ +getWholeList(int) : void
COM: <s> gets the fields attribute of the company form object </s>
|
funcom_train/15637241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Question getSelectedQuestion(){
Section s = getSelectedSection();
if (s == null){
return null;
}
int selIdx = listQuestions.getSelectedIndex();
if (selIdx != -1){
return (Question)s.getQuestions().get(selIdx);
}
return null;
}
COM: <s> retrieves the question selected in the test edit frame </s>
|
funcom_train/50453438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void searchDependencies (List v) {
ChunkDependEntry cde;
PropDependEntry pde;
ConfigChunk ch;
int i, j;
for (i = 0; i < v.size(); i++) {
cde = (ChunkDependEntry)v.get(i);
for (j = 0; j < cde.propdepends.size(); j++) {
pde = (PropDependEntry)cde.propdepends.get(j);
//ch = get (pde.dependency_name);
ch = searchDependency (pde.dependency_name);
if (ch != null)
pde.other_files.add (getName());
}
}
}
COM: <s> searches self for chunks that satisfy dependencies </s>
|
funcom_train/130012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(final String text) {
if (text == null) {
this.text = "";
}
else {
this.text = text;
}
if (font != null) {
glyphVector = font.createGlyphVector(context, text);
super.setShape(glyphVector.getOutline());
}
}
COM: <s> sets the text that will be rendered </s>
|
funcom_train/5079190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Clickable createPageUp() {
final Clickable clickable = new Clickable();
clickable.setOpaque(true);
clickable.setBackgroundColor(COLOR_TRACK);
clickable.setRequestFocusEnabled(false);
clickable.setFocusTraversable(false);
clickable.addChangeListener(new ChangeListener() {
public void handleStateChanged(ChangeEvent evt) {
if (clickable.getModel().isArmed())
clickable.setBackgroundColor(ColorConstants.black);
else
clickable.setBackgroundColor(COLOR_TRACK);
}
});
return clickable;
}
COM: <s> creates the pageup figure for the scrollbar </s>
|
funcom_train/48747305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEmailAuthCode() throws DBException {
Date createDate = getFieldDate("CreateDate");
long dateLong = createDate.getTime();
long emailAuthCode = Math.round(dateLong * 1.71);
return Long.toString(emailAuthCode);
} /* getEmailAuthCode() */
COM: <s> here we generate an authorization code that would be hard for someone to </s>
|
funcom_train/118685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillList() {
try {
DefaultListModel model = new DefaultListModel();
Iterator all = LayoutRegistry.registeredLayoutControllers();
while (all.hasNext()) {
LayoutController controller = (LayoutController) all.next();
model.addElement(controller);
}
lstLayoutControllers.setModel(model);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> fills the list with the layout controllers </s>
|
funcom_train/21296162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mayUncoverCard(MemoryPlayer player, MemoryCard card) {
// check player
if (!mayAct(player)) {
// it's not the player's turn
return false;
} else
// check card
if (!mayUncoverCard(card)) {
// card may not be uncovered in the current state
return false;
} else {
// everything is ok
return true;
}
}
COM: <s> specifies whether the specified code player code may now uncover the </s>
|
funcom_train/46098733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|74-getter|0|74-preInit
// write pre-init user code here
spacer = new Spacer(16, 10);//GEN-LINE:|74-getter|1|74-postInit
// write post-init user code here
}//GEN-BEGIN:|74-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/51610723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(int rowIndex, int columnIndex) {
try {
//return null if row does not exist
if(rowIndex!=rowCount && rowSet.absolute(rowIndex+1))
return rowSet.getObject(columnIndex);
} catch (SQLException sqlex) {
sqlex.printStackTrace();
}
return null;
}
COM: <s> returns value of the specified column at the specified row </s>
|
funcom_train/8528364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLEventWriter getXMLEventWriter(File outputFile, String encoding) throws FileNotFoundException, XMLStreamException {
XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
// outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.FALSE);
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLEventWriter xew = outputFactory.createXMLEventWriter(new FileOutputStream(outputFile), encoding);
return xew;
}
COM: <s> returns an xmlevent writer pointed to the file tt output file tt </s>
|
funcom_train/40650917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
initGUI();
initDemo();
// float target = 1000 / 60.0f;
// float frameAverage = target;
// long lastFrame = System.currentTimeMillis();
// float yield = 10000f;
// float damping = 0.1f;
// long renderTime = 0;
// long logicTime = 0;
Timer updateTimer = new Timer() {
public void run() {
update();
}
};
updateTimer.scheduleRepeating(50);
// update();
}
COM: <s> start the simulation running </s>
|
funcom_train/20321632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand2() {
if (exitCommand2 == null) {//GEN-END:|53-getter|0|53-preInit
// write pre-init user code here
exitCommand2 = new Command("Sair", Command.EXIT, 0);//GEN-LINE:|53-getter|1|53-postInit
// write post-init user code here
}//GEN-BEGIN:|53-getter|2|
return exitCommand2;
}
COM: <s> returns an initiliazed instance of exit command2 component </s>
|
funcom_train/3883198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateCatalogueType_MaxLength(String catalogueType, DiagnosticChain diagnostics, Map context) {
int length = catalogueType.length();
boolean result = length <= 1024;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImsMdRootv1p1Package.Literals.CATALOGUE_TYPE, catalogueType, length, 1024, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em catalogue type em </s>
|
funcom_train/26535782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int findEndTagEnd(StringBuffer html, int pos, String tag) {
int result = StringUtils.indexOf(html, "</"+tag+">", pos, true);
if (result != -1) {
result += tag.length() + 2;
} else {
result = StringUtils.indexOf(html, ">", pos);
}
return result;
}
COM: <s> locate the end of an html tag with the given name </s>
|
funcom_train/8439040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdProcessLogin() {
if (cmdProcessLogin == null) {//GEN-END:|51-getter|0|51-preInit
// write pre-init user code here
cmdProcessLogin = new Command("\u0412\u043E\u0439\u0442\u0438", Command.OK, 0);//GEN-LINE:|51-getter|1|51-postInit
// write post-init user code here
}//GEN-BEGIN:|51-getter|2|
return cmdProcessLogin;
}
COM: <s> returns an initiliazed instance of cmd process login component </s>
|
funcom_train/42087438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeComic() {
if (allComics.isEmpty()) {
//Nothing to remove...
return;
}
if (current < 0 || current >= allComics.size()) current = 0;
allComics.remove(current);
if(current >= allComics.size()) current = 0;
}
COM: <s> removes a comic site from the list </s>
|
funcom_train/17762994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClass(){
WireContext wireContext = createWireContext(
"<objects>" +
" <class name='o' class-name='"+ClassWireTest.class.getName()+"' />" +
"</objects>"
);
Object o = wireContext.get("o");
assertNotNull(o);
assertEquals(ClassWireTest.class, o);
}
COM: <s> tests if a valid definition works </s>
|
funcom_train/2272509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getThumbprint() throws NoSuchAlgorithmException {
byte[] token = getToken();
// Get the SHA-1 thumbprint of the token.
MessageDigest digest = MessageDigest.getInstance( "SHA");
digest.update( token);
byte[] thumbPrintBytes = digest.digest();
return Base64.encode(thumbPrintBytes);
}
COM: <s> get the sha 1 thumbprint of the security token </s>
|
funcom_train/34353260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNamespacePrefix(Resource r, Model m) {
if (! r.isAnon()) {
String ns = r.getNameSpace();
String prefix = modelToSplit.getNsURIPrefix(ns);
if (prefix != null) {
m.setNsPrefix(prefix, ns);
}
}
}
COM: <s> for the given resource or property which is a subclass of resource </s>
|
funcom_train/46732113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInstanceRef(DisplayModel instanceRef) {
if (Converter.isDifferent(this.instanceRef, instanceRef)) {
DisplayModel oldinstanceRef= new DisplayModel(this);
oldinstanceRef.copyAllFrom(this.instanceRef);
this.instanceRef.copyAllFrom(instanceRef);
setModified("instanceRef");
firePropertyChange(String.valueOf(INTERFACETRANSACTIONS_INSTANCEREFID), oldinstanceRef, instanceRef);
}
}
COM: <s> instance which will process this transaction </s>
|
funcom_train/37075545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Comment getOldComment() {
if (!isComment())
return null; // shouldnt happen - exception? err msg?
// so ive made both update and delete use prevalue. Previously update was using
// preValue and delete subpartValue - doesnt it make more sense to be consistent?
return (Comment)getOldSubpartValue();
}
COM: <s> convenience method for getting old comment </s>
|
funcom_train/8797211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawLineOnAxis( Vector3d axis, Color color ) {
Point2i centerPoint;
Point2i endPoint;
centerPoint = getScreenLocationFromWorldSpace( new Point3d() );
endPoint = getScreenLocationFromWorldSpace( new Point3d( axis ) );
graphics.setColor( color );
graphics.drawLine( centerPoint.x, centerPoint.y, endPoint.x, endPoint.y );
}
COM: <s> draw line on axis </s>
|
funcom_train/28350430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MachineSimulator loadSimulator( final String type ) {
MachineSimulator simulator = null;
if ( !_loadedSimulators.containsKey( type ) ) {
if ( type.equals( EmpiricalSimulator.getType() ) ) {
simulator = new EmpiricalSimulator( _orbitModel );
}
else if ( type.equals( OnlineModelSimulator.getType() ) ) {
simulator = new OnlineModelSimulator( _orbitModel );
}
else {
return null;
}
}
else {
simulator = _loadedSimulators.get( type );
}
setSimulator( simulator );
return simulator;
}
COM: <s> load the simulator of the specified type </s>
|
funcom_train/28482268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sqlDeleteFavoritesByUser(User pUser) throws DatabaseException {
DBConstraints constraints = new DBConstraints();
constraints.getArguments().addConstArgument("favorites", "userKey",
pUser.getPrimaryKey(), DBCompare.EQUAL);
sqlDeleteFavorite(constraints);
}
COM: <s> this method deletes every favorite belonging to a certain user </s>
|
funcom_train/9163737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTest() {
File[] files = dir.listFiles();
for (File f: files) {
if (TemplateSuite.isTest(f.getName())) {
expected.remove(TemplateSuite.getTestName(f.getName()));
}
}
for (String s: expected) {
System.out.println(s);
}
if (!expected.isEmpty()) {
throw new AssertionFailedError("Cases not covered: " + expected);
}
}
COM: <s> tests that at least one template source code file exists for </s>
|
funcom_train/17848336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
while (getWaitTime() > 0) {
Thread.sleep(100);
setWaitTime(getWaitTime() - 100);
}
mSearchBar.setVisible(false);
mSearchCloseBtn.setVisible(false);
setWaitTime(5000);
} catch (Exception e) {}
}
COM: <s> waits for closing of the panel </s>
|
funcom_train/50976075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NOb convertToNOb(NoteAddition na) {
// Let's try just copying all the properties, and that's all
NOb ret = new NOb();
Enumeration keys = na.keys();
String key;
while(keys.hasMoreElements()) {
key = (String)keys.nextElement();
ret.put(key, na.getProp(key));
}
return ret;
}
COM: <s> converts a note addition to a nob </s>
|
funcom_train/215168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBoxMenuItem createCheckItem(boolean enabled, boolean selected) {
JCheckBoxMenuItem item = createCheckBoxMenuItem(
getToggleLabel(enabled, selected),
selected);
item.setEnabled(enabled);
item.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
JCheckBoxMenuItem source = (JCheckBoxMenuItem) e.getSource();
source.setText(getToggleLabel(source.isEnabled(), source.isSelected()));
}
});
return item;
}
COM: <s> creates and answers a code jcheck box menu item code </s>
|
funcom_train/34005910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SalesHeadBean getSalesHeadById(Long id) throws CommonException{
SalesHeadBean queryForObject;
try {
//[[ queryForObject is an implemented interface of iBatis ]]
queryForObject = (SalesHeadBean)this.getConfig().queryForObject("sales.getSalesHeadById", id);
return queryForObject;
} catch (SQLException e) {
throw new CommonException(e);
}
}
COM: <s> returns an specific header object </s>
|
funcom_train/31702201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Point2D createMarkPoint(int graphPos, double dX, double dY) {
markCounter++;
String markLabel = "Mark #" + markCounter;
int symbolType = (graphPos % 3) + 1;
return new Point2D(dX, dY, markLabel, symbolType, Color.green.darker(), Color.black);
}
COM: <s> creates a point for user marking </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.