__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/32870927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearFieldAccessWatch(Field field) {
if (!isInitialized)
throw new NotInitializedException("JVMAspectInterface.clearFieldAccessWatch: jvmai not initialized");
if (field == null)
throw new NullPointerException("JVMAspectInterface.clearFieldAccessWatch: null cls parameter");
synchronized(fieldAccessMap) {
doClearFieldAccessWatch(field.getDeclaringClass(),field);
fieldAccessMap.remove(field);
}
}
COM: <s> clears a watch on a field access joinpoint </s>
|
funcom_train/16606931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notTest() throws Exception {
List<String> file1 = getFile("file1.txt");
List<String> file2 = getFile("file2.txt");
long start = System.nanoTime();
Solution s = EditDistance.SOURCE_CODE_DIFF.compute(file1, file2);
long finish = System.nanoTime();
System.out.println((finish - start) / 1000000);
}
COM: <s> need some public test data before i can activate this test </s>
|
funcom_train/43235438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
if (node == null) {
selectedPlugin = null;
return;
}
Object nodeInfo = node.getUserObject();
if (node.isLeaf()) {
selectedPlugin = (PluginInfo)nodeInfo;
areaPluginInfo.setText(pluginInfoMap.get((selectedPlugin.name)));
} else {
selectedPlugin = null;
}
}
COM: <s> it is called when the new plug in was selected </s>
|
funcom_train/16962439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Attribute getById( Long id, Session session) throws HibernateException {
log.debug("getting Attribute instance with id: " + id);
Attribute instance = (Attribute) session.get("com.brevissimus.smartbpm.model.Attribute", id);
if (instance == null) {
log.debug("get successful, no instance found");
} else {
log.debug("get successful, instance found");
}
return instance;
}
COM: <s> code attribute code get by id </s>
|
funcom_train/31157765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
ConflictSetElement cse1 = (ConflictSetElement) o1;
ConflictSetElement cse2 = (ConflictSetElement) o2;
if (cse1.getTimestamp() < cse2.getTimestamp()) {
return -1;
} else if (cse1.getTimestamp() == cse2.getTimestamp()) {
return 0;
} else {
return 1;
}
}
COM: <s> compares two conflict set elements cses </s>
|
funcom_train/3047123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cascadeOnUpdate(SaveOrUpdateEvent event, EntityPersister persister, Object entity) {
EventSource source = event.getSession();
source.getPersistenceContext().incrementCascadeLevel();
try {
new Cascade(CascadingAction.SAVE_UPDATE, Cascade.AFTER_UPDATE, source)
.cascade(persister, entity);
}
finally {
source.getPersistenceContext().decrementCascadeLevel();
}
}
COM: <s> handles the calls needed to perform cascades as part of an update request </s>
|
funcom_train/18525494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws IOException, SAXException {
if (wizard != null) {
InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.NEW_TC_1_XML_FILE);
if (is != null) {
getParser().setContentHandler(this);
getParser().setErrorHandler(this);
getParser().parse(is);
}
}
}
COM: <s> parse the newtcwizard1 </s>
|
funcom_train/18737408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTargetAnnotation(ClassScope classScope,String kind) {
if ((onTypeBinding.getAccessFlags() & ACC_ANNOTATION)!=0) {
classScope.problemReporter().signalError(sourceStart,sourceEnd,
"can't make inter-type "+kind+" declarations on annotation types.");
ignoreFurtherInvestigation = true;
return true;
}
return false;
}
COM: <s> checks that the target for the itd is not an annotation </s>
|
funcom_train/49700821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Formula progress() {
final Variable t1 = Variable.unary("t");
final Expression t2 = t1.join(tord);
final Variable p = Variable.unary("p");
final Formula f1 = Process.join(toSend).join(t1).some().implies(skip(t1, t2, p).not().forSome(p.oneOf(Process)));
return f1.forAll(t1.oneOf(Time.difference(tlast)));
}
COM: <s> returns the progress predicate </s>
|
funcom_train/50573761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initUniqueIdBean() {
UniqueIdRemoteHome home =null;
try {
home = getRemoteHome();
home.findByPrimaryKey(new Integer(ROWID) );
} catch(FinderException e) {
try{
UniqueIdRemote catalog = home.create();
} catch(Exception e1) {
e1.printStackTrace();
}
} catch(Exception e) {
e.printStackTrace();
}
}
COM: <s> inserts one only row into the unique id table if not yet inserted </s>
|
funcom_train/15627469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doExitConnect(final boolean performAction) {
final MapView<G, A, R> mapView = currentMapView;
if (mapView == null) {
return false;
}
final Point targetLocation = mapView.getMapCursor().getLocation();
return targetLocation != null && exitConnectorActions.doExitConnect(performAction, mapView.getMapControl(), targetLocation);
}
COM: <s> performs or checks availability of the exit connect action </s>
|
funcom_train/12086513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getResourceMonitorObject(String resourceType) {
Object monitorObject = null;
// Short lived big lock to get more fine-grained monitor object
// to then be locked on for the subsequent slow File I/O work
synchronized (resourceMonitorObjects) {
monitorObject = resourceMonitorObjects.get(resourceType);
if (monitorObject == null) {
monitorObject = new Object();
resourceMonitorObjects.put(resourceType, monitorObject);
}
}
return monitorObject;
}
COM: <s> get lock monitor object for specific resource type eg </s>
|
funcom_train/44215390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFilterMouseMotionEvents() throws Exception {
Player player = PlayerFactory.buildSpeedy("pounder/accpt/TestFilterMouseMotionEvents.pnd");
PounderInstance instance = (PounderInstance)player.play();
RecordingRecord rr = instance.model.getRecord();
Enumeration e = rr.elements();
while(e.hasMoreElements()) {
assertTrue(! (e.nextElement() instanceof MouseMotionItem));
}
}
COM: <s> no mouse motion events should exist in the script </s>
|
funcom_train/19095333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node addParagraph(Document doc, Node ndParent, com.sonoma.objects.spParagraph para){
XMLUtility myXML = new XMLUtility();
Node ndNew;
ndNew = doc.createElement("para");
ndNew = processParagraph(doc, myXML, ndNew, para);
Node ndReturn;
ndReturn = ndParent.insertBefore(ndNew, null);
return ndReturn;
}
COM: <s> quickly adds a new paragraph at the end of the parent node </s>
|
funcom_train/47528723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkin(SocketDestination destination, SocketAndStreams socket) {
try {
pool.returnObject(destination, socket);
} catch(Exception e) {
try {
pool.invalidateObject(destination, socket);
} catch(Exception e2) {
logger.error("Error while destroying socket:", e2);
}
throw new UnreachableStoreException("Failure while checking out socket for "
+ destination + ": ", e);
}
}
COM: <s> check the socket back into the pool </s>
|
funcom_train/50688016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean bPerformTask(ServletTask t) throws WebException {
if (t.isAction("Close")) {
ServletWnd hServletWnd = getServletWnd_top();
if (hServletWnd.getServletWnd_parent() != null) {
getServletWnd_top().close();
}
return true;
}
return false;
}
COM: <s> performs the default tasks for this session </s>
|
funcom_train/19404250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object resolve( Object obj ) {
IGeneric x = (IGeneric) obj;
if( x.getLink( GLink.PROPERTY_NETWORK ) != null ) {
return ((IGeneric)obj).asClass
( GLink.class
);
} else if( x.getLink( GNode.PROPERTY_NETWORK ) != null ) {
return ((IGeneric)obj).asClass
( GNode.class
);
} else {
throw new RuntimeException
( "Generic object is not marked as a unit or link: "+x
);
}
}
COM: <s> re skins the generic object as a </s>
|
funcom_train/42180499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Component getActiveParent() {
for (Frame frame : Frame.getFrames()) {
if (frame.isActive()) {
return frame;
} else for (Component child : frame.getComponents()) {
if (child instanceof Window
&& ((Window)child).isActive()) {
return child;
}
}
}
return null;
}
COM: <s> returns the currently active window </s>
|
funcom_train/29864873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApplicationDescriptor createApplication(String label) {
// Sanity check to avoid invalid or duplicate labels.
if (!validateLabel(label))
return null;
if (findApplicationWithLabel(label) != null)
return null;
// Calculate ID.
String id = label.replace(' ', '_');
id = id.trim();
// Create descriptor.
ApplicationDescriptor desc = new ApplicationDescriptor(id, label);
add(desc);
return desc;
}
COM: <s> create a new application </s>
|
funcom_train/29869821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJAddNoteButton() {
if (jAddNoteButton == null) {
jAddNoteButton = new JButton();
jAddNoteButton.setText("New Note");
jAddNoteButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
actionAddNoteButton(e);
}
});
}
return jAddNoteButton;
}
COM: <s> this method initializes j add note button </s>
|
funcom_train/20633023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int showWarningMsg (String msg, String title, Component parent) {
int option = JOptionPane.showOptionDialog ( parent, msg, title,
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE,
null, null, null );
return option;
}
COM: <s> call this method to popup a generic warning message dialog if an </s>
|
funcom_train/546646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lowerObject() {
if (selObjects.size() == 1) {
JDObject n = (JDObject) selObjects.get(0);
int pos = objects.indexOf(n);
if (pos > 0) {
objects.remove(pos);
objects.add(pos - 1, n);
setNeedToSave(true, "Lower");
repaint(n.getRepaintRect());
}
}
}
COM: <s> move down selected object </s>
|
funcom_train/21799899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChildren( TreeModelNode[] children ) {
if ( this.children != null ) {
for ( TreeModelNode child : this.children ) {
child.setParent( null );
}
}
this.children = children;
if ( children != null ) {
for ( TreeModelNode child : children ) {
child.setParent( this );
}
}
fireChildrenChanged( this );
}
COM: <s> changes the children of this node </s>
|
funcom_train/26384378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
loadXInsertFile();
Jext.addAction(new TeXifyAction());
Jext.addAction(new TeXifyPDFAction());
// Jext.addAction(new TTHAction());
Jext.addAction(new WinHelpAction());
Jext.addAction(new WinHelpMikTeXAction());
Jext.addAction(new IniTeXmfAction());
}
COM: <s> called by jext on startup to start plugin </s>
|
funcom_train/11651631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String setConnectionCookie(HttpRequest request, URL url, CookieManager cookieManager) {
String cookieHeader = null;
if (cookieManager != null) {
cookieHeader = cookieManager.getCookieHeaderForURL(url);
if (cookieHeader != null) {
request.setHeader(HEADER_COOKIE, cookieHeader);
}
}
return cookieHeader;
}
COM: <s> extracts all the required cookies for that particular url request and </s>
|
funcom_train/3174359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int string2int(String s) {
if (s.length()!=4) throw new IllegalArgumentException();
return
(s.charAt(0) & 0xff) << 24 |
(s.charAt(1) & 0xff) << 16 |
(s.charAt(2) & 0xff) << 8 |
(s.charAt(3) & 0xff) ;
}
COM: <s> transform a string to int 4 bytes </s>
|
funcom_train/18963574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawLine( double angle1, double radius1, double angle2, double radius2) {
g_.drawLine(getScreenX(angle1,radius1), getScreenY(angle1, radius1), getScreenX(angle2,radius2),getScreenY(angle2,radius2) );
}
COM: <s> for drawing arbitary lines </s>
|
funcom_train/26281647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectRectangle(double x, double y, double width, double height, int selectionMode, boolean feather, double featherRadius) throws JGimpException {
m_App.callProcedure("gimp_rect_select", this, new Double(x), new Double(y), new Double(width), new Double(height), new Integer(selectionMode), new Boolean(feather), new Double(featherRadius));
}
COM: <s> selects a rectangular region in the image </s>
|
funcom_train/25854066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGatewayUrl(String baseUrl) throws MalformedURLException {
URL gateway = new URL(baseUrl);
log.debug("gateway base url: " + gateway.toExternalForm());
carrierListUrl = new URL(gateway, "list").toExternalForm();
validationRequestUrl = new URL(gateway, "msg").toExternalForm();
log.debug("carrierListUrl: " + carrierListUrl);
log.debug("validationRequestUrl: " + validationRequestUrl);
}
COM: <s> given the base url setup the list and msg urls </s>
|
funcom_train/9538496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setURL(String url) {
if ((url == this.url) ||
((url != null) && (this.url != null) && url.equals(this.url))) {
return;
}
String old = url;
this.url = url;
firePropertyChange(PROP_URL, old, url);
}
COM: <s> sets name of class to stop on </s>
|
funcom_train/29986599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeDown (RequestHandler rh) {
if (rh.wc != null) {
proxy.releaseWebConnection (rh.wc);
rh.wc = null;
} else if (rh.entry != null) {
try {
FileChannel fc = rh.contentStream.getFileChannel ();
if (fc != null) {
fc.close ();
}
rh.contentStream.close ();
} catch (IOException e) {
proxy.logError (Logger.WARN, "Error closing stream:" + e);
setKeepalive (false);
}
rh.entry = null;
}
}
COM: <s> close cache streams and return web connections </s>
|
funcom_train/23297585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCladeBranchColor(Color paint) {
if ( paint != this.fCladeBranchColor) {
this.fCladeBranchColor = paint;
// send an event to all registered listeners.
this.notifyTree2DPanelPreferenceChangeListeners(new
Tree2DPanelPreferenceChangeEvent(this,
Tree2DPanelPreferenceChangeEvent.PAINT_MODIFIED));
}
}
COM: <s> sets the default paint used to draw the clade branch line </s>
|
funcom_train/35027605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(float tpf) {
// TODO: Note that here is where the updateGeometricState call is done. Document!!!
// TODO: Is this correct? doing this here? see SceneRenderView!
// TODO: What about other things (skybox, etc...) that need to be updated?
rootNode.updateGeometricState( tpf, true );
}
COM: <s> updates the level making all calculations needed that </s>
|
funcom_train/4588724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String serviceToHtml(SADIServiceDescription service) {
StringBuilder sb = new StringBuilder();
sb.append("<html><dl>");
sb.append("<dt><b>");
sb.append(service.getName());
sb.append("</b></dt><dd>");
sb.append(service.getDescription());
sb.append("</dd>");
sb.append("<dt><b>Properties attached:</b> ");
boolean first = true;
for (String property : service.getProperties()) {
if (!first) {
sb.append(", ");
}
sb.append(property);
first = false;
}
sb.append("</dt><dd></dd></dl>");
return sb.toString();
}
COM: <s> returns the service name and description as html </s>
|
funcom_train/13490534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load(String res) throws Exception {
InputStream is = ProvaRunner3.class.getResourceAsStream(res);
if (is == null)
throw new Exception("Unknown resource: "+res);
BufferedReader rr = new BufferedReader(new InputStreamReader(is));
comm.consultAsync(":- eval(consult(_0)).", new Object[]{rr});
// TODO: can't actually close the stream as it is being read from asynchronously
rr.close();
}
COM: <s> load a rulebase from resource </s>
|
funcom_train/10548410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown(Object serviceModule) {
if (serviceModule == null)
return;
TopService ts = findTopService(serviceModule);
if (ts == null)
return;
// shutdown() returns false if the service is already being shutdown
boolean removeService = true;
try {
removeService = ts.shutdown();
} finally {
synchronized (this) {
if (removeService) {
boolean found = services.remove(ts);
if (SanityManager.DEBUG) {
SanityManager.ASSERT(found, "service was not found " + serviceModule);
}
}
}
}
}
COM: <s> shut down a service that was started by this monitor </s>
|
funcom_train/44875707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEmptyArray() {
String encoded = StringListEditor.encodeStrings(new String[0]);
assertNotNull("encoded is null", encoded);
String[] decoded = StringListEditor.decodeStrings(encoded);
assertNotNull("decoded is null", decoded);
assertEquals("wrong number of attributes", 0, decoded.length);
}
COM: <s> test that empty arrays encode decode fine </s>
|
funcom_train/20440009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEndpointAPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFStateItemConnection_endpointA_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFStateItemConnection_endpointA_feature", "_UI_ESMFStateItemConnection_type"),
ESMFPackage.Literals.ESMF_STATE_ITEM_CONNECTION__ENDPOINT_A,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the endpoint a feature </s>
|
funcom_train/12555832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printHelper(BinNodeADT<Key, Elem> root, Writer w) {
if (root == null) {
return;
}
printHelper(root.left(), w);
try {
w.write(root.val() + " ");
} catch (IOException e) {
e.printStackTrace();
}
printHelper(root.right(), w);
}
COM: <s> helper method for printing a bst </s>
|
funcom_train/23020288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException {
LOG.trace("enter HttpMethodBase.addRequestHeaders(HttpState, " + "HttpConnection)");
addUserAgentRequestHeader(state, conn);
addHostRequestHeader(state, conn);
addCookieRequestHeader(state, conn);
addProxyConnectionHeader(state, conn);
}
COM: <s> generates all the required request </s>
|
funcom_train/3394742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closure(Type t, Map<TypeSymbol,Type> typeMap) {
if (t.tag != CLASS) return;
if (typeMap.put(t.tsym, t) == null) {
closure(types.supertype(t), typeMap);
for (Type i : types.interfaces(t))
closure(i, typeMap);
}
}
COM: <s> compute all the supertypes of t indexed by type symbol </s>
|
funcom_train/8662203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sameLocals(int offsetDelta, int tag, int data) {
numOfEntries++;
if (offsetDelta < 64)
output.write(offsetDelta + 64);
else {
output.write(247); // SAME_LOCALS_1_STACK_ITEM_EXTENDED
write16(offsetDelta);
}
writeTypeInfo(tag, data);
}
COM: <s> writes a code same locals 1 stack item code </s>
|
funcom_train/22113109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCacheIncrement() throws Exception {
AvailabilityCache cache = getClearedCache();
int i = 0;
DataPoint dp = new DataPoint(0, 0, 0);
for (; i < AvailabilityCache.CACHESIZE * 2; i++) {
cache.put(new Integer(i), dp);
}
assertEquals(i, cache.getSize());
}
COM: <s> test growing the maximum size of the cache </s>
|
funcom_train/4385744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void step3() throws Exception{
// Builds a soda query that selects all users with a name that contains 'livi'
IQuery sodaQuery = new SodaQuery(User.class, Soda.like("name","%livi%"));
System.out.println("\nSTEP 3 : Select using SODA Query\n");
// Open the dialogy odb database file
ODB odb = ODB.open(ODB_FILE_NAME);
// Gets objects that match the query!
List list = odb.getObjects(sodaQuery);
System.out.println(list);
odb.close();
}
COM: <s> select using soda query </s>
|
funcom_train/4233643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void centerImageFromNavigationPoint(Point navigationPoint) {
Point scaledImagePoint = navigationToScaledImagePoint(navigationPoint);
int newOriginX = -(scaledImagePoint.x - getWidth() / 2);
int newOriginY = -(scaledImagePoint.y - getHeight() / 2);
smoothScroll(newOriginX, newOriginY);
}
COM: <s> centers the image using the point from the navigation image </s>
|
funcom_train/38318675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getLineWidth (String sLine, int nTabWidth) {
int nWidth= 0;
for (int i= 0; i < sLine.length(); i++) {
if (sLine.charAt(i) == '\t') {
nWidth+= (nTabWidth - (nWidth % nTabWidth));
} else {
nWidth++;
}
}
return nWidth;
}
COM: <s> returns the length of a line </s>
|
funcom_train/29410684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
DiagramPageSetupWizard w = new DiagramPageSetupWizard();
w.init(null, null);
IWorkbenchPart page = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().getActivePart();
WizardDialog dialog = new WizardDialog(page.getSite().getShell(), w);
dialog.create();
dialog.open();
}
COM: <s> runs the action </s>
|
funcom_train/43894212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List wrap(List members) {
List wrapped;
try {
wrapped = (List) members.getClass().newInstance();
} catch (Exception e) {
wrapped = new ArrayList();
}
for (Iterator m = members.iterator(); m.hasNext();) {
Resolve member = (Resolve) m.next();
AdaptingResolve wrapper = wrap(member);
if (wrapper != null) {
wrapped.add(wrapper);
}
}
return wrapped;
}
COM: <s> wraps a list of catalog handles in an associated adapting implemenation </s>
|
funcom_train/17892832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getStatusPanel() {
if (statusPanel == null) {
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.gridx = 0;
gridBagConstraints4.gridy = 0;
jLabel1 = new JLabel();
jLabel1.setText("jLabel1");
statusPanel = new JPanel();
statusPanel.setLayout(new GridBagLayout());
statusPanel.setBorder(BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
statusPanel.add(jLabel1, gridBagConstraints4);
}
return statusPanel;
}
COM: <s> this method initializes status panel </s>
|
funcom_train/3709901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSpOrder (int row, int extension) {
if (extension > 0 && extension <=nextend) {
try {
Row rowdesc = (Row)descriptor[extension-1].elementAt(row-1);
return rowdesc.sporder;
} catch (IndexOutOfBoundsException e) {
return 0;
}
} else
return 0;
}
COM: <s> returns the spectral order number stored in the given row </s>
|
funcom_train/41575971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getDumpString() {
if (dumpString == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code here
dumpString = new StringItem("Dump: ", "", Item.PLAIN);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return dumpString;
}
COM: <s> returns an initiliazed instance of dump string component </s>
|
funcom_train/19321890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Descriptor createDefaultDescriptor() {
return new DescriptorSupport(new String[] {
DescriptorConstants.DESCRIPTOR_TYPE + "="
+ DescriptorConstants.DESCRIPTOR_TYPE_ATTRIBUTE_TYPE,
DescriptorConstants.NAME + "=" + getName(),
DescriptorConstants.DISPLAY_NAME + "=" + getName(),
DescriptorConstants.ITERABLE + "="
+ DescriptorConstants.FALSE });
}
COM: <s> creates and returns a descriptor with default values set </s>
|
funcom_train/4010661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkSPOTBoxSelection() {
for (int j = 0; j < numberOfSpots; j++) {
if (jCheckBoxArray[j].isSelected()) {
return true;
}
}
jPanelDeviceDiscoveredWarning.setText("Please select at least one SPOT to configure");
return false;
}
COM: <s> check if at least one check box is selected </s>
|
funcom_train/23034888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIdentitySearchScope(String scope) {
if ("OBJECT_SCOPE".equalsIgnoreCase(scope))
identitySearchScope = SearchControls.OBJECT_SCOPE;
else if ("ONELEVEL_SCOPE".equalsIgnoreCase(scope))
identitySearchScope = SearchControls.ONELEVEL_SCOPE;
if ("SUBTREE_SCOPE".equalsIgnoreCase(scope))
identitySearchScope = SearchControls.SUBTREE_SCOPE;
}
COM: <s> one of object scope onelevel scope or subtree scope </s>
|
funcom_train/33414341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFtpBackup() {
/*try {
mediator = new BackupMediator(externalConfigFile);
Project p = mediator.getProject(EXTERNAL_BACKUP);
runTask("FTP Backup Test", p, false);
verifyDestinationObjectsSize(SIZE);
} catch (IOException ex) {
logger.error("Error testFtpBackup", ex);
}*/
}
COM: <s> test ftp backups </s>
|
funcom_train/8096595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Classifier getClassifier() {
CostSensitiveClassifier cl = new CostSensitiveClassifier();
// load costmatrix
try {
cl.setCostMatrix(
new CostMatrix(
new InputStreamReader(ClassLoader.getSystemResourceAsStream(
"weka/classifiers/data/ClassifierTest.cost"))));
}
catch (Exception e) {
e.printStackTrace();
}
return cl;
}
COM: <s> creates a default cost sensitive classifier </s>
|
funcom_train/12671005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetExperience() {
System.out.println("getExperience");
AntImpl instance = new AntImpl();
float expResult = 0.0F;
float result = instance.getExperience();
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 experience method of class engine </s>
|
funcom_train/5342986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastPingRequest(PingRequest ping) {
if(ping == null) {
throw new NullPointerException("null ping");
}
_pingRouteTable.routeReply(ping.getGUID(), FOR_ME_REPLY_HANDLER);
broadcastPingRequest(ping, FOR_ME_REPLY_HANDLER, _manager);
}
COM: <s> broadcasts the ping request to all initialized connections </s>
|
funcom_train/40678913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(final REMOVED_DECODED_PAD listener) {
connect(REMOVED_DECODED_PAD.class, listener, new GstCallback() {
@SuppressWarnings("unused")
public void callback(DecodeBin elem, Pad pad) {
listener.removedDecodedPad(elem, pad);
}
});
}
COM: <s> adds a listener for the code removed decoded pad code signal </s>
|
funcom_train/3926991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewerVersion( int versionNo, java.io.Serializable serObject ) {
viewer.setVersion( versionNo );
JournalItem new_journal = new JournalItem();
new_journal.action = MARK_VERSION;
// new_journal.line = versionNo;
new_journal.next = undo_list;
undo_list = new_journal;
// can fail due to disk space problems, in which case undo is impossible
new_journal.line = serializeFileVersion( versionNo, serObject );
}
COM: <s> viewers get automatic version saved after each chisel sequence </s>
|
funcom_train/9494873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countEigenValues(final double t, final int index, final int n) {
double ratio = main[index] - t;
int count = (ratio > 0) ? 0 : 1;
for (int i = 1; i < n; ++i) {
ratio = main[index + i] - squaredSecondary[index + i - 1] / ratio - t;
if (ratio <= 0) {
++count;
}
}
return count;
}
COM: <s> count the number of real eigenvalues below a point </s>
|
funcom_train/29939826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setLines() {
log.entry("setlines");
setProgressBarText(GUI.res.getString("pass4"),result.size());
for (int i = 0; i < result.size(); i ++) {
timervalue = i + 1;
parent.data.add(result.get(i));
}
((AbstractTableModel) parent.table.getModel()).fireTableDataChanged();
parent.status.print(GUI.res.getString("readsuccess"));
parent.loading = false; // what's that for?
fileIsOpened = true;
log.exit("setlines");
}
COM: <s> step four populating the jtable todo make it recognize directly this data </s>
|
funcom_train/9559796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IVariableChart getVariableChart() {
if (variableChart == null) {
IVariableDescription variableDescription = VariableManager
.getInstance().getVariableDescription(variable);
if (variableDescription != null
&& TypeUtils.isNumericType(variableDescription
.getTypeAsString())) {
variableChart = new VariableXYChart(variable, false);
}
}
return variableChart;
}
COM: <s> get the chart for this row </s>
|
funcom_train/17008512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getInputStream() throws IOException {
InputStream[] tinputs = new InputStream[number_of_streams_];
try {
for (int i = 0; i < number_of_streams_; i++) {
tinputs[i] = data_sockets_[i].getInputStream();
}
}
catch (IOException e) {
throw e;
}
PTCPInputStream input = new PTCPInputStream(tinputs,increase_performance_);
//txEndTime_ = input.txEndTime_;
return input;
}
COM: <s> returns an input stream for this socket </s>
|
funcom_train/49703822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UrlPatternBoostCondition (Config config) {
super(config);
String filename = config.getString("condition.url.patterns.file");
String filepath = FileUtil.getFilePathFromClasspath(filename);
try {
patterns = new UrlPatterns(filepath);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> load the url patterns specified in the configuration </s>
|
funcom_train/35842120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeEdgePort() {
if (edgePort == null) {
edgePort = new FigEdgePort();
if (getOwner() != null) {
edgePort.setOwner(getOwner());
}
edgePort.setVisible(false);
addPathItem(edgePort,
new PathConvPercent(this, 50, 0));
}
}
COM: <s> create a fig comment port if needed </s>
|
funcom_train/17293212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRemainder(int divisor) {
// Encontra newNum[0] = num modulo divisor, newNum[1] = num dividido divisor
BigInteger[] newNum = num.divideAndRemainder(BigInteger.valueOf(divisor));
// Adiciona modulo
nro.add(new Integer(newNum[1].intValue()));
// Altera numero
num = newNum[0];
}
COM: <s> adds a feature to the remainder attribute of the extenso object </s>
|
funcom_train/12557436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read() throws IOException {
int val;
if (isClosed) {
throw new InterruptedIOException("Stream closed");
}
synchronized(rec) {
if (cnt == 0) {
refill(true);
if (cnt == 0) {
return -1; // end of stream
}
}
val = rec.inputData[start++] & 0xff;
cnt--;
}
return val;
}
COM: <s> reads a byte from this input stream </s>
|
funcom_train/2546884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeChild(WorkflowContentElementModel e) {
if (e != null && elements.remove(e)) {
if (e instanceof StatefulElementModel)
state.removeElement((StatefulElementModel) e);
firePropertyChange(EventIdentification.PROPERTY_CHILD_ADDED, null, e);
return true;
}
return false;
}
COM: <s> remove an element from this workflow </s>
|
funcom_train/2624561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(final Font font) {
if (font == this.font) {
return;
}
final Font oldFont = this.font;
if (font == null) {
this.font = DEFAULT_FONT;
}
else {
this.font = font;
}
lines = null;
recomputeLayout();
invalidatePaint();
firePropertyChange(PROPERTY_CODE_FONT, PROPERTY_FONT, oldFont, this.font);
}
COM: <s> set the font for this text node to code font code </s>
|
funcom_train/3084270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Dimension getTextDimensions(TextLayout[] textLayouts) {
double height = 0;
double width = 0;
double w = 0;
for (int i = 0; i < textLayouts.length; i++) {
w = textLayouts[i].getBounds().getWidth();
if (w > width)
width = w;
height += calcTextLayoutHeight(textLayouts[i]);
}
return new Dimension((int) width, (int) height);
}
COM: <s> returns the total dimensions of a list of text layouts </s>
|
funcom_train/40312288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPrecision_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getPrecision(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getPrecision method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get precision with negative column index </s>
|
funcom_train/46984542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(REDIRECT source) {
int size;
setName(source.getName());
setType(source.getType());
setStrand(source.getStrand());
setUrl(source.getUrl());
setHeight(source.getHeight());
if (source.canvas_ != null) {
setCanvas((Canvas)source.getCanvas().clone());
}
}
COM: <s> initializes the code redirect code by the redirect code source code </s>
|
funcom_train/3123811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDNS(String dnsIp) throws UnknownHostException{
InetAddress newDns = InetAddress.getByName(dnsIp);
// check if we already have this item
InetAddress[] ina = getDNS();
for (int i = 0; i<ina.length; i++){
if (ina[i].equals(newDns)){
return false;
}
}
dnsservers.addElement(newDns);
return true;
}
COM: <s> adds a dns server </s>
|
funcom_train/42709438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonDeleteAdress() {
if (jButtonDeleteAdress == null) {
jButtonDeleteAdress = new JButton();
jButtonDeleteAdress.setActionCommand("DeleteAdress");
jButtonDeleteAdress.setBounds(new Rectangle(270, 270, 121, 21));
jButtonDeleteAdress.setText("Delete");
}
return jButtonDeleteAdress;
}
COM: <s> this method initializes j button delete adress </s>
|
funcom_train/49790793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IElement getLabel(String id) {
// get all labels
for (IElement e : getTestingEngine().getElementsByXPath("//label")) {
if (e.getName().equals("label") && id.equals(e.getAttribute("id")))
return e; // label found
}
return null;
}
COM: <s> copied directly from jweb unit implementation </s>
|
funcom_train/25218704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Chromosome createChromosome(int minOpening, int maxOpening, int minEnd, int maxEnd, int min, int max) {
return ChromosomeFactory.create(minOpening, maxOpening, minEnd, maxEnd, min, max);
}
COM: <s> creates chromosome of specific minimum maximum value of features and </s>
|
funcom_train/25656771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPriority(int p) {
if ((p >= 0) && (p <= 100)) {
priority = p;
} else {
log.error("Invalid value to JobExecutable.setPriority() " + p
+ ". Set operation ignored -- priority remains: " + getPriority());
}
}
COM: <s> set the priority for this executable </s>
|
funcom_train/32057792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOverviewDialog() {
System.out.println("testGetOverviewDialog");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
assertEquals("getOverviewDialog failed",
newDoc.getOverviewDialog() == null, true);
}
COM: <s> test of get overview dialog method of class gpdocument </s>
|
funcom_train/42273435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeCachedWritingReader() {
if (cachedWritingReader != null) {
log.debug("closing cached writing reader");
try {
accessProvider.close(cachedWritingReader);
} catch (RuntimeException e) {
log.error("", e);
} finally {
cachedWritingReader = null;
}
}
}
COM: <s> close the cached writing reader </s>
|
funcom_train/19309344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PDFEncoding obtainPDFEncoding(final Encoding encoding) {
if (encoding == null) {
return null;
}
PDFEncoding pdfEncoding = this.encodingsUsed.get(encoding);
if (pdfEncoding == null) {
pdfEncoding = new PDFEncoding(this, encoding);
this.encodingsUsed.put(encoding, pdfEncoding);
}
return pdfEncoding;
}
COM: <s> obtain a pdfencoding for a given encoding instance </s>
|
funcom_train/30137409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AxisOperation findOperation(AxisService service, MessageContext messageContext) throws AxisFault {
log.debug("Inside edu.indiana.cs.gst.GSTHackingHandler.findOperation()");
// create a dummy operation here and attach our message receiver in to that
InOutAxisOperation axisOperation = new InOutAxisOperation();
axisOperation.setMessageReceiver(new GSTMessageReceiver());
return axisOperation;
}
COM: <s> configure the message reciever class </s>
|
funcom_train/10179573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isCookiePresent(HttpServletRequest request) {
Cookie cookies[] = request.getCookies();
if (cookies == null) {
return false;
}
for (int i = 0; i < cookies.length; i++) {
if (this.cookie.equals(cookies[i].getName())) {
return true;
}
}
return false;
}
COM: <s> returns true if the cookie is present in the request </s>
|
funcom_train/49317454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
if (fileChooser == null) {
fileChooser = makeFileChooser();
}
int option = fileChooser.showOpenDialog(this);
if (option == JFileChooser.APPROVE_OPTION && fileChooser.getSelectedFile() != null) {
open(fileChooser.getSelectedFile().getAbsolutePath());
}
}
COM: <s> display a file chooser to select a local catalog file to open </s>
|
funcom_train/47366306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getButDeterminaLTS() {
if (ButDeterminaLTS == null) {
ButDeterminaLTS = new JButton();
ButDeterminaLTS.setBounds(new Rectangle(15, 75, 361, 31));
ButDeterminaLTS.setText("Determina l' LTS associato a uno stato");
ButDeterminaLTS.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
buttonAction(3);
}
});
}
return ButDeterminaLTS;
}
COM: <s> this method initializes but determina lts </s>
|
funcom_train/12812948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lookAtFlatfiles() throws Exception {
SQLQuery squery = new SQLQuery();
ResultSet rs = squery.run("select oidsaada from " + Database.getWrapper().getCollectionTableName(this.name, Category.FLATFILE) + " limit 1");
this.has_flatfiles = false;
while( rs.next() ) {
//if( rs.getInt(1) > 0 ) {
this.has_flatfiles = true;
squery.close();
return;
//}
}
squery.close();
}
COM: <s> set a flag true if the collection contains flatfiles </s>
|
funcom_train/1928714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasInEdgeWithLabel(String label) {
SMEdge edge;
Iterator it = incoming.iterator();
while(it.hasNext()) {
edge = (SMEdge) it.next();
if(edge.getLabel() == label || (label != null && label.equals(edge.getLabel()))) {
return true;
}
}
return false;
}
COM: <s> determines whether this node has an incoming edge with a given label </s>
|
funcom_train/17492285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(ImportDeclaration node) {
if (node.isPackage()) {
context.declarePackageImport(node.getName());
} else {
try {
context.declareClassImport(node.getName());
} catch (ClassNotFoundException e) {
throw new CatchedExceptionError(e, node);
}
}
return null;
}
COM: <s> declares the package or class importation in the context </s>
|
funcom_train/14245165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAssociatedClassifiers(MClassifier classifier) {
if (classifier == null) return new ArrayList();
List list = new ArrayList();
Iterator it = classifier.getAssociationEnds().iterator();
while (it.hasNext()) {
MAssociationEnd end = (MAssociationEnd)it.next();
MAssociation assoc = end.getAssociation();
Iterator it2 = assoc.getConnections().iterator();
while (it2.hasNext()) {
MAssociationEnd end2 = (MAssociationEnd)it2.next();
if (end2 != end) {
list.add(end2.getType());
}
}
}
return list;
}
COM: <s> gets all classifiers that are associated to the given classifier have </s>
|
funcom_train/28742083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer createSampleInfo(EmicroSampleInfo info) throws SimsException {
String errMsg = clsName + ".createNewSample(): ";
Integer id = null;
try {
//Create EmicroSample and return local object.
local = this.createNewSampleLocal(info);
id = local.getId();
}
catch (RuntimeException e) {
ctx.setRollbackOnly();
//Propagate.
throw e;
}
return id;
}
COM: <s> this method create a new emicro sample object </s>
|
funcom_train/27836943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EditPart createChild(Object model) {
EditPart child = null;
if (model instanceof ClassModel)
child = new ClassEditPart();
/*
if (model instanceof LogicFlowContainer)
child = new LogicFlowContainerEditPart();
else if (model instanceof LED)
child = new LEDEditPart();
else if (model instanceof Circuit)
child = new CircuitEditPart();
else if (model instanceof Gate)
child = new GateEditPart();
else if (model instanceof SimpleOutput)
child = new OutputEditPart();
*/
if (child != null)
child.setModel(model);
return child;
}
COM: <s> creates a child based on a model given </s>
|
funcom_train/51764126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDateString(String date) {
Date newDate = Calendar.getInstance().getTime();
if (!StringUtils.isEmpty(date)) {
try {
newDate = datePattern.parse(date);
} catch (ParseException e) {
System.out.println("Could not parse date: '" + date + "'");
}
}
setDate(newDate);
}
COM: <s> sets the date and parses it with the pattern yyyy mm dd </s>
|
funcom_train/20923668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseJSON(JSONObject value) {
try {
this.value = value.getString(DDPConstants.ATTR_VALUE);
JSONArray array = value.getJSONArray(DDPConstants.ATTR_VARIABLES);
int length = array.length();
variables = new IVariable[length];
for (int i = 0; i < length; i++) {
variables[i] = new ActorVariable(variable.getFrame(), array
.getJSONObject(i));
}
} catch (JSONException e) {
e.printStackTrace();
}
}
COM: <s> parses the json object and initializes this value from it </s>
|
funcom_train/16892276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Command getResizeCommand(ChangeBoundsRequest request) {
ChangeBoundsRequest req = new ChangeBoundsRequest(REQ_RESIZE_CHILDREN);
req.setEditParts(getHost());
req.setMoveDelta(request.getMoveDelta());
req.setSizeDelta(request.getSizeDelta());
req.setLocation(request.getLocation());
req.setResizeDirection(request.getResizeDirection());
return getHost().getParent().getCommand(req);
}
COM: <s> returns the command contribution for the given resize request </s>
|
funcom_train/26597525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadSchemaDescriptor(_ServerSession serverSession) throws DException {
if (schemaDescriptor == null) {
schemaDescriptor = new SchemaDescriptor();
}
if (schemaDescriptor.catalog_name == null) {
schemaDescriptor.catalog_name = table_catalog;
}
if (schemaDescriptor.schema_name == null) {
schemaDescriptor.schema_name = table_schema;
}
schemaDescriptor.load(serverSession);
}
COM: <s> load the schema information through schema descriptors load method </s>
|
funcom_train/9769358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test(expected=IllegalArgumentException.class) public void testConstructorArrayTooBig() {
Combo[] combos = new Combo[] {this.bamboo_seq, this.bamboo_seq2, this.circle_trp, this.character_trp, this.wind_trp};
new Scoreentry_TRIPLETS_ONLY_HAND(combos);
}
COM: <s> test the constructor for an array which got to much combos </s>
|
funcom_train/13686916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateFunctionLocations(String functionName, int flag) {
FunctionElement function = functions.get(functionName);
List<String> domain = function.getSignature().getDomain();
int countOfArguments = 0;
if (domain!=null) {
countOfArguments = domain.size();
}
generateFunctionLocations(functionName,1,countOfArguments,domain,"", flag);
}
COM: <s> generate function locations generates all the locations for the specified function </s>
|
funcom_train/43548808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileEntry create(int id) throws FileStoreException {
checkIsRunning();
if (exists(id)) {
throw new FileStoreException(
String.format("Could not create document; ID %d not unique", id));
}
FileEntry entry = new FileEntry(id);
entry.setOffset(0);
entry.setLength(0);
entries.put(id, entry);
return entry;
}
COM: <s> creates a new document </s>
|
funcom_train/51650373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point toControl (int x, int y) {
checkWidget ();
int /*long*/ window = eventWindow ();
int [] origin_x = new int [1], origin_y = new int [1];
OS.gdk_window_get_origin (window, origin_x, origin_y);
return new Point (x - origin_x [0], y - origin_y [0]);
}
COM: <s> returns a point which is the result of converting the </s>
|
funcom_train/50505809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
String key = nameField.getText();
String value = valueField.getText();
if(key!=null && key.trim().length()>0){
if(value==null)
value="";
}
if(!attributes.contains(key)){
attributes.setProperty(key,value);
}
}
COM: <s> save the form </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.