__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/26207399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addSet(FzySet aSet)throws IllegalArgumentException {
if (aSet == null) throw new IllegalArgumentException("Set cannot be null");
if ((sets.isEmpty()) || (!(containsSet(aSet)))) {
sets.addElement(aSet);
setChanged();
return true;
}
return false;
}
COM: <s> add a unique fzy set to this fzy attribute </s>
|
funcom_train/38957772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCIstBevorzugtPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Weiche_cIstBevorzugt_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Weiche_cIstBevorzugt_feature", "_UI_Weiche_type"),
ModelrailwayPackage.Literals.WEICHE__CIST_BEVORZUGT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the cist bevorzugt feature </s>
|
funcom_train/17204408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pokeInt(int reg, int idx) {
int offset = BYTES_IN_STACKSLOT - BYTES_IN_INT + (idx << LOG_BYTES_IN_STACKSLOT);
if (VM.VerifyAssertions) validateStackPush(-offset);
asm.emitSTW(reg, spTopOffset + offset, FP);
}
COM: <s> emit the code to poke an int </s>
|
funcom_train/31955297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTargetBlogSelect() {
clearScreens();
asyncActionType = KablogEngine.GET_BLOGSLIST;
engine.setupAsyncOp(asyncActionType,null);
engineThread = new Thread(engine);
showActionStatus(KablogEngine.GET_BLOGSLIST);
engineThread.start();
}//doTargetBlogSelect
COM: <s> launch the blog selector prefs form </s>
|
funcom_train/37213296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserPredicate(String subject, String predicate, String object) {
ObjectProperty userPredicate = model.createObjectProperty(predicate);
userPredicate.addSuperProperty(ProvenanceVocab.USER_PREDICATE);
Individual subjectIndividual = model.createIndividual(subject,
ProvenanceVocab.DATA_OBJECT);
Individual objectIndividual = model.createIndividual(object,
ProvenanceVocab.DATA_OBJECT);
model.add(subjectIndividual, userPredicate, objectIndividual);
}
COM: <s> adds the triple and states that code predicate code is a subproperty </s>
|
funcom_train/13868415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityResolver getEntityResolver() {
// to avoid synchronize when calling out, save as local field
PackageAdmin pa;
synchronized (Activator.this) {
pa = packageAdmin;
}
if (pa == null) {
Logger
.getDefault()
.logError(
"Internal Error: Could not create entity resolver, "
+ "as package admin service is not yet available");
return null;
} else {
return new PackageAdminLookupEntityResolver(packageAdmin);
}
}
COM: <s> provides an entity resolver based on package admin and a lookup for </s>
|
funcom_train/30176897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OMElement pingPayload(String name) {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(NAMESPACE, "tns");
OMElement method = fac.createOMElement("ping", omNs);
OMElement value = fac.createOMElement("symbol", omNs);
value.addChild(fac.createOMText(value, name));
method.addChild(value);
return method;
}
COM: <s> create soap payload for the web service </s>
|
funcom_train/40613637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean fireBeforeRow(Session session, Row oldRow, Row newRow) {
boolean done = fireRow(session, oldRow, newRow, true, false);
fireConstraints(session, oldRow, newRow, true);
return done;
}
COM: <s> fire all triggers that need to be called before a row is updated </s>
|
funcom_train/12861476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_DeleteKomposition() throws Exception{
saveHead();
long id = head.getId();
session.beginTransaction();
session.delete(head);
head = null;
head = (KompositionHeadImpl) session.get(KompositionHeadImpl.class, id);
assertNull(head);
}
COM: <s> deleting an one to many composition </s>
|
funcom_train/43098459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object buildClass(String name, Object owner) {
Object clazz = buildClass();
nsmodel.getCoreHelper().setName(clazz, name);
if (owner instanceof MNamespace) {
nsmodel.getCoreHelper().setNamespace(clazz, /*MNamespace*/ owner);
}
return clazz;
}
COM: <s> builds a class with a given name and namespace </s>
|
funcom_train/4190024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(final File f, final ActionListener listener) {
try {
throw new RuntimeException("dummy");
} catch(Exception e) {
e.printStackTrace();
}
(new Thread() {
public void run() {
saveImpl(f, listener);
}
}).start();
}
COM: <s> save the stream to the given file and keep the given action listener </s>
|
funcom_train/38993339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkStateTrans(ActionRequest request) {
if (!request.getRequestOp().getType().equals("always")) {
unprocessedRequests.put(request.getAgent(), request);
}
if (execMode == ExecutionMode.ON_DEMAND) {
stateTransition();
} else if (execMode == ExecutionMode.WAIT_FOR_ALL) {
waitForAll(request);
}
}
COM: <s> add the new action request to the set of unprocessed requests </s>
|
funcom_train/19089959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String dateToString(int[] date) {
StringBuffer message = new StringBuffer(8);
message.append('-');
message.append('-');
append(message, date[M], 2);
message.append('-');
append(message, date[D], 2);
append(message, (char)date[utc], 0);
return message.toString();
}
COM: <s> converts g month day object representation to string </s>
|
funcom_train/37019723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputSource getInputSource(String resource) {
InputStream input = getClass().getResourceAsStream(resource);
if (input != null) {
return new InputSource(
new BufferedReader(new InputStreamReader(input)));
}
System.err.println("jmol.CMLResolver: Unable to find resource \""
+ resource + "\"");
return null;
}
COM: <s> creates an input source to the resource given </s>
|
funcom_train/32957596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMail(String item) {
Attribute attribute = getAttribute("mail");
if (attribute == null) {
attribute = new BasicAttribute("mail");
getAttributes().put("mail", attribute);
}
if (!attribute.contains(item)) {
attribute.add(item);
}
}
COM: <s> add an e mail item to this context </s>
|
funcom_train/50846180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFetchSize() throws Exception {
// Really, there is no default for all drivers...
// it should be enough to be able to call the method.
Statement stmt = newStatement();
int expResult = 0;
int result = stmt.getFetchSize();
assertEquals(expResult, result);
}
COM: <s> test of get fetch size method of interface java </s>
|
funcom_train/19838023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int max() {
if (size() == 0) {
throw new IllegalStateException("cannot find maximum get an empty list");
}
int max = Integer.MIN_VALUE;
for (int i = 0; i < pos; i++) {
if (data[i] > max) {
max = data[i];
}
}
return max;
}
COM: <s> finds the maximum value in the list </s>
|
funcom_train/32811532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Constraint initialize(Constraint clone) {
super.initialize(clone);
clone.setKind(getKind());
clone.setSpecification(getSpecification());
clone.setDefinedFeature(getDefinedFeature());
// copy the constrained elements
for (ConstrainableElement constrainedElement : getConstrainedElement()) {
// do not clone the elements as they are only referenced, not contained by the constraint
clone.addConstrainedElement(constrainedElement);
}
return clone;
}
COM: <s> helper method that initializes a cloned code constraint code </s>
|
funcom_train/51533640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
SDLEvent.enableUNICODE(1);
while (Thread.currentThread() == thread) {
processEvent(SDLEvent.waitEvent(true));
}
} catch (Throwable t) {
if (Logging.TRACE_ENABLED) {
System.err.println("Exception during event dispatch");
t.printStackTrace();
}
}
}
COM: <s> the main event pump loop </s>
|
funcom_train/12145306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLevelString() {
String val = null;
switch (getLevel()) {
case NBDescriptor.kNotebookLevel:
val = "Notebook";
break;
case NBDescriptor.kChapterLevel:
val = "Chapter";
break;
case NBDescriptor.kPageLevel:
val = "Page";
break;
case NBDescriptor.kNoteLevel:
val = "Note";
break;
}
return val;
}
COM: <s> gets the level string attribute of the node descriptor object </s>
|
funcom_train/51764018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtractionExceptionParameterPassing() {
String message = "blblb";
Exception wrappedException = new Exception();
ExtractionException extractionException = new ExtractionException(message, wrappedException);
assertSame(wrappedException, extractionException.getCause());
assertEquals(message, extractionException.getMessage());
}
COM: <s> simple parameter passing test </s>
|
funcom_train/173735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object selectSingleNode(Object context) throws JDOMException {
try {
currentContext = context;
return xPath.selectSingleNode(context);
}
catch (JaxenException ex1) {
throw new JDOMException("XPath error while evaluating \"" +
xPath.toString() + "\": " + ex1.getMessage(), ex1);
}
finally {
currentContext = null;
}
}
COM: <s> evaluates the wrapped xpath expression and returns the first </s>
|
funcom_train/4257166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HttpClientConverter getConverter() throws Exception {
if (this.converter == null) {
String converterClass = getParameters().getFirstValue("converter",
"com.noelios.restlet.http.HttpClientConverter");
this.converter = (HttpClientConverter) Class
.forName(converterClass).getConstructor(Context.class)
.newInstance(getContext());
}
return this.converter;
}
COM: <s> returns the converter from uniform calls to http calls </s>
|
funcom_train/18286924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getJarExecutable() {
String executable = null;
String os = System.getProperty("os.name").toLowerCase();
if (
(os.indexOf("windows 9") > -1) ||
(os.indexOf("nt") > -1) ||
(os.indexOf("windows 2000") > -1) ||
(os.indexOf("windows xp") > -1)) {
executable = "jar.exe";
} else {
executable = "jar";
}
return executable;
}
COM: <s> get the executable for creation of jar files </s>
|
funcom_train/18473570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hierarchy getHierarchy() {
if (level != null)
return level.getHierarchy();
XmlaDimension dim = (XmlaDimension) getDimension();
String defHier = dim.getDefaultHier();
if (defHier != null && defHier.length() > 0)
return model.lookupHierByUName(defHier);
else
return null;
}
COM: <s> get hierarchy of member </s>
|
funcom_train/7979358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cleanup() {
if (this.hosts != null) {
// If we're using a bdb bigmap, the call to clear will
// close down the bdb database.
this.hosts.clear();
this.hosts = null;
}
if (this.servers != null) {
this.servers.clear();
this.servers = null;
}
}
COM: <s> called when shutting down the cache so we can do clean up </s>
|
funcom_train/25282771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawMarkerOnImg(final int[] binary_image) {
System.arraycopy(binary_image, 0, out_data, 0, binary_image.length);
try {
marker.draw(out_data, center_point.x, center_point.y);
marker2.draw(out_data, center_point.x - searchSideLength / 2,
center_point.y - searchSideLength / 2);
} catch (final Exception e) {
System.err.print("Error in marker");
e.printStackTrace();
}
}
COM: <s> draws a cross at the center of the moving object </s>
|
funcom_train/36106701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getInviaCommand() {
if (inviaCommand == null) {//GEN-END:|90-getter|0|90-preInit
// write pre-init user code here
inviaCommand = new Command("Invia", Command.OK, 0);//GEN-LINE:|90-getter|1|90-postInit
// write post-init user code here
}//GEN-BEGIN:|90-getter|2|
return inviaCommand;
}
COM: <s> returns an initiliazed instance of invia command component </s>
|
funcom_train/4866598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean exec(int key) {
boolean keyBound = false;
if ( this.bindings.containsKey(key)) {
try {
keyBound = true;
this.console.exec(this.bindings.get(key).split(" "));
}
catch (MyriadException e) {
this.console.println(
"An error occured while executing the binded command for: " + key + " - " + e);
}
}
return keyBound;
}
COM: <s> execute a key binding if available </s>
|
funcom_train/43540222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCleanAllProjects() {
IUIContext ui = getUI();
IJavaProjectHelper javaProject = EclipseHelperFactory.getJavaProjectHelper();
javaProject.createProject(ui, "JavaProject1"); //$NON-NLS-1$
javaProject.createProject(ui, "JavaProject2"); //$NON-NLS-1$
IWorkbenchHelper workbench = EclipseHelperFactory.getWorkbenchHelper();
workbench.waitNoJobs(ui);
workbench.cleanAllProjects(ui);
}
COM: <s> create a few projects </s>
|
funcom_train/8066681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getInEdges(Object port) {
Vector res = new Vector();
Vector edge = ((NetPort) port).getEdges();
for (int i = 0; i < edge.size(); i++) {
NetEdge ne = (NetEdge) edge.elementAt(i);
if (ne.getDestPort() == port) {
res.add(ne);
}
}
return res;
}
COM: <s> return all edges going to given port </s>
|
funcom_train/40749720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFromDiagram(Diagram diagram) {
// Remove Connector from Diagram
diagram.connectors.remove(this);
// Remove Connector from Diagram's boundaryPanel
for (int i = 0; i < sections.size(); i++) {
diagram.boundaryPanel.remove(sections.get(i));
}
sections.removeAll(sections);
// Remove connector's decorations
if (startPointDecoration != null) {
diagram.boundaryPanel.remove(startPointDecoration);
}
if (endPointDecoration != null) {
diagram.boundaryPanel.remove(endPointDecoration);
}
// Remove end points
startEndPoint.clear();
endEndPoint.clear();
}
COM: <s> removes connector from diagram </s>
|
funcom_train/44789767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCircleColor(ColorimetricColor c) {
if (this.lastColor != null) {
this.circleColor(this.lastColor, this.lastColor.toColor(), 1.8f);
}
if (c.getLightness() > 5) {
this.circleColor(c, Color.WHITE, 0.8f);
} else {
this.circleColor(c, Color.BLACK, 0.8f);
}
}
COM: <s> method to update the graphic around the selected color </s>
|
funcom_train/43608832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration getCopyResetToInitial() {
Configuration copy = (Configuration) clone();
for (Iterator<Map.Entry<SMNode,Constraint>> iter = copy.stateToConstraint.entrySet().iterator(); iter.hasNext();) {
Map.Entry<SMNode,Constraint> entry = iter.next();
SMNode state = entry.getKey();
entry.setValue(state.isInitialNode() ? Constraint.TRUE : Constraint.FALSE);
}
return copy;
}
COM: <s> returns a copy of this configuration but with all constraints reset </s>
|
funcom_train/18201080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int executeUpdate(String query) throws SQLException {
Statement statement = connection.createStatement();
if (StartOssoBook.isDevelopmentMode) {
log.info(query);
}
int result = statement.executeUpdate(query);
if (StartOssoBook.isDevelopmentMode) {
log.info(result);
}
statement.close();
return result;
}
COM: <s> insert update or delete statement on database shall be done </s>
|
funcom_train/48910037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTabbedPane getTabbedPane() {
if (tabbedPane == null) {
tabbedPane = new JTabbedPane();
tabbedPane.setBounds(new Rectangle(16, 133, 746, 325));
tablaAdelantos = new JTable();
modeloTablaAdelantos = new ModeloTablaAdelantos();
TablaFactory.configurarTabla(tablaAdelantos, modeloTablaAdelantos);
tabbedPane.add("Adelantos",new JScrollPane(tablaAdelantos));
}
return tabbedPane;
}
COM: <s> this method initializes tabbed pane </s>
|
funcom_train/20443209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemLigar() {
if (itemLigar == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code heres
itemLigar = new Command("Ligar", Command.ITEM, 0);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return itemLigar;
}
COM: <s> returns an initiliazed instance of item ligar component </s>
|
funcom_train/12548633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setI()
{
int[] d = new int[]{myXPanel.getVal(), myYPanel.getVal() - myXPanel.getVal()};
myLemma.setDecomposition(d);
myLemma.chooseI();
if(myCases != null)
{
myCases.setDecomposition(d);
myCases.setI(myLemma.getI());
}
}
COM: <s> calculates i i i and the string xy sup i sup z i </s>
|
funcom_train/3595930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getCommonResourceAttributes(NResource res) {
List arr = new ArrayList();
arr.add(NiteMetaConstants.resourceIDAttr); arr.add(res.getID());
arr.add(NiteMetaConstants.resourceIncompatibleAttr); arr.add(res.getIncompatibleID());
if (res.isDefault()) {
arr.add(NiteMetaConstants.resourceDefaultAttr); arr.add("true");
}
return arr;
}
COM: <s> find a list of attributes for an nresource virtual or real </s>
|
funcom_train/7722377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyDirectoryStarted(File directory) {
if(!directory.isDirectory()) {
return;
}
if(findListeners != null) {
FindEvent fe = new FindEvent(this,"directoryStarted",directory);
Iterator itr = findListeners.iterator();
while(itr.hasNext()) {
FindListener findListener = (FindListener)itr.next();
findListener.directoryStarted( fe );
}
}
}
COM: <s> notify all find listeners that a directory is being started </s>
|
funcom_train/5895832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int preloadSize() {
final String size = (String) getAttribute("pre-load-size");
int sz = size != null ? Integer.parseInt(size) : _preloadsz;
if ((sz = Utils.getIntAttribute(this,
"org.zkoss.zul.grid.preloadSize", sz, true)) < 0)
throw new UiException("nonnegative is required: " + sz);
return sz;
}
COM: <s> returns the number of rows to preload when receiving the rendering </s>
|
funcom_train/10009774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int randomDifferentDigitInt(int min, int max, int column) {
int value = 0;
boolean ok = false;
do {
value = randomInt(min, max);
int columnDigit = (value / columnValue) % 10;
String digit = "" + columnDigit;
String number = "" + value;
ok = number.indexOf(digit) == number.lastIndexOf(digit);
} while (!ok);
return value;
}
COM: <s> calculate a random number that will have only one occurrence of a certain </s>
|
funcom_train/3170355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pair reversed() {
return Pair.make(rightPart, leftPart);
/*
udanax-top.st:31240:Pair methodsFor: 'accessing'!
{Pair INLINE} reversed
"Returns a new pair which is the left-right reversal of me.
pair(a,b)->reversed() is the same as pair(b,a).
Only works on non-obsolete Pairs--those whose parts are non-NULL"
^Pair make: rightPart with: leftPart!
*/
}
COM: <s> returns a new pair which is the left right reversal of me </s>
|
funcom_train/13391794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGroups(String[] groups) {
if (groups == DiscoveryGroupManagement.ALL_GROUPS) {
groups = new String[]{"all"};
} else {
for (int i = 0; i < groups.length; i++) {
if (groups[i].equals("")) {
groups[i] = "public";
}
}
}
this.groups = groups;
}
COM: <s> set the lookup groups the used to discover the associated service </s>
|
funcom_train/11098486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectName activateComponent(Component component, String componentName) throws JBIException {
ActivationSpec activationSpec = new ActivationSpec();
ComponentNameSpace cns = new ComponentNameSpace(getName(), componentName);
activationSpec.setComponent(component);
activationSpec.setComponentName(cns.getName());
return activateComponent(component, activationSpec);
}
COM: <s> activate a pojo component </s>
|
funcom_train/44717446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertLogDoesNotContain(String msg) {
assertTrue("Log messages should not contain " + msg +
" but did. Log was:" + Utilities.LINE_BREAK +
"'" + getLogMessage() + "'",
getLogMessage().indexOf(msg) < 0);
}
COM: <s> asserts that log does not contain given message </s>
|
funcom_train/13774425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IntExp div(int c) {
if (c == 0) {
throw new IllegalArgumentException("div(IntExp exp, int value): value == 0");
} else if (c == 1) {
return this;
} else if (c == -1) {
return neg();
} else {
return getIntExp(IntExpDivValue.class, this, c);
}
}
COM: <s> changed by sv 02 </s>
|
funcom_train/1797555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMediaRequest(GDataRequest request, String title) {
if (title != null) {
request.setHeader("Slug", escapeSlug(title));
}
if (chunkedBufferSize != NO_CHUNKED_MEDIA_REQUEST
&& request instanceof HttpGDataRequest) {
HttpGDataRequest httpRequest = (HttpGDataRequest) request;
httpRequest.getConnection().setChunkedStreamingMode(chunkedBufferSize);
}
}
COM: <s> initializes the attributes of a media request </s>
|
funcom_train/14401397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startRecording() {
if (mMsgWriter == null) {
try {
String fileName = chooseFile(null);
if (fileName != null) {
mMsgWriter = new BufferedWriter(new FileWriter(fileName, true));
isRecording = true;
fireRecordingStarted();
}
} catch (IOException e) {
mMsgWriter = null;
showErrorMessage(e);
}
} else if (!isRecording) {
fireRecordingStarted();
isRecording = true;
}
return isRecording;
}
COM: <s> starts the global message recording </s>
|
funcom_train/45692453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGlidePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PartKeyboard_glide_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PartKeyboard_glide_feature", "_UI_PartKeyboard_type"),
EsxPackage.Literals.PART_KEYBOARD__GLIDE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the glide feature </s>
|
funcom_train/26453063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRows(int rows[]) {
for (int i=rows.length-1; i>=0; i--) {
data.removeElementAt(rows[i]);
colors.removeElementAt(rows[i]);
hashCodes.removeElementAt(rows[i]);
}
fireTableRowsDeleted(data.size()-1, data.size()-1);
}
COM: <s> removes rows from the table </s>
|
funcom_train/3792762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendCommandMessage(PeerIdentity peerI, CommandMessage commandMessage) throws PeerConnectionException {
try {
RemoteCommandReceiver rer = (RemoteCommandReceiver) _peersToremoteCommandReceivers.get(peerI);
rer.receiveCommandMessage(commandMessage);
} catch (RemoteException e) {
throw new PeerConnectionException("RemoteException in Forwarder.connect():" + e.getMessage(), peerI);
}
}
COM: <s> send the command message to the peer </s>
|
funcom_train/51345103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return getClass().getSimpleName()+
"{filename="+getFile()+
",uuid="+getUUID()+
",createTime="+getCreateTime()+
",commitTime="+getCommitTime()+
"}";
}
COM: <s> a human readable representation of the resource metadata </s>
|
funcom_train/48390629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addSearchHandler(com.smartgwt.client.widgets.form.events.SearchHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.form.events.FilterSearchEvent.getType()) == 0) setupSearchEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.form.events.FilterSearchEvent.getType());
}
COM: <s> add a search handler </s>
|
funcom_train/37775279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FormKey do_Finish_Clicked() {
MaintForm myForm = (MaintForm) form;
MaintComponent2 myComp = (MaintComponent2) myForm.getComponent();
FormKey fk = do_Save_Clicked();
if (myForm.hasErrors(request))
return fk;
else
return myComp.quitAndReturnToCallingScreen();
}
COM: <s> invokes the create or update method on the component depending on the mode </s>
|
funcom_train/8064781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getPoint(int i) {
if (i == 0) {
return new Point(_x1, _y1);
} else if (i == 1) {
return new Point(_x2, _y2);
}
throw new IndexOutOfBoundsException("FigLine has exactly 2 points");
}
COM: <s> returns the ith point </s>
|
funcom_train/22284516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSpaceAt(int index) {
for (int i = 0; i < spaces.length; i++) {
if (spaces[i] == index) {
int[] newspaces = new int[spaces.length-1];
System.arraycopy(spaces, 0, newspaces, 0, i);
System.arraycopy(spaces, i+1, newspaces, i, spaces.length-i-1);
this.spaces = newspaces;
this.spacepos = new int[newspaces.length];
invalidate();
repaint();
}
}
}
COM: <s> remove the space at the specified index to this toolbar </s>
|
funcom_train/44705219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TabbedPane createTabbedPane() {
TabbedPane pane = new TabbedPane();
pane.setClassAttr(XSL_CLASS);
addToPane(pane, "Browse", getBrowsePane());
addToPane(pane, "Search", getSearchPane());
pane.setDefaultPane (m_browse);
//pane.addActionListener(this);
return pane;
}
COM: <s> created the tabbed pane to use for this page </s>
|
funcom_train/14238092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillHeight(Rectangle bounds, int minHeight, ResizeDirection rd) {
if(bounds.height >= minHeight)
return;
if(rd == NORTHWEST || rd == NORTHEAST || rd == NORTH) {
bounds.y -= (minHeight - bounds.height);
bounds.height = minHeight;
}
else if(rd == SOUTHWEST || rd == SOUTHEAST || rd == SOUTH) {
bounds.height = minHeight;
}
}
COM: <s> take the given bounds and make sure it fills min height </s>
|
funcom_train/41825359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendLine(String line) throws IOException {
if (socket == null) { throw new IOException("SimpleFTP is not connected."); }
try {
writer.write(line + "\r\n");
writer.flush();
if (DEBUG) {
System.out.println(host + " > " + line);
}
} catch (IOException e) {
socket = null;
throw e;
}
}
COM: <s> sends a raw command to the ftp server </s>
|
funcom_train/5075468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finalizeRecord(boolean eof) throws IOException {
if (!fileCompleted && !recordCompleted) {
byte code = 0;
code |= 1;
code |= eof ? 2 : 0;
os.write(ESCAPE_CODE);
os.write(code);
if (eof) {
fileCompleted = true;
}
recordCompleted = true;
}
}
COM: <s> flushes the buffer and sets an eor eof marker </s>
|
funcom_train/39998643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInput(Object object, boolean seekForwardOnly) {
super.setInput(object, seekForwardOnly);
if (object == null)
throw new IllegalArgumentException("input is null");
if (!(object instanceof ImageInputStream)) {
String argString = "input not an ImageInputStream";
throw new IllegalArgumentException(argString);
}
iis = (ImageInputStream) object;
setStreamMetadata(iis);
}
COM: <s> this method sets the input for this image reader and also calls the </s>
|
funcom_train/38396186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public double filterLanczos(double x) {
if (x<0) x = -x;
if (x < 3.) {
x*=Math.PI;
if (x != 0) {
return Math.sin(x)*Math.sin(x/3.)/(x*(x/3.));
} else {
return 1.;
}
}
return 0.;
}
COM: <s> lanczos filter used in interpolation </s>
|
funcom_train/43245787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPatientRelationshipToInsured() {
System.out.println("getPatientRelationshipToInsured");
InsuranceDG1Object instance = new InsuranceDG1Object();
String expResult = "";
String result = instance.getPatientRelationshipToInsured();
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 patient relationship to insured method of class org </s>
|
funcom_train/17621602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getBlockCb(Picture pic, PixelBuffer blk, Rect rect) {
getBlockChroma(pic.getCb(), pic.getWidth() >> 1, pic.getHeight() >> 1,
blk.getPred(), blk.getStart(), 1 << blk.getLogStride(), rect
.getX(), rect.getY(), rect.getWidth(), rect.getHeight());
}
COM: <s> get block of possibly interpolated cb pixels </s>
|
funcom_train/31804267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMessage(String message) {
removeAll();
String messages[] = split(message);
cns.gridwidth = GridBagConstraints.REMAINDER;
cns.fill = GridBagConstraints.BOTH;
cns.weightx = 1.0;
cns.weighty = 1.0;
cns.insets = new Insets(3, 3, 3, 3);
setLayout(grid);
for (int i = 0; i < messages.length; i++) {
Label l = new Label(messages[i], alignment);
grid.setConstraints(l, cns);
add(l);
}
}
COM: <s> sets message string to be shown </s>
|
funcom_train/50835023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getControlPanel() {
JPanel panel = new JPanel(new FlowLayout());
button_ok = new JButton(LANGUAGE.getString("button.ok"));
button_ok.addFocusListener(defaultButtonEnabler);
button_ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
checkValues();
}
});
panel.add(button_ok);
return panel;
}
COM: <s> returning all controling buttons ok button cancel button </s>
|
funcom_train/44118408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFont(BaseFont font) {
String key = font.getWeight() + "-" + font.getStyle();
if (_fontMap.containsKey(key)) {
String msg = "The font " + _name + "(" + font.getWeight() + ","
+ font.getStyle() + ") is a duplicate.";
LOGGER.error(msg);
throw new FontRuntimeException(msg);
} else {
_fontMap.put(key, font);
}
}
COM: <s> add a font object to the font family </s>
|
funcom_train/37835296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkRemovedEarnings() {
List<Earning> list = market.getEarningsOlderThan(TIME_TO_REMOVING_EARNINGS);
for (Earning earning : list) {
StringBuilder builder = new StringBuilder();
builder.append("Your earning of ");
builder.append(earning.getValue());
builder.append(" money has expired and can no longer be collected.");
sendMessage(earning.getSeller(), builder);
}
market.removeEarnings(list);
}
COM: <s> checks for earnings to remove and removes them if too old </s>
|
funcom_train/18345738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getDuplicateChildConcepts() {
Set retval = new HashSet();
Set check = new HashSet();
Iterator iterator = getChildConceptRelSet().iterator();
while (iterator.hasNext()) {
ProtoConceptRel protoConceptRel =
(ProtoConceptRel) iterator.next();
ProtoConcept child =
protoConceptRel.getChildConcept();
if (check.contains(child)) {
retval.add(child);
}
check.add(child);
}
return retval;
}
COM: <s> return the set of concepts which are duplicates w </s>
|
funcom_train/14070086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (! isRunning) {
logger.info("Starting engine");
rescheduleFuture = engine.scheduleAtFixedRate(this,1,5,TimeUnit.MINUTES);
isRunning = true;
for (UUID id : scheduledItems.keySet()) {
scheduleItem(id);
}
}
}
COM: <s> start all scheduled tasks </s>
|
funcom_train/19357283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
m_state.endElement(namespaceURI, localName, qName);
m_baseURI = (URI) m_baseURIs.pop();
m_language = (String) m_languages.pop();
}
COM: <s> called when element parsing is ended </s>
|
funcom_train/51199955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void registerAceKeyRelease(int pAceKeyCode) {
//Subtract one from number of "pressers" of this key
int count = ivAceKeyCounts[pAceKeyCode]--;
//If no more "pressers", map key to ace keyboard row masks
if (count <= 1) {
ivAceKeyRows[pAceKeyCode>>4] &= ((1<<(pAceKeyCode & 0x0F)) ^ 0xFF);
ivAceKeyCounts[pAceKeyCode]=0;
}
}
COM: <s> register a key released on the virtual ace keyboard </s>
|
funcom_train/48528330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void routeSetChange(NodeHandle nh, boolean wasAdded) {
if (logger.level <= Logger.FINEST) {
String s = "In " + getNodeId() + "'s route set, " + "node "
+ nh.getNodeId() + " was ";
if (wasAdded)
s += "added";
else
s += "removed";
System.out.println(s);
}
}
COM: <s> invoked upon change to routing table </s>
|
funcom_train/27674848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readObject( final ObjectInputStream os ) throws IOException, ClassNotFoundException {
os.defaultReadObject();
if ( !AbstractOutputFileFunction.addNewPage( this.stem ) ) {
throw(
Alerts.eval(
"Page already exists",
"This Page alreay exists and cannot be loaded from the cache file"
).mishap()
);
}
}
COM: <s> reads the object from the stream exactly the same way it was serialized </s>
|
funcom_train/2610674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MapTag getMap(String originID, String mapID) {
String completeID = new String(originID + "/" + mapID);
MapTag map = (MapTag) maps.get(completeID);
if (map != null) return map;
map = loadMapImpl(mapID, originID);
if (map != null) processMap(map, originID);
return map;
}
COM: <s> returns code map tag code either from cache or loaded from disk </s>
|
funcom_train/24939705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String HTMLEncode(String text) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < text.length(); i++) {
char c = text.charAt(i);
if ((c == '<') || (c == '>') || (c == '\'') || (c == '"')) {
buffer.append("&#" + (int) c + ";");
} else {
buffer.append(c);
}
}
return buffer.toString();
}
COM: <s> encodes a piece of text according html conventions </s>
|
funcom_train/7758411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopApp() {
globalRegistry.unRegisterInstance(peerGroupAdvertisement.getPeerGroupID(), this);
removeAllServicesSync();
// Explicitly unreference our home group in order to allow it
// to terminate if this group object was itself the last reference
// to it.
if (parentGroup != null) {
parentGroup.unref();
parentGroup = null;
}
}
COM: <s> stops the group and all its services </s>
|
funcom_train/24181583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInputConditionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Program_inputCondition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Program_inputCondition_feature", "_UI_Program_type"),
ParallelJPackage.Literals.PROGRAM__INPUT_CONDITION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the input condition feature </s>
|
funcom_train/5340538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilesToPlaylist(final File[] fs) {
if(fs == null || fs.length == 0)
return;
GUIMediator.safeInvokeAndWait(new Runnable() {
public void run() {
synchronized(PLAY_LOCK) {
for(int i = 0; i < fs.length; i++)
addFileToPlaylist(fs[i]);
}
}
});
}
COM: <s> adds a bunch of files to the playlist </s>
|
funcom_train/37190057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIndex(String tableName, String indexDefinition) throws SQLException {
final Statement statement = (Statement)(serverAccess.runStatement(serverAccess.STATEMENT_EXECUTE, "ALTER TABLE "+tableName+" ADD "+indexDefinition));
if(statement != null) {
final Connection connection = statement.getConnection();
statement.close();
if(!connection.getAutoCommit()) connection.commit();
}
}
COM: <s> used to add an index to a table </s>
|
funcom_train/3108825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRequestDownload_bug20041122_1() throws Exception {
// result is invalid, but no exception is thrown
// assertFalse(allHubs.requestDownload(null));
new DownloadRequest(new SearchResult(), settings);
// result is invalid, but no exception is thrown
// assertFalse(allHubs.requestDownload(dr1));
}
COM: <s> java version 1 </s>
|
funcom_train/10522522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testImageArray() throws Exception {
Image[] images = client.getImages();
assertNotNull(images);
assertEquals(125, images[0].getHeight(null));
assertEquals(125, images[0].getWidth(null));
assertEquals(51, images[1].getHeight(null));
assertEquals(324, images[1].getWidth(null));
}
COM: <s> test an array of image attachments </s>
|
funcom_train/48747501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void deleteSchemas(String dbName) {
if (dbName == null)
dbName = new String("default");
if (theSchemas != null) {
// Start with a fresh db - wipe out all schemas.
//
try {
DBTool.deleteSchema(null,dbName,
theSchemas);
} catch(DBException e) {
//Ignore DBExceptions
} catch (HtmlException he) {
//Ignore HTMLExceptions
}
}
}
COM: <s> removes the schemas listed in the schemas list </s>
|
funcom_train/39294053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addParamtypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ParameterType1_paramtype_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ParameterType1_paramtype_feature", "_UI_ParameterType1_type"),
CntPackage.Literals.PARAMETER_TYPE1__PARAMTYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the paramtype feature </s>
|
funcom_train/25451456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findTheBestOverlap(String[] senses, String context) {
int theBest=0;
int theBestIndex=0;
if (senses[0] == null) {
System.out.println("Word not found");
} else {
int j=0;
while (senses[j] != null) {
String sense=senses[j];
int howmany=findHowManyOverLap(sense, context);
if(howmany>theBest){
theBest=howmany;
theBestIndex=j;
}
j++;
}
System.out.println("SOLUTION:");
System.out.println("-----------");
System.out.println(senses[theBestIndex]);
System.out.println("the number of overlapping words:"+theBest);
}
}
COM: <s> calculates the best overlap of senses </s>
|
funcom_train/8241521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void restoreRecapWordList(CategorySessionBean bean) {
currentCategorySessionBean = bean;
loadCategories();
loadSessions();
recapWordsList = DAOFactory.getDAOFactory().getStorageDAO().getWordsList(bean);
notify(new RecapWordListType(recapWordsList));
notify(new RestoreRecapWordListType(bean));
}
COM: <s> restores a previously saved recap word list </s>
|
funcom_train/26019160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminatedByServer() {
if (!subscribed) {
// Already unsubscribed
return;
}
if (logger.isActivated()) {
logger.info("Subscription has been terminated by server");
}
// Stop periodic subscription
stopTimer();
// Reset dialog path attributes
resetDialogPath();
// Force subscription flag to false
subscribed = false;
}
COM: <s> subscription has been terminated by server </s>
|
funcom_train/10004109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextures(boolean enable) {
useTextures = enable;
try {
if(useTextures && textures!=null) {
for(int i=0;i<segments.length;i++)
segments[i].getAppearance().setTexture(textures[i]);
} else {
if(multipleApps)
for(int i=0;i<segments.length;i++)
segments[i].getAppearance().setTexture(null);
else
segments[0].getAppearance().setTexture(null);
}
} catch (NullPointerException npe) { }
}
COM: <s> enables disables the use of textures to color the chromosome </s>
|
funcom_train/49262339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Image load(final String name) {
Display display = Display.getCurrent();
File folder = new File(FOLDER);
Image image;
File file = new File(folder, name + EXTENSION);
if (!file.exists()) {
return null;
}
try {
image = new Image(display, file.getCanonicalPath());
images.put(name, image);
return image;
} catch (SWTException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
COM: <s> loads and image of the given name and stores it in cache </s>
|
funcom_train/882705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNamingException() {
try {
om.createEntityType("testType6", "testTypeDescription6"); //$NON-NLS-1$ //$NON-NLS-2$
om.createEntityType("testType6", "testTypeDescription6"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (NamingException e) {
return;
}
fail("Expected NamingException"); //$NON-NLS-1$
}
COM: <s> test exception for duplicate type names </s>
|
funcom_train/50395879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void truncAppend(long offset, byte[]data)throws Exception{
TruncAppendDocument req=TruncAppendDocument.Factory.newInstance();
TruncAppend ta=req.addNewTruncAppend();
ta.setOffset(BigInteger.valueOf(offset));
TransferInformationType ti=ta.addNewTransferInformation();
String mechanism=isMTOMEnabled()?RandomByteIO.TRANSFER_MTOM:RandomByteIO.TRANSFER_SIMPLE;
ti.set(ByteIO.encode(mechanism,data));
ti.setTransferMechanism(mechanism);
fts.truncAppend(req);
}
COM: <s> write a block of data beginning at the given offset and truncating </s>
|
funcom_train/16093261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserObject(Object userObj) {
if(userObj == null) {
super.setUserObject(userObj);
}
else if(userObj.getClass() == String.class) {
((TreeInfo)this.getUserObject()).setNodeName(userObj.toString());
}
else {
super.setUserObject(userObj);
}
}
COM: <s> set user object sets the user object </s>
|
funcom_train/4916516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JobNode getParallelJobNodeToExecute() {
// Determine furthest parallel node
JobNode currentTask = this;
JobNode nextTask = null;
while ((nextTask = currentTask.getParallelNode()) != null) {
currentTask = nextTask;
}
// Determine if a parallel task
if (currentTask == this) {
// No parallel task
return null;
} else {
// Return the furthest parallel task
return currentTask;
}
}
COM: <s> obtains the parallel </s>
|
funcom_train/5858948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean haveRight(Integer right) {
for (Enumeration e = rights.elements(); e.hasMoreElements(); ) {
Integer r = (Integer) e.nextElement();
// Beware : uppers rights contains lower rights.
if (r.intValue() >= right.intValue()) {
return true;
}
}
return false;
}
COM: <s> returns true if this right contains the right given in parameter </s>
|
funcom_train/43881020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startSTART(String name, Attributes attrs) throws SAXException {
//a new supported type
if ("supportedType".equals(name)) {
String attrName = attrs.getValue("name");
this.supportedTypes.add(attrName);
this.state = START;
//a new wfs
} else if ("wfs".equals(name)) {
this.currentDS = null;
this.currentMap = new HashMap();
this.state = WFS;
//nothing else should happen
} else {
throw new SAXException(name+" not supported");
}
}
COM: <s> start of a new element </s>
|
funcom_train/25528972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rejectDocument(NGramDocument dDoc) {
// Affect structs
DocumentNGramGraph gGraph =
dDoc.getDocumentGraph().intersectGraph(getDocumentGraph());
DocumentNGramHistogram hHistogram =
dDoc.getDocumentHistogram().intersectHistogram(getDocumentHistogram());
getDocumentGraph().degrade(gGraph);
}
COM: <s> modifies the category so as to reject documents as o operand </s>
|
funcom_train/5376928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processPending() {
if (satisfiedCPIs.size() > 0) {
synchronized (satisfiedCPIs) {
for (int i = 0; i < satisfiedCPIs.size(); i++) {
ConditionalPermissionInfoImpl cpi = (ConditionalPermissionInfoImpl) satisfiedCPIs.get(i);
if (!cpi.isDeleted())
satisfiedCPS.addConditionalPermissionInfo(cpi);
}
satisfiedCPIs.clear();
}
}
}
COM: <s> process any satisfied cpis that have been added </s>
|
funcom_train/17382511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean propFileExists() {
String path = properties.getProperty("System.configPath").trim() + propsFileName;
if( path == null ) {
return false;
}
File file = new File(path);
if (file.isFile()) {
return true;
}
else {
return false;
}
}
COM: <s> returns true if the conf </s>
|
funcom_train/39540834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFractionalMetrics(Object fractionalMetrics) {
if (fractionalMetrics != null &&
!RenderingHints.KEY_FRACTIONALMETRICS.isCompatibleValue(fractionalMetrics)) {
throw new IllegalArgumentException(fractionalMetrics + " is not an acceptable value");
}
Object old = getFractionalMetrics();
renderingHints.put(RenderingHints.KEY_FRACTIONALMETRICS, fractionalMetrics);
firePropertyChange("fractionalMetrics", old, getFractionalMetrics());
}
COM: <s> sets whether or not to use fractional metrics </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.