__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37751660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String get_preference( String profile, Enum key) {
log.finest("key " + key.name());
String pref;
if ((pref = get_user_preference( profile, key )) != null) {
return pref;
}
if ((pref = get_system_preference( profile, key )) != null) {
return pref;
}
return get_default_key_value(key);
}
COM: <s> gets the user preference value if set else the system preference value </s>
|
funcom_train/48143822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object a) {
if(a!=null && (a instanceof IntegerVector) && N==((IntegerVector)a).N) {
final IntegerVector iv=(IntegerVector)a;
for(int i=0;i<N;i++) {
if(vector[i]!=iv.getComponent(i))
return false;
}
return true;
} else
return false;
}
COM: <s> compares two integer vectors for equality </s>
|
funcom_train/2552176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File findByID(Integer id) {
String query = "from File as file where file.fileId = ?";
File file = null;
Object[] parameters = { id };
List list = this.getHibernateTemplate().find(query, parameters);
if (list.size() > 0) {
file = (File) list.get(0);
}
return file;
}
COM: <s> finds an instance of file in the database by the file id </s>
|
funcom_train/2489891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopSaving () {
boolSaving = false;
if ( threadProgress != null ) {
threadProgress.terminateNormaly ();
threadProgress = null;
}
if ( processor != null ) {
processor.stop ();
processor.close ();
}
if ( dlgProgress != null ) {
dlgProgress.dispose ();
dlgProgress = null;
}
}
COM: <s> this method cleans up after the completion of the file save procedure </s>
|
funcom_train/40560548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToJSONStringValue() {
// create the constraint.
constraint =
new ConstraintImpl<String>("aTable", "aColumn", "HELLO", "like");
// make the expected JSON.
String expectedJSON =
"{\"majorIdentifier\":\"aTable\", "
+ "\"minorIdentifier\":\"aColumn\", "
+ "\"value\":\"HELLO\", \"operator\":\"like\"}";
// assert that they are the same.
assertEquals(expectedJSON, constraint.toJSON());
}
COM: <s> test getting the json from a string based </s>
|
funcom_train/3558749 | /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 value = null;
try {
value = getResourceBundle().getString(key);
} catch (MissingResourceException e) {
System.out
.println(
"java.util.MissingResourceException: Couldn't find value for: " +
key);
}
if (value == null) {
value = "Could not find resource: " + key + " ";
}
return value;
}
COM: <s> this method returns a string from the demos resource bundle </s>
|
funcom_train/12649692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int activeGroupCount() {
int ngroupsSnapshot;
ThreadGroup[] groupsSnapshot;
synchronized (this) {
if (destroyed) {
return 0;
}
ngroupsSnapshot = ngroups;
if (groups != null) {
groupsSnapshot = new ThreadGroup[ngroupsSnapshot];
System.arraycopy(groups, 0, groupsSnapshot, 0, ngroupsSnapshot);
} else {
groupsSnapshot = null;
}
}
int n = ngroupsSnapshot;
for (int i = 0 ; i < ngroupsSnapshot ; i++) {
n += groupsSnapshot[i].activeGroupCount();
}
return n;
}
COM: <s> returns an estimate of the number of active groups in this </s>
|
funcom_train/36061730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
try {
long start = System.currentTimeMillis();
long waitFor = downloadTimeoutSeconds * 1000;
synchronized (httpMethodMutex) {
if( stop == false ){
httpMethodMutex.wait(waitFor);
}
}
//Abort the method if we hit the timeout (since we are forcing the download to stop)
if( ((System.currentTimeMillis() - start) * 1000 ) >= waitFor ){
method.abort();
timeOutReached = true;
}
} catch (InterruptedException e) {
//Ignore this exception, interrupt may have been called
}
}
COM: <s> start monitoring the thread and call abort if it exceeds the timeout </s>
|
funcom_train/3990034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBadania_wykonanePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SkierowaniePoradniaSpec_badania_wykonane_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SkierowaniePoradniaSpec_badania_wykonane_feature", "_UI_SkierowaniePoradniaSpec_type"),
PrzychodniaPackage.Literals.SKIEROWANIE_PORADNIA_SPEC__BADANIA_WYKONANE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the badania wykonane feature </s>
|
funcom_train/5572264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show(final int delay) {
if (_logMonitorFrame.isVisible()) {
return;
}
// This request is very low priority, let other threads execute first.
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Thread.yield();
pause(delay);
_logMonitorFrame.setVisible(true);
}
});
}
COM: <s> show the frame for the log broker monitor </s>
|
funcom_train/22032791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updatePosition(MouseEvent e) {
int x = e.getX();
if (x < 0) x = 0;
if (x >= getBounds().width) x = getBounds().width - 1;
float dist = (float) x / (float) (getBounds().width - 1);
setValue(lower + dist*(upper - lower));
}
COM: <s> recalculate the position and value of the slider given the new mouse position </s>
|
funcom_train/1304104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNormalizedUrlNoAnchor() {
if (_nnaUrlString == null) {
final StringBuilder builder = new StringBuilder();
builder.
append(getProtocol(true)).
append(getHost(true, true, true)).
append(getPath(false)).
append(getQuery());
_nnaUrlString = builder.toString();
}
return _nnaUrlString;
}
COM: <s> get the fully normalized url but without the anchor </s>
|
funcom_train/11020583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Renderable renderDefinition(final String definitionName) {
return new AbstractDefaultToStringRenderable(getVelocityContext(),
null, getResponse(), getRequest()) {
public boolean render(InternalContextAdapter context, Writer writer) {
Request velocityRequest = createVelocityRequest(
getServletContext(), writer);
TilesContainer container = TilesAccess
.getCurrentContainer(velocityRequest);
container.render(definitionName, velocityRequest);
return true;
}
};
}
COM: <s> renders a definition </s>
|
funcom_train/19060619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
AddressbookTreeNode node = (AddressbookTreeNode) tree
.getLastSelectedPathComponent();
if (node == null) {
return;
}
FolderItem item = node.getFolderItem();
if (item.get("type").equals("AddressbookFolder")) {
buttons[1].setEnabled(true);
selectedFolder = (AddressbookFolder) node;
} else {
buttons[1].setEnabled(false);
}
}
COM: <s> tree selection listener </s>
|
funcom_train/18899431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServer(String server) throws JspTagException {
try {
this.server = new URL(server);
}
catch (MalformedURLException mue) {
// log the error
log.error("Invalid SOAP endpoint URL in init tag");
// wrap it and re-throw!
throw new JspTagException("init: Invalid URL specified as server " +
"attribute value");
}
// try-catch
}
COM: <s> sets the url of the soap endpoint of the kowari server containing metadata </s>
|
funcom_train/22549030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearAllDownloads() {
List<Downloader> buf;
synchronized(this) {
buf = new ArrayList<Downloader>(active.size() + waiting.size());
buf.addAll(active);
buf.addAll(waiting);
active.clear();
waiting.clear();
}
for(Downloader md : buf )
md.stop();
}
COM: <s> clears all downloads </s>
|
funcom_train/8288010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkParameters(HttpServletRequest request){
if ( Utils.isEmpty(request.getParameter("sessionid"))
|| Utils.isEmpty(request.getParameter("username"))
|| Utils.isEmpty(request.getParameter("avatar"))
){
return false;
} else {
return true;
}
}
COM: <s> return true if the parameters are not empty </s>
|
funcom_train/48459221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validate(String fileName) {
Validator validator;
// Init the sax-parser and the schema for validation purposes.
initXmlParser();
validator = m_Schema.newValidator();
try {
validator.validate(new StreamSource(new FileInputStream(fileName)));
} catch (SAXException e) {
System.out.println(fileName + " is not valid.");
return false;
} catch (IOException e) {
System.out.println("IOException occured. Try the validation again.");
return false;
}
return true;
}
COM: <s> validates given file name based on the meta data </s>
|
funcom_train/11348807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProvidedService setDelegation(String method, String policy) {
Element element = new Element("delegation", "");
element.addAttribute(new Attribute("method", method));
element.addAttribute(new Attribute("policy", policy));
m_delegation.add(element);
return this;
}
COM: <s> sets the delegation policy of the given method </s>
|
funcom_train/15588298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTextPOP3Server() {
if (textPOP3Server == null) {
textPOP3Server = new JTextField();
textPOP3Server.setSize(new Dimension(156, 20));
textPOP3Server.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
textPOP3Server.setText("");
textPOP3Server.setToolTipText("type your POP3 server here");
textPOP3Server.setLocation(new Point(120, 15));
}
return textPOP3Server;
}
COM: <s> this method initializes text pop3 server </s>
|
funcom_train/37830285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean stepTest(final Player player, final String text) {
logger.debug(">>> " + text);
speakerNPC.remove("text");
final Sentence sentence = ConversationParser.parse(text);
if (sentence.hasError()) {
logger.warn("problem parsing the sentence '" + text + "': "
+ sentence.getErrorString());
}
final boolean res = step(player, sentence);
logger.debug("<<< " + speakerNPC.get("text"));
return res;
}
COM: <s> do one transition of the finite state machine with debugging output and </s>
|
funcom_train/50862823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMalfunctionRepairPart(String malfunctionName, String partName, int number, int probability) {
List<RepairPart> partList = repairParts.get(malfunctionName);
if (partList == null) {
partList = new ArrayList<RepairPart>();
repairParts.put(malfunctionName, partList);
}
partList.add(new RepairPart(partName, number, probability));
}
COM: <s> adds a repair part for a malfunction </s>
|
funcom_train/44165166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void errorMessage(String messageID, String message) {
String display = null;
if (messageID != null) {
display = Messages.message(messageID);
}
if (display == null || "".equals(display)) display = message;
ErrorPanel errorPanel = new ErrorPanel(freeColClient, gui, display);
showSubPanel(errorPanel);
}
COM: <s> displays an error message </s>
|
funcom_train/37445762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getCellRect(final int row, final int column, final boolean includeSpacing) {
if (column < frozenColumns) {
return lockedTable.getCellRect(row, column, includeSpacing);
} else {
return scrollTable.getCellRect(row, column - frozenColumns, includeSpacing);
}
}
COM: <s> returns a rectangle for the cell that lies at the intersection of </s>
|
funcom_train/5580756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean _verifySubnetAdmin() {
if (!_checkSubnetAdmin()) {
_usubnet.setForeground(Color.RED);
_usubnet.setToolTipText("Subnet Admin is not OK");
return false;
} else {
_usubnet.setForeground(Color.BLACK);
_usubnet.setToolTipText(null);
}
if (_account == null ||
!_account.getSubNet().equals(_getSubnetAdmin())) {
_fireAccountChanged();
}
return true;
}
COM: <s> check if subnetadmin is ok </s>
|
funcom_train/25373553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TechnicalInformation getTechnicalInformation() {
TechnicalInformation result;
result = new TechnicalInformation(Type.MISC);
result.setValue(Field.AUTHOR, "Wikipedia");
result.setValue(Field.TITLE, "Minkowski distance");
result.setValue(Field.URL, "http://en.wikipedia.org/wiki/Minkowski_distance");
return result;
}
COM: <s> returns an instance of a technical information object containing </s>
|
funcom_train/41332860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintDirectly(Graphics2D g, JComponent c, int w, int h, Object[] extendedCacheKeys) {
g = (Graphics2D) g.create();
configureGraphics(g);
doPaint(g, c, w, h, extendedCacheKeys);
g.dispose();
}
COM: <s> convenience method which creates a temporary graphics object by creating </s>
|
funcom_train/51812493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ClassLoader getClassLoader() {
try {
ClassLocator locator = new ClassLocator();
File loc = locator.findClassPathLocation(getClass());
return new URLClassLoader( new URL[] { loc.toURI().toURL() }, null);
}
catch (Exception e) {
fail(e.toString());
// never reaches
return null;
}
}
COM: <s> method designed to be overridden by subclass to allow returning class loaders </s>
|
funcom_train/2665332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String tableName, HashMap<String, String> colNames) {
if (_app == null) {
throw new IllegalStateException("application has not been set");
}
if (colNames == null) {
_tables.remove(tableName);
} else {
_tables.put(tableName, colNames);
}
_app.savePreferences(PreferenceType.EDITWHERECOL_PREFERENCES);
return;
}
COM: <s> add or replace a table name hashmap of column names mapping </s>
|
funcom_train/26216595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadMinimap(File minimapFile) throws IOException, JDTextureFormatException {
LOGGER.fine("loadMinimap");
LOGGER.finer("minimapFile: " + minimapFile);
minimap = JDTextureManager.getTexture(minimapFile, GL.GL_NEAREST, GL.GL_NEAREST, false, false);
}
COM: <s> loads the texture of the minimap from the given file </s>
|
funcom_train/11041142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AsyncPort getPort(Executor ex) {
AsyncService service = getService(ex);
AsyncPort port = service.getAsyncPort();
assertNotNull("Port is null", port);
Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
rc.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
DOCLITWR_ASYNC_ENDPOINT);
return port;
}
COM: <s> auxiliary method used for obtaining a proxy pre configured with a </s>
|
funcom_train/44144815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDocument(URL file) {
GraphModelFileFormat fileFormat =
DefaultGraphModelFileFormatXML.getFileFormatXML();
try {
GraphModel model = new DefaultGraphModel();
JFlowgraph gpGraph = new JFlowgraph(model);
fileFormat.read(file, gpGraph);
addDocument(file, gpGraph, model, null);
} catch (Exception e) {
JOptionPane.showMessageDialog(
getFrame(),
e
+ "\nFile="
+ file
+ "\nFileFormat="
+ fileFormat,
Translator.getString("Error"),
JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> you can add a document by giving the filename </s>
|
funcom_train/44222272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String extractReferences() {
if (broken)return null;
StringBuffer sb = new StringBuffer();
for (int i = 0; i < this.pgs.size(); i++) {
TextBlock pg = (TextBlock)this.pgs.get(i);
if (pg.type == DISREGARDED ||
pg.type == FIGURE ||
pg.type == FOOTER ||
pg.type == HEADER)
continue;
if (pg.section != this.REFERENCES)
continue;
sb.append(pg.s);
}
return sb.toString();
}
COM: <s> extracts and returns the references cited in this paper </s>
|
funcom_train/27747012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean similarTo(StyleRange style) {
if (this.foreground != null) {
if (!this.foreground.equals(style.foreground)) return false;
} else if (style.foreground != null) return false;
if (this.background != null) {
if (!this.background.equals(style.background)) return false;
} else if (style.background != null) return false;
if (this.fontStyle != style.fontStyle) return false;
return true;
}
COM: <s> compares the specified object to this style range and answer if the two </s>
|
funcom_train/20400279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int parseUnflaggedOption(String[] args, int index) {
if (curUnflaggedOption != null) {
processParameter(curUnflaggedOption, args[index]);
if (!curUnflaggedOption.isGreedy()) {
advanceUnflaggedOption();
}
}
else {
result.addException(null, new ArgumentsException("Unexpected argument: "
+ args[index]));
}
return(index + 1);
}
COM: <s> parses the unflagged form of an option i </s>
|
funcom_train/44728049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdd101ChildrenAndArrayLengthis200() {
for (int cntr = 0; cntr < DefaultGenericNode.DEFAULT_CHILDREN_ARRAY_SIZE + 1; cntr++) {
root.addChild(new DefaultGenericNode("node " + cntr));
}
assertEquals(DefaultGenericNode.DEFAULT_CHILDREN_ARRAY_SIZE * 2, root
.getChildrenAsArray().length);
}
COM: <s> test that adding 101 nodes enlarges array size to 200 elements </s>
|
funcom_train/15945212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean specifyRelation() {
/*if (getGraph() == null) return false;
getPanelFactory().setMode(getMode());
IconDialog dialog = new IconDialog(getIconGraph(), getPanelFactory());
dialog.show();
changeVertex();
return dialog.okay;*/
return false;
}
COM: <s> the function code specify relation code asks the user if a relation </s>
|
funcom_train/34564837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void read(final DataInput in) throws IOException {
final int s = in.readNum();
for(int u = 0; u < s; u++) {
final User user = new User(string(in.readBytes()),
in.readBytes(), in.readNum());
add(user);
}
}
COM: <s> reads users from disk </s>
|
funcom_train/36191388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEx_Pro_Yes(){
Hashtable<String, Object> params = new Hashtable<String, Object>();
params.put("action", new Action("push", "yes_button"));
Object tmp = (Object)feedback.getExplicitFB(
FeedbackGUITypes.PROACTIVITY, params);
Boolean returned_feedback = (Boolean)tmp;
assertTrue(returned_feedback);
}
COM: <s> call explicit proactivity feedback gui and press yes button </s>
|
funcom_train/12520913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
problemReporter.abortDueToInternalError(
Messages.bind(Messages.abort_againstSourceModel, new String[] { String.valueOf(sourceTypes[0].getName()), String.valueOf(sourceTypes[0].getFileName()) }));
}
COM: <s> add additional source types </s>
|
funcom_train/41278998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canStore(Request req, Reply rep) {
// RFC2616: 14.9.2 What can be stored...
if (req.checkNoStore() || rep.checkNoStore()) {
rep.setState(CacheState.STATE_STORABLE, Boolean.FALSE);
return false;
}
rep.setState(CacheState.STATE_CACHABLE, Boolean.TRUE);
return true;
}
COM: <s> checks if according to the headers of a reply we can store </s>
|
funcom_train/20219834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXLocation(int x) {
int xShift = x - location.x;
location.x = x;
for (int i = 0; i < lines.length; i++)
lines[i].relocate(xShift, 0);
topLeft.x += xShift;
topRight.x += xShift;
Iterator<Plate> iter = leftStack.iterator();
while (iter.hasNext())
iter.next().shiftX(xShift);
iter = rightStack.iterator();
while (iter.hasNext())
iter.next().shiftX(xShift);
}
COM: <s> sets the horizontal location of the player </s>
|
funcom_train/38574904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(GridCell cell) {
this.cell = cell;
this.up.setText(String.valueOf(cell.getReward(GridModel.UP)));
this.down.setText(String.valueOf(cell.getReward(GridModel.DOWN)));
this.left.setText(String.valueOf(cell.getReward(GridModel.LEFT)));
this.right.setText(String.valueOf(cell.getReward(GridModel.RIGHT)));
}
COM: <s> show the rewards of a grid cell in the reward panel </s>
|
funcom_train/44748376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
PeptideSubstructure clonedMe = null;
try {
clonedMe = (PeptideSubstructure) super.clone();
} catch (CloneNotSupportedException e) {
System.out.print(e);
}
if (getMyModifications() != null)
clonedMe.setMyModifications((Vector) clonedMe.getMyModifications().clone());
return clonedMe;
}
COM: <s> deep clones the peptide substructure </s>
|
funcom_train/20645337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getToolTip(CompactNode cn) {
String temp =
(fillerData == null) ? null : fillerData.getInfosStr(cn);
if (temp == null) temp = "";
if (cn instanceof CompactBCGroupNode) {
if (! temp.equals("")) temp +="<HR>";
temp += ((CompactBCGroupNode) cn).displayTreeStringHTML();
}
if (temp.equals("")) {
return cn.displayTreeString();
}
return "<HTML>"+temp+"</HTML>";
}
COM: <s> get the tool tip for the compact node br </s>
|
funcom_train/34529668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showDialog(BaseDialogPage dialogPage, String title, int width, int height) {
XProject project = XProjectManager.getCurrentProject();
XPageDialog dialog = new XPageDialog( project.getAppFrame() );
dialog.showDialog( dialogPage, title, width, height, false);
}
COM: <s> shows the dialog for the specified base dialog object </s>
|
funcom_train/2658113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColor(Object component, String key, Integer color) {
Object[] definition = getDefinition(getClass(component), key, "color");
if (set(component, definition[1], color)) {
update(component, definition[2]);
}
}
COM: <s> set custom color on a component </s>
|
funcom_train/35725380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(boolean b) {
updateSeq = b;
Object[] lemi = new Object[setofLemmings.size()];
lemi = setofLemmings.toArray();
int k = setofLemmings.size();
for (int i = 0; i < k; i++) {
((Lemming)(lemi[i])).update(b);
}
}
COM: <s> updates all lemmings in the setlemming </s>
|
funcom_train/37764644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void close() {
if (m_session != null) {
try {
m_session.close();
m_session = null;
m_messages = null;
if (log.isDebugEnabled())
log.debug("JMS Session closed");
} catch (JMSException e) {
log.warn("Error in closing a JMS Session", e);
}
}
}
COM: <s> closes the session </s>
|
funcom_train/38384766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean purge() {
if (isReadonly()) {
return false;
}
fLength = 0;
try {
fFile.setLength(0);
}
catch (IOException ioe) {
throw new Error("Error in REDFile.purge: " + ioe);
}
for (int i = 0; i < fcNrBufs; i++) {
if (fBuffer[i] != null) {
fBuffer[i].fOrg = -1;
fBuffer[i] = null;
}
}
return true;
}
COM: <s> erase file content </s>
|
funcom_train/50757190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newRace() {
java.util.List driverList = new java.util.LinkedList();
for (int i=0; i<botList.size(); i++) driverList.add(botList.get(i));
control.newRace(track, driverList, Integer.valueOf(jTextFieldLaps.getText()).intValue());
closeDialog();
}
COM: <s> creates a new race from the information in the dialog </s>
|
funcom_train/22284548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedItem(WidgetMenuItem item) {
//System.out.println("set sel to: "+item);
//Thread.dumpStack();
if (item != selectedItem) {
if (selectedItem != null) {
selectedItem.setSelected(false);
selectedItem = null;
}
selectedItem = item;
selectedItem.setSelected(true);
container.focusContent(selectedItem.x, selectedItem.y, selectedItem.width, selectedItem.height);
}
}
COM: <s> select an item by giving the item directly </s>
|
funcom_train/584249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJCommandArea() {
if( jCommandArea == null ) {
jCommandArea = new JPanel();
jCommandArea.setBorder( BorderFactory.createEtchedBorder( EtchedBorder.RAISED ) );
jCommandArea.add( getBSearch(), null );
jCommandArea.add( getBSearchLike(), null );
}
return jCommandArea;
}
COM: <s> this method initializes j command area </s>
|
funcom_train/8722560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotify() {
super.addNotify();
XRLog.general(Level.FINE, "add notify called");
Container p = getParent();
if (p instanceof JViewport) {
Container vp = p.getParent();
if (vp instanceof JScrollPane) {
setEnclosingScrollPane((JScrollPane) vp);
}
}
}
COM: <s> overrides the default implementation to test for and configure any </s>
|
funcom_train/25654063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAcquired() {
state = SpriteState.ACQUIRED;
destination = ConcurrentSpriteCanvas.RELEASE_BORDER;
if(ConcurrentSpriteCanvas.exampleType == ExampleType.WORKING) {
destination += 30;
}
// if(currentLocation < ConcurrentSpriteCanvas.ACQUIRE_BORDER) {
// currentLocation = ConcurrentSpriteCanvas.ACQUIRE_BORDER;
// }
}
COM: <s> draw this sprite inside the borders waiting to be released </s>
|
funcom_train/7388824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem1() {
if (stringItem1 == null) {//GEN-END:|157-getter|0|157-preInit
// write pre-init user code here
stringItem1 = new StringItem("Food:", creature.getTextFoodLevel());//GEN-LINE:|157-getter|1|157-postInit
// write post-init user code here
}//GEN-BEGIN:|157-getter|2|
return stringItem1;
}
COM: <s> returns an initiliazed instance of string item1 component </s>
|
funcom_train/18865674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getFirstUnreconciledTransactionDate() {
synchronized (tMutex) {
for (int i = 0; i < transactions.size(); i++) {
if (!transactions.get(i).isReconciled(this)) {
return transactions.get(i).getDate();
}
}
return transactions.get(transactions.size - 1).getDate();
}
}
COM: <s> returns the date of the first unreconciled transaction </s>
|
funcom_train/648578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnBrowseLogFile() {
if (btnBrowseLogFile == null) {
btnBrowseLogFile = new JButton();
btnBrowseLogFile.setText("...");
btnBrowseLogFile.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
chooseLogFile();
}
});
}
return btnBrowseLogFile;
}
COM: <s> this method initializes j button5 </s>
|
funcom_train/37189702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getComponentAfter(Container focusCycleRoot, Component component) {
for(int i = 0; i < focusTraversalPolicyList.size(); i++) {
if(component.equals(focusTraversalPolicyList.get(i))) {
if(i == (focusTraversalPolicyList.size() - 1)) i = 0;
else i++;
focusedComponent = (Component)(focusTraversalPolicyList.get(i));
break;
}
}
return focusedComponent;
}
COM: <s> returns the component that should receive the focus after component </s>
|
funcom_train/32631809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEnvironmentValueFalse() {
System.out.println("-> testGetEnvironmentString");
String env = "Directory";
Object value = getSession().getEnvironmentValue(env, false);
assertTrue(value instanceof String);
assertTrue("Environment not found: " + env, value != null && ((String) value).length() > 0);
}
COM: <s> tests get environment value string boolean </s>
|
funcom_train/7581670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAccountEnabled(boolean accountSelected) {
getEditAccountItem().setEnabled(accountSelected);
getRemoveAccountItem().setVisible(accountSelected);
getRemoveAccountItem().setEnabled(accountSelected);
getAddToAccountItem().setEnabled(accountSelected);
getWithdrawFromAccountItem().setEnabled(accountSelected);
getTransferItem().setEnabled(accountSelected);
if (accountSelected) {
getDeleteMenuItem().setVisible(!accountSelected);
}
}
COM: <s> updates the menu items status depending on whether an account is selected </s>
|
funcom_train/43909915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getOriginLat(final GeoTiffIIOMetadataDecoder metadata) {
String origin = metadata.getGeoKey(GeoTiffPCSCodes.ProjCenterLatGeoKey);
if (origin == null)
origin = metadata.getGeoKey(GeoTiffPCSCodes.ProjNatOriginLatGeoKey);
if (origin == null)
origin = metadata
.getGeoKey(GeoTiffPCSCodes.ProjFalseOriginLatGeoKey);
if (origin == null)
return 0.0;
return Double.parseDouble(origin);
}
COM: <s> getting the origin lat with a minimum of tolerance with respect to the </s>
|
funcom_train/38808446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCC___OrgJdomElement() throws JHuPeDOMException {
Element element = jhupeDomFactory.newElement("element");
Document doc = jhupeDomFactory.newDocument(element, "doc");
assertEquals("incorrect root element returned", element,
doc.getRootElement());
element = null;
try {
doc = jhupeDomFactory.newDocument(element, "doc2");
} catch (IllegalAddException e) {
fail("didn't handle null element");
} catch (NullPointerException e) {
fail("didn't handle null element");
}
}
COM: <s> test the constructor with only a root element </s>
|
funcom_train/10748139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAccessible0(boolean flag) throws SecurityException {
if (flag && this instanceof Constructor
&& ((Constructor<?>)this).getDeclaringClass() == Class.class) {
throw new SecurityException(
"Can not make the java.lang.Class class constructor accessible");
}
isAccessible = flag;
}
COM: <s> changes accessibility to the specified </s>
|
funcom_train/4927325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkFlow(String operator, double actualFlow, double triggerFlow) {
if (operator.equals(">")) {
if (actualFlow > triggerFlow) {
progress++;
notifyUpdate();
}
}
else if (operator.equals("<")) {
if (actualFlow < triggerFlow) {
progress++;
notifyUpdate();
}
}
}
COM: <s> check actual flow is greater or less than the trigger flow </s>
|
funcom_train/39533958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshSVGFrame(Point currentMousePoint){
//converting the given point into the user space units
Point2D scaledPoint=svgHandle.getTransformsManager().
getScaledPoint(currentMousePoint, true);
//refreshing the labels displaying the current position of the mouse on the canvas
svgHandle.getSVGFrame().getStateBar().setMousePosition(scaledPoint);
}
COM: <s> refreshes the labels displaying the current position of the mouse on the canvas </s>
|
funcom_train/28686964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUID(String ipx_string) {
String uid = null;
try {
//uid = ipx_string.substring(4, 16);
//TODO include CRC below, but check is required to see what is the string format!
uid = ipx_string.substring(4, 20);
} catch (IndexOutOfBoundsException e) {
// do nothing
}
return uid;
}
COM: <s> method to return the id of the tag </s>
|
funcom_train/39046340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String id;
String payload;
if (this.getId() == null) {
id = new String();
} else {
id = new String(this.getId());
}
if (this.getId() == null) {
payload = new String();
} else {
payload = new String(this.getPayload());
}
return "NDEF Record[" + this.getRecordType().toString() + ";ID:" + id
+ ";Payload:" + payload + "]";
}
COM: <s> return a code string code representation of the ndefrecord </s>
|
funcom_train/28634463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compare(ITable expected, ITable actual) throws DatabaseUnitException {
if (expected.getRowCount() == 0 && actual.getRowCount() == 0) {
return;
}
ITable actualToCompare = DefaultColumnFilter.includedColumnsTable(actual, expected.getTableMetaData().getColumns());
Assertion.assertEquals(expected, actualToCompare);
}
COM: <s> compares the expected table contents with the actual </s>
|
funcom_train/34318398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setBorder(BorderFactory.createTitledBorder(BorderFactory
.createLineBorder(robot.getColor(), 2), " " + robot.getName()
+ " ", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION,
new Font("Dialog", Font.BOLD, 12)));
this.setBackground(Color.WHITE);
this.setPreferredSize(new Dimension(110, 105));
}
COM: <s> this method initializes this </s>
|
funcom_train/20325258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openLinkInGoogle() {
if (Desktop.isDesktopSupported()) {
Desktop desktop = Desktop.getDesktop();
try {
String word = null;
if (lastSelected != null) {
word = "q=" + lastSelected.getWord();
}
URI uri = new URI("http", "www.google.com", null, word);
desktop.browse(uri);
} catch (Exception e) {
e.printStackTrace();
}
} else {
// TODO: error handling
}
}
COM: <s> opens the browser at google </s>
|
funcom_train/37650614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button buildStoreRuleSetInProjectButton(final Composite parent) {
Button button = newRadioButton(parent, StringKeys.PROPERTY_BUTTON_STORE_RULESET_PROJECT);
button.setSelection(model.isRuleSetStoredInProject());
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
refreshRuleSetInProject();
}
});
return button;
}
COM: <s> create the radio button for storing configuration in a project file </s>
|
funcom_train/4900713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setState(State s) {
State old = this.state;
fireOnEDT("state", old, this.state = s);
switch (this.state) {
case READY:
case CONNECTING:
case SENDING:
case RECEIVING:
case ABORTED:
case FAILED:
setProgress(-1f);
break;
}
}
COM: <s> sets the local state property firing a property change event on the </s>
|
funcom_train/44348657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createServiceIconToolBar() {
serviceIconToolBar = new ToolBar(generalComposite, SWT.NONE);
iconServiceButton = new ToolItem(serviceIconToolBar, SWT.PUSH);
iconServiceButton
.setImage(UIManager.getInstance().fromItem(new Item()));
iconServiceButton.setToolTipText(Messages.getString("change.icon")); //$NON-NLS-1$
}
COM: <s> this method initializes service icon tool bar </s>
|
funcom_train/36155054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDate() {
// George added date fix by fiatt
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ssz", new Locale("US"));
Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT"));
format.setCalendar(cal);
return format.format(new Date());
}
COM: <s> provides a standard date format for headers </s>
|
funcom_train/23172595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadConcreteComponents(){
this.guardHandler = this.abstractWFGFramework.getGuardHandler();
this.modellerAccess = this.abstractWFGFramework.getModellerAccess();
this.reader = this.abstractWFGFramework.getReader();
this.transformer = this.abstractWFGFramework.getTransformer();
this.traverser = this.abstractWFGFramework.getTraverser();
this.generators = this.abstractWFGFramework.getGenerators();
}
COM: <s> a method to load the concrete components from the concrete right factory </s>
|
funcom_train/6492745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIndentationOutput() throws IOException {
doTestIndentation(" " );
doTestIndentation(" " );
doTestIndentation(" " );
doTestIndentation("\t" );
doTestIndentation("\t\t" );
doTestIndentation("\t\t\t");
doTestIndentation(" \t " );
doTestIndentation("\t " );
doTestIndentation("\t \t" );
}
COM: <s> performs all tests that check that indentation settings cause proper </s>
|
funcom_train/2731509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetValue read(Domain domain) {
Set<Value> set = new HashSet<Value>();
for (Map.Entry<LocationSet.WrappedDomain, Set<ReserveValue>> entry : abstractSets.entrySet()) {
Domain dom1 = entry.getKey().domain;
if (Defs.isSubsetOf(dom1, domain)) {
set.addAll(entry.getValue());
}
}
return new SetValue(set);
}
COM: <s> returns the content of a dynamic domain </s>
|
funcom_train/44478532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String jeromePath(File file) {
String prefix = ConfigKeeper.getStoragePath();
prefix = prefix.replaceAll("\\\\", "/");
String fileSrc = file.getPath().replaceAll("\\\\", "/");
String pattern = Pattern.quote(prefix);
String replacement = Matcher.quoteReplacement("file://"); // XXX this
// is not
// needed
String ret = fileSrc.replaceFirst(pattern, replacement);
return ret;
}
COM: <s> helper function for creating jerome dl type uris for binary resources </s>
|
funcom_train/34983650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCount(Long newVal) {
if ((newVal != null && this.count != null && (newVal.compareTo(this.count) == 0)) ||
(newVal == null && this.count == null && count_is_initialized)) {
return;
}
this.count = newVal;
count_is_modified = true;
count_is_initialized = true;
}
COM: <s> setter method for count </s>
|
funcom_train/21844659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(final InstructionContext env) throws JBasicException {
env.checkActive();
int dest = env.instruction.integerOperand;
LoopManager lm = env.codeStream.statement.program.loopManager;
if( lm == null || lm.loopStackSize() == 0 )
throw new JBasicException(Status.NOLOOP);
lm.removeTopLoop();
env.codeStream.programCounter = dest;
}
COM: <s> b code brloop em dest em code br br b </s>
|
funcom_train/31688831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOutputType() throws DataAccessException {
String sOutput = DEFAULT_OUTPUT_TYPE;
Profile prof = getProfile();
try {
GeneralPropertyInstance propInst = (GeneralPropertyInstance) prof.getPropertyInstance(PROP_OUTPUT_TYPE);
if(propInst != null) {
sOutput = (String) propInst.getValue();
} else {
sOutput = MimeTypeMapping.HTML.getMimeType();
}
} catch (InvalidPropertyInstanceException e) {
throw new DataAccessException(e.getLocalizedMessage(),e);
}
return sOutput;
}
COM: <s> returns the output type for this xslt </s>
|
funcom_train/1549717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public E remove(int index) {
if (fast) {
synchronized (this) {
ArrayList<E> temp = (ArrayList<E>) list.clone();
E result = temp.remove(index);
list = temp;
return (result);
}
} else {
synchronized (list) {
return (list.remove(index));
}
}
}
COM: <s> remove the element at the specified position in the list and shift </s>
|
funcom_train/47184282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkUserExists(long mid) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("SELECT * FROM Users WHERE MID=?");
ps.setLong(1, mid);
ResultSet rs = ps.executeQuery();
return rs.next();
} catch (SQLException e) {
e.printStackTrace();
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
COM: <s> check that a user actually exists </s>
|
funcom_train/19155879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deleteDir(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i=0; i<children.length; i++) {
if (! deleteDir(new File(dir, children[i]))) {
return false;
}
}
}
return dir.delete();
}
COM: <s> recursively delete a directory </s>
|
funcom_train/43245724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInsuranceType() {
System.out.println("getInsuranceType");
InsuranceDG1Object instance = new InsuranceDG1Object();
String expResult = "";
String result = instance.getInsuranceType();
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 insurance type method of class org </s>
|
funcom_train/8686729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkRevoked(java.security.Permission perm) {
for (Iterator i = revokedPermissions.listIterator(); i.hasNext();) {
if (((Permissions.Permission) i.next()).matches(perm)) {
throw new SecurityException("Permission " + perm + " was revoked.");
}
}
}
COM: <s> throws an exception if this permission is revoked </s>
|
funcom_train/18801816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStringToMonthCode() {
int m = SerialDate.stringToMonthCode("January");
assertEquals(SerialDate.JANUARY, m);
m = SerialDate.stringToMonthCode(" January ");
assertEquals(SerialDate.JANUARY, m);
m = SerialDate.stringToMonthCode("Jan");
assertEquals(SerialDate.JANUARY, m);
}
COM: <s> test the conversion of a string to a month </s>
|
funcom_train/29548828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void enableDisableToolbarButtons(int level) {
// buttons disabling
switch (level) {
case LEVEL_ROOT:
undoButton.setEnabled(false);
deleteButton.setEnabled(false);
emptyButton.setEnabled(true);
break;
case LEVEL_FOLDERS:
undoButton.setEnabled(true);
deleteButton.setEnabled(true);
emptyButton.setEnabled(true);
break;
}
}
COM: <s> change status in the toolbar buttons </s>
|
funcom_train/44162640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decodeStyle(int style) {
int tempStyle = style;
for (int i = base.length - 1; i >= 0; i--) {
if (tempStyle>0) {
branch[i] = tempStyle / base[i]; // Get an integer value for a direction
tempStyle -= branch[i] * base[i]; // Remove the component of this direction
}
}
}
COM: <s> decodes the style </s>
|
funcom_train/16498002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getAlignment( int axis) {
if (axis == View.Y_AXIS) {
if (!showReading)
return VAdjustedView.BASE_TEXT_ALIGNMENT;
else if (!startsAnnotated) {
// yet another ugly alignment hack for annotations that start with
// an unannotated character.
if (showTranslation)
return 0.25f;
else
return 0.36f;
}
}
return super.getAlignment( axis);
}
COM: <s> returns the alignment of this view </s>
|
funcom_train/3112205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector getAllChildren(Vector v, Group group) {
for (Enumeration e = group.getAllChildren(); e.hasMoreElements();) {
Object o = e.nextElement();
v.add(o);
if (o instanceof Group) {
v = getAllChildren(v, (Group) o);
}
}
return v;
}
COM: <s> uses recursion to find all the children </s>
|
funcom_train/4123698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildTerrainItem(TileType tileType, DefaultMutableTreeNode parent) {
ImageIcon icon = new ImageIcon(getLibrary().getScaledTerrainImage(tileType, 0.25f));
DefaultMutableTreeNode item = new DefaultMutableTreeNode(new ColopediaTreeItem(tileType,
Messages.getName(tileType), icon));
parent.add(item);
}
COM: <s> builds the button for the given tile </s>
|
funcom_train/29774750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProvider(final Provider provider) {
if (this.encryptorSet) {
throw new EncryptionInitializationException(
"An encryptor has been already set: no " +
"further configuration possible on hibernate wrapper");
}
final StandardPBEStringEncryptor standardPBEStringEncryptor =
(StandardPBEStringEncryptor) this.encryptor;
standardPBEStringEncryptor.setProvider(provider);
}
COM: <s> sets the jce provider to be used by the internal encryptor </s>
|
funcom_train/3429956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DOMError modifyDOMError(String message, short severity, String type, Node node){
fDOMError.reset();
fDOMError.fMessage = message;
fDOMError.fType = type;
fDOMError.fSeverity = severity;
fDOMError.fLocator = new DOMLocatorImpl(-1, -1, -1, node, null);
return fDOMError;
}
COM: <s> the method modifies global dom error object </s>
|
funcom_train/27770337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DiffByteMap assembleByteMapFromBuffer(ByteBuffer buffer) {
buffer.reset();
DiffByteMap map = new DiffByteMap();
while(buffer.remaining() > 0) {
int position = buffer.position();
byte b = buffer.get();
map.addByte(b, position);
}
buffer.reset();
return map;
}
COM: <s> map out all the locations of each occurrence of the different bytes </s>
|
funcom_train/34301795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getBoolean( String attrName, boolean defaultValue, Attributes attributes ) {
if( attrName == null || attributes == null )
return defaultValue;
String value = attributes.getValue( attrName );
if( value == null )
return defaultValue;
try{
boolean boolValue = new Boolean( value ).booleanValue();
return boolValue;
}
catch( NumberFormatException e ) {
// Nothing to do
}
return defaultValue;
}
COM: <s> returns a bool value from the given attribute name </s>
|
funcom_train/50908981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateBishopMove(Square origin, Square destination) {
// ensure diagonal movement.
if (Math.abs(origin.getCoord().x-destination.getCoord().x) !=
Math.abs(origin.getCoord().y-destination.getCoord().y) )
{
return false;
}
return !isPieceBlocking(origin, destination);
}
COM: <s> validates weather the specified bishop move is legal but does not check </s>
|
funcom_train/3337683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int checkCompressed(File file) throws IOException {
if (bzip) {
return checkBZipMagic(file) ? USE_BZIP : -1;
}
if (gzip) {
return checkGZipMagic(file) ? USE_GZIP : -1;
}
/*
if (checkBZipMagic(file)) {
return USE_BZIP;
}
if (checkGZipMagic(file)) {
return USE_GZIP;
}
*/
return 0;
}
COM: <s> check via the file header the type of compression used to create it </s>
|
funcom_train/36613802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void postKMeansMessage(String message) {
if (mListeners.size() > 0) {
synchronized (mListeners) {
int sz = mListeners.size();
for (int i=0; i<sz; i++) {
mListeners.get(i).kmeansMessage(message);
}
}
}
}
COM: <s> posts a message to registered kmeans listeners </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.