__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/40213236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int sys_ftruncate(int fdn, long length) {
if (fdn < 0 || fdn >= OPEN_MAX) return -EBADFD;
if (fds[fdn] == null) return -EBADFD;
Seekable seekable = fds[fdn].seekable();
if (length < 0 || seekable == null) return -EINVAL;
try { seekable.resize(length); } catch (IOException e) { return -EIO; }
return 0;
}
COM: <s> the ftruncate syscall </s>
|
funcom_train/39001767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printPacket() {
System.out.print('p');
System.out.print(':');
for (int i = 0; i < usedLength; i++) {
System.out.print(data[i]);
System.out.print(' ');
}
System.out.println();
}
COM: <s> ram friendly printing of packet </s>
|
funcom_train/48024414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isResistanceSupported(){
return (
!isArray && !isFinal && !isParameter &&
(isGlobal || getParamB("replaceLocal")) &&
type.matches(getParamS("replaceTypes")) &&
name.matches(getParamS("includeVariables")) &&
!name.matches(getParamS("excludeVariables"))
);
}
COM: <s> whether this variable is supported or not </s>
|
funcom_train/50586585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String copyTestPropertiesToPropteryLocation(String props) {
String path = ClassLoader.getSystemClassLoader().getResource(props).getPath();
File original = new File(path);
System.out.println("copyTestPropsToPropsLocCCCCCCCCCCCCCCCCCCc");
System.out.println(path);
System.out.println(originalPropertiesPath);
File f = new File(originalPropertiesPath);
try {
System.out.println(original.renameTo(f));
} catch (RuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return path;
}
COM: <s> installs the properties file described as relative path from classpath as the </s>
|
funcom_train/17498548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeActivity(ActivityImpl activity) {
if ( (activity!=null)
&& (activities!=null)
) {
boolean isRemoved = activities.remove(activity);
if (isRemoved) {
activity.setParentActivity(null);
if (activities.isEmpty()) {
activities = null;
}
activitiesMap = null;
}
return isRemoved;
}
return false;
}
COM: <s> removes the given activity from the nested activities </s>
|
funcom_train/14094311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (m_component == null) {
return "All Frames";
}
// mComponent is not null
if (m_component.getName() == null) {
return (m_component.getClass().getName() + " : "
+ m_component.hashCode());
}
return m_component.getName();
}
COM: <s> generate a description of the object </s>
|
funcom_train/44869457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMExpressionFunctionBean getFMirrorFunc() {
if (fMirrorFunc == null) {
fMirrorFunc = new WCMExpressionFunctionBean();
fMirrorFunc.setDefinition("(t>=a & t<=b?2*axis - f(t))");
fMirrorFunc.setVariable(getTVar());
fMirrorFunc.setParser(getParser());
}
return fMirrorFunc;
}
COM: <s> this method initializes f mirror func </s>
|
funcom_train/39530117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EditingSession getCurrentEditingSession() {
if (mainWindow.getCurrentSession() != null) {
for (int i = 0; i < this.editingSessions.size(); i++) {
if (((EditingSession) editingSessions.get(i)).getFrame() == mainWindow
.getCurrentSession()) {
return ((EditingSession) editingSessions.get(i));
}
}
}
return null;
}
COM: <s> returns the current selected editing session or null if none </s>
|
funcom_train/1541335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertAutopadding(boolean insert) {
horizontalGroup.insertAutopadding(HORIZONTAL, new ArrayList(1),
new ArrayList(1), new ArrayList(1), new ArrayList(1), insert);
verticalGroup.insertAutopadding(VERTICAL, new ArrayList(1),
new ArrayList(1), new ArrayList(1), new ArrayList(1), insert);
}
COM: <s> adjusts the autopadding springs for the horizontal and vertical </s>
|
funcom_train/9551459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getRbtRenewDomain() {
if (RbtRenewDomain == null) {
RbtRenewDomain = new JRadioButton("Renew Domain");
RbtRenewDomain.setBounds(new Rectangle(210, 55, 110, 21));
RbtRenewDomain.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateDmdUrl();
}
});
}
return RbtRenewDomain;
}
COM: <s> this method initializes rbt renew domain </s>
|
funcom_train/41981262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToServer() throws RemoteException, MalformedURLException, NotBoundException{
RemoteObjRef remoteServer = new RemoteObjRef(serverIp, serverPort, OBJ_SERVER);
Server server;
server = (Server)Naming.lookup(remoteServer.toString());
//mi aggiungo al server
server.checkStatus(port, name, color, flagLeader);
}
COM: <s> metodo che permette al peer di connettersi al server </s>
|
funcom_train/50532828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(String group, Address mbr) {
Vector mbrs;
if(group == null || mbr == null) {
Trace.error("GossipClient.register()", "group or mbr is null");
return;
}
mbrs=(Vector)groups.get(group);
if(mbrs == null) {
mbrs=new Vector();
mbrs.addElement(mbr);
groups.put(group, mbrs);
}
else {
if(!mbrs.contains(mbr))
mbrs.addElement(mbr);
}
_register(group, mbr); // update entry in GossipServer
if(!timer_running) {
timer.schedule(refresher_task, EXPIRY_TIME, EXPIRY_TIME);
timer_running=true;
}
}
COM: <s> adds the member to the given group </s>
|
funcom_train/40439051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onTransactionFailure(SQLError error) {
if (errMessage != null) {
// Use the SQLError details from the
// StatementCallback.onFailure callback:
callback.onFailure(new DataServiceException(errMessage, errCode, sql,
params));
} else {
// Use the SQLError details from the
// TransactionCallback.onFailure callback:
callback.onFailure(new DataServiceException(error));
}
}
COM: <s> invokes the data service </s>
|
funcom_train/48406783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProvidedQualificationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RoleDefinition_providedQualification_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RoleDefinition_providedQualification_feature", "_UI_RoleDefinition_type"),
SpemxtcompletePackage.eINSTANCE.getRoleDefinition_ProvidedQualification(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the provided qualification feature </s>
|
funcom_train/33973755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStringProperty( ApplicationProperty prop, CharSequence value ) {
if ( null == prop || !prop.isStringProperty() ) {
throw new IllegalArgumentException( "String property expected" );
}
if ( null == _attributesString ) {
_attributesString = new TreeMap<ApplicationProperty,CharSequence>();
}
_attributesString.put( prop, value );
}
COM: <s> sets a string property value </s>
|
funcom_train/22357974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUnit(Unit u) {
if (units == null) {
units = CollectionFactory.<EntityID, Unit> createSyncOrderedMap(3, .6f);
// enforce the creation of a new collection view:
unitCollection = null;
}
units.put(u.getID(), u);
}
COM: <s> adds a unit to this container </s>
|
funcom_train/43093926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getOperation(String name) {
LOG.info("Searching through obsolete features for " + name);
for (Iterator i = obsoleteFeatures.iterator(); i.hasNext();) {
Object feature = i.next();
LOG.info("Checking feature " + feature);
if (Model.getFacade().isAOperation(feature)
&& name.equals(Model.getFacade().getName(feature))) {
return feature;
}
}
return null;
}
COM: <s> get a operation from the current classifier not yet modeled </s>
|
funcom_train/30251390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUserOnline(UserData_Client sender, String username, String provider) {
// get the login and pwd for the user
CommAccountData_Client user = sender.getAccountByProvider(provider);
if (user != null) {
GoogleTalkCommunication comm = new GoogleTalkCommunication(user.login, user.password);
comm.Connect();
return comm.IsUserOnline(username);
}else {
return false;
}
}
COM: <s> check whether a given user is on line on a given provider </s>
|
funcom_train/43245749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPlanNumber() {
System.out.println("setPlanNumber");
String planNumber = "";
InsuranceBufferObject instance = new InsuranceBufferObject();
instance.setPlanNumber(planNumber);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set plan number method of class org </s>
|
funcom_train/1067278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeNewName(NamedElement element) {
// basic name: simply adds copy_of_ in front of the name of the duplicated element
String initialName = "copy_of_"+element.getName();
// the new name of the element
String name = initialName;
// if name already exists, try to find a new one
if(isNameReserved(element, name)) {
name = findNewNameWithSuffix(element, name);
}
element.setName(name);
}
COM: <s> computes new name for the newly created element </s>
|
funcom_train/19409571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getResource(final String filename) {
// Try to load resource from jar
URL url = ClassLoader.getSystemResource(filename);
// If not found in jar, then load from disk
if (url == null) {
try {
url = new URL("file", "localhost", filename);
} catch (Exception urlException) {
} // ignore
}
return url;
}
COM: <s> retrieve a url resource from the jar </s>
|
funcom_train/47925958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutCell(final Dimension cellSize, final BattlefieldCell cell) {
final Point cellCoords = cell.getCellCoordinates();
final Point pixelCoords = new Point(cellCoords.x * cellSize.width, cellCoords.y * cellSize.height);
final Rectangle cellDrawingSpace = new Rectangle(pixelCoords, cellSize);
cell.setBounds(cellDrawingSpace);
}
COM: <s> position and resize the given cell </s>
|
funcom_train/29410605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshPageSize() {
DiagramStyle pageStyle = (DiagramStyle) getDiagramView().getStyle(
NotationPackage.Literals.DIAGRAM_STYLE);
if(pageStyle != null && figure != null)
{
figure.getFormHelper().setMinimumSize(
pageStyle.getPageX(),
pageStyle.getPageY(),
pageStyle.getPageWidth(),
pageStyle.getPageHeight());
}
else{
figure.getFormHelper().setMinimumSize(0, 0, 500, 500);
}
}
COM: <s> loads the stored size of the page and sets it </s>
|
funcom_train/25442651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAddress(String address) {
checkRunning(false);
if (org.hsqldb.lib.StringUtil.isEmpty(address)) {
address = ServerConstants.SC_DEFAULT_ADDRESS;
}
printWithThread("setAddress(" + address + ")");
serverProperties.setProperty(ServerConstants.SC_KEY_ADDRESS, address);
}
COM: <s> sets the inet address with which this servers server socket will be </s>
|
funcom_train/28351896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findOldQ_ExtASCIIFile() {
if(qExtASCII_DataFile == null) {
String abs_path = preferences.get(qExtASCII_DataFileKey, null);
if(abs_path != null) {
qExtASCII_DataFile = new File(abs_path);
if(!qExtASCII_DataFile.exists()) {
qExtASCII_DataFile = null;
}
}
}
}
COM: <s> reads the q ext ascii file location from the java preferences </s>
|
funcom_train/18150094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParticipation(Participation participation) {
// create the association set if it doesn't exist already
if(_participation == null) _participation = new AssociationSetImpl<Participation>();
// add the association to the association set
getParticipation().add(participation);
// make the inverse link
participation.setRole(this);
}
COM: <s> adds an association participation </s>
|
funcom_train/27905599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int relProd(int u1, int u2, int c) {
if(c < 2) return and_rec(u1, u2);
varset(c);
// for the internal quant_rec call
quant_conj = false;
quant_id = CACHE_EXISTS; // for cache lookup in quant_rec()
quant_cube = c;
return relProd_rec(u1, u2);
/*
int tmp = ref( and(u1,u2));
int ret = exists(tmp, c);
deref(tmp);
return ret;
*/
}
COM: <s> this is the relational product of i clarke et al </s>
|
funcom_train/18786755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getViewLabel(ExplorerNode node) {
StringBuilder viewName = new StringBuilder();
viewName.append(getName());
String name = node.getName();
if (name != null) {
viewName.append(" ").append(node.getName());
}
return viewName.toString();
}
COM: <s> returns the name for the view </s>
|
funcom_train/3361019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (unparsed != null) {
return unparsed;
}
StringBuilder builder = new StringBuilder();
int size = rdns.size();
if ((size - 1) >= 0) {
builder.append((Rdn) rdns.get(size - 1));
}
for (int next = size - 2; next >= 0; next--) {
builder.append(',');
builder.append((Rdn) rdns.get(next));
}
unparsed = builder.toString();
return unparsed;
}
COM: <s> returns a string representation of this ldap name in a format </s>
|
funcom_train/26311814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(MapSettings newMapSettings, boolean updateSize) {
mapSettings = (MapSettings) newMapSettings.clone();
if (updateSize) {
refreshMapSize();
refreshMapButtons();
}
refreshBoardsSelected();
refreshBoardsAvailable();
butOkay.setEnabled(true);
}
COM: <s> updates to show the map settings that have presumably just been sent by </s>
|
funcom_train/48493639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node createNode(Document doc, File modelPath) {
Node root = doc.createElement("datalayerstyle");
for (DataLayerInfo info : layers) {
Node node = doc.createElement("info");
addAttr(doc, node, "style-name", info.dataLayerStyle.getName());
addAttr(doc, node, "color-weight", info.colorWeight);
addAttr(doc, node, "height-weight", info.heightWeight);
root.appendChild(node);
}
return root;
}
COM: <s> creates an xml description of the class </s>
|
funcom_train/49469468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RiskNode getRiskTree(RiskId riskId) throws Exception, RaciException{
Db db = dbRO();
try {
_logger.info("RiskRegister : getRiskTree "+riskId);
int peopleId = getCurrentUser();
DbPerso.checkUserCanAccessModelisationModule(db, peopleId);
return DbRisk.getRiskTree(db, riskId);
} catch (Exception e) { store(e); throw e; } finally { db.safeClose(); }
}
COM: <s> get a risk with its events and causes as a tree </s>
|
funcom_train/7732742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumRecords(){
int n = 0;
if( recordStoreExists() ){
// open the record store
open();
try{
n = recordStore.getNumRecords();
}catch(RecordStoreException rse){
rse.printStackTrace();
}
// close the record store
close();
}
return n;
}
COM: <s> get the number of records </s>
|
funcom_train/22430828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtHeadline() {
if (txtHeadline == null) {
txtHeadline = new JTextField();
txtHeadline.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
txtHeadline.setEditable(false);
txtHeadline.setEnabled(false);
txtHeadline.setBackground(java.awt.Color.white);
txtHeadline.setFont(new java.awt.Font("Default", java.awt.Font.BOLD, 12));
}
return txtHeadline;
}
COM: <s> this method initializes txt headline </s>
|
funcom_train/8578814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createOrUpdateNode(String path, String json) throws Exception {
// Dev Node: make a new CreateOrUpdateNode object each time since it
// caches the current time
CreateOrUpdateNode createNode = new CreateOrUpdateNode();
Node node = (Node) jcrTemplate.execute(new GetNodeAtPathJcrCallback(
path));
JSONObject jsonCreate = new JSONObject(json);
createNode.doUpdate(node, jsonCreate);
jcrTemplate.save();
}
COM: <s> helper method to create or update a jcr node </s>
|
funcom_train/18902750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setNextLiteralValues() throws TuplesException {
try {
literalValue = (Literal) session.globalize(
literalTuples.getColumnValue(columnIndex));
literalDoubleValue = Double.parseDouble(literalValue.getLexicalForm());
}
catch (StoreException se) {
throw new TuplesException("Failed to globalize literal", se);
}
}
COM: <s> sets literal value and literal double value to their respective value based </s>
|
funcom_train/31874942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
requestFocus(); // JDK1.1
Point p = constrainPoint(new Point(e.getX(), e.getY()));
this.fLastClick = new Point(e.getX(), e.getY());
tool().mouseDown(this, e, p.x, p.y);
checkDamage();
}
COM: <s> handles mouse down events </s>
|
funcom_train/24117793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SearchDialog getSearchDialog() {
if (searchDialog == null) {
searchDialog = new SearchDialog(getOwner());
try {
searchDialog.setClassName(className);
} catch (ClassNotFoundException ex) {
//Teoricament no s'ha de produïr error ja que es controlar en fer un setClassName//
ErrorDialog.saveError(Constants.FILE_ERRORS, ex);
}
}
return searchDialog;
}
COM: <s> gets the search dialog </s>
|
funcom_train/140520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BundleFilter getBundleFilter() {
BundleFilter bundleFilter = null;
if (isShowInstalledBundles && isShowUninstalledBundles) {
bundleFilter = BOTH_BUNDLE_FILTER;
}
else if (isShowInstalledBundles && !isShowUninstalledBundles) {
bundleFilter = INSTALLED_BUNDLE_FILTER;
}
else if (!isShowInstalledBundles && isShowUninstalledBundles) {
bundleFilter = UNINSTALLED_BUNDLE_FILTER;
}
else if (!isShowInstalledBundles && !isShowUninstalledBundles) {
bundleFilter = NEITHER_BUNDLE_FILTER;
}
return bundleFilter;
}
COM: <s> get the bundle filter for the given user settings </s>
|
funcom_train/9189778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCreateDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Proxy_createDate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Proxy_createDate_feature", "_UI_Proxy_type"),
ProxyPackage.Literals.PROXY__CREATE_DATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the create date feature </s>
|
funcom_train/7404304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureConfiguration() {
checkState( viewType != null, "No view provided in MVP configuration." );
checkState( presenterType != null, "No presenter provided in MVP configuration." );
checkState( presentationModeltype != null, "No presentation model provided in MVP configuration." );
checkState( modelType != null, "No modelType provided in MVP configuration." );
}
COM: <s> check for build </s>
|
funcom_train/3099367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendScheduleConsistencyRequestMsg (Scheduler peerScheduler) {
ScheduleConsistencyRequestMsg scheduleConsistencyRequestMsg =
new ScheduleConsistencyRequestMsg(thisScheduler,
controlledResources,
job.getCommandName(),
schedule);
scheduleConsistencyRequestMsg.setReplyToChannel((Puttable) schedulerChannel);
thisScheduler.sendMsgToRecipient(peerScheduler.getChannel(),
scheduleConsistencyRequestMsg);
}
COM: <s> sends a schedule consistency request to a peer scheduler </s>
|
funcom_train/29078785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(int index, boolean add) {
BitSet newSel = (BitSet) mSelection.clone();
if (!add) {
newSel.clear();
}
int last = newSel.length() - 1;
last = last < mSize ? last : -1;
if (last == -1) {
mAnchor = index < 0 || index >= mSize ? -1 : index;
}
if (index >= 0 && index < mSize) {
newSel.set(index);
}
applySelectionChange(newSel);
}
COM: <s> selects a specific index </s>
|
funcom_train/5723902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void injectReleaseDate(List<FileInfo> infos) {
if (file != null && file.getCreated() != null) {
LOGGER.debug("injecting release date "+file.getCreated());
for(FileInfo fileInfo : infos) {
fileInfo.setCreated(file.getCreated());
fileInfo.setModified(file.getModified());
}
}
}
COM: <s> injects the release date </s>
|
funcom_train/44994083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean increasePrintLevel(String printValue){
if(printValue != null){
//@print = "printonly"
if(Constants.ATTR_PRINT_VALUE_PRINT_ONLY.equals(printValue)){
printLevel ++ ;
return true;
//descendant elements
}else if(printLevel > 0){
printLevel ++ ;
return true;
}
//@print not set but is descendant tag of "printonly"
}else if(printLevel > 0){
printLevel ++ ;
return true;
}
return false;
}
COM: <s> increase print level </s>
|
funcom_train/3813715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Path getBestHypothesis(boolean wantFiller) {
WordResultPath path = new WordResultPath();
for (ConfusionSet cs : this) {
WordResult wr = cs.getBestHypothesis();
if (wantFiller || !wr.isFiller()) {
path.add(cs.getBestHypothesis());
}
}
return path;
}
COM: <s> get the best hypothesis path optionally discarding any filler words </s>
|
funcom_train/38536146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isAnyFalse(BoolExpr b, GenericBoolExpr gb) {
if (b!=null) return b.isFalse();
if (gb!=null) return gb.isAnyFalse();
if (currentConstVal!=null) return !currentConstVal.booleanValue();
return currentGenConstVal.isAnyFalse();
}
COM: <s> returns true if any expr is false </s>
|
funcom_train/40312428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsWritable_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.isWritable(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by isWritable method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests is writable with negative column index </s>
|
funcom_train/1773218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testForwardFillRow() {
List<Double> row = null;
resultManager.forwardFillRow(3, row);
assertNull(row);
row = new ArrayList<Double>();
resultManager.forwardFillRow(-1, row);
assertEquals(0, row.size());
resultManager.forwardFillRow(3, row);
assertEquals(3, row.size());
assertEquals(new Double(0), row.get(2));
}
COM: <s> tests adding a set number of values to the end of a row </s>
|
funcom_train/3117103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String patternInstancesToString() {
final StringBuffer sb = new StringBuffer();
for (Iterator i = getPatternInstances().iterator(); i.hasNext(); ) {
final PatternInstance pi = (PatternInstance)i.next();
sb.append(StringLib.spaces(DamaskUtils.INDENT_SPACES));
sb.append(pi.toLongString());
sb.append("\n");
}
return sb.toString();
}
COM: <s> returns a string representation of all the pattern instances in </s>
|
funcom_train/21616653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTable(){
try {
table = new JTable(new DefaultTableModel(getInfo(), GUIConstants.getOrderHistoryColumnNames())){
private static final long serialVersionUID = 1L;
//Make the table's cell uneditable.
public boolean isCellEditable(int row, int col){
return false;
}
};
table.setBounds(0, 0, 512, 334);
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> create the table </s>
|
funcom_train/22155765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedColor(java.awt.Color selectedColor) {
/* Get the old property value for fire property change event. */
java.awt.Color oldValue = fieldSelectedColor;
/* Set the selectedColor property (attribute) to the new value. */
fieldSelectedColor = selectedColor;
/* Fire (signal/notify) the selectedColor property change event. */
firePropertyChange("selectedColor", oldValue, selectedColor);
return;
}
COM: <s> sets the selected color property java </s>
|
funcom_train/15627237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeView(@NotNull final MapView<G, A, R> mapView) {
for (final MapViewsListener<G, A, R> listener : listeners.getListeners()) {
listener.mapViewClosing(mapView);
}
mapView.closeNotify();
mapViews.remove(mapView);
mapView.getMapControl().release();
}
COM: <s> closes a view of a </s>
|
funcom_train/21941626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field78 getField78() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("78");
if (t == null) {
log.fine("field 78 not found");
return null;
} else {
return new Field78(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 78 </s>
|
funcom_train/40433426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getNewOrderNotificationTimestamp() {
log.trace("Entering getNewOrderNotificationTimestamp");
long result = -1;
XMLGregorianCalendar xmlCalendar =
getNewOrderNotification().getTimestamp();
if (xmlCalendar != null) {
result = getTimeInMillis(xmlCalendar);
}
log.trace("Leaving getNewOrderNotificationTimestamp");
return result;
}
COM: <s> gets the new order notification timestamp </s>
|
funcom_train/32723581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustPool() {
Iterator iter = pool.values().iterator();
long now = System.currentTimeMillis();
while (iter.hasNext()) {
Object obj = iter.next();
if (obj instanceof Date) {
Date d = (Date) obj;
if (now - d.getTime() > maxDormantTime) {
iter.remove();
Iterator listenerIter = listeners.iterator();
while (listenerIter.hasNext()) {
ObjectPoolListener ol = (ObjectPoolListener) listenerIter.next();
ol.objectRemoved(obj);
}
}
}
}
}
COM: <s> adjusts the size of the pool based on non usage or dormant time </s>
|
funcom_train/23365352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidProperty(String str) {
if (str != null) {
str = str.trim();
boolean isLongEnough = str.length() >= 2;
if (isLongEnough) {
boolean autoGenerated = str.matches(".*\\.[a-z|A-Z]{3,}?.*");
return isLongEnough && !autoGenerated;
}
}
return false;
}
COM: <s> gets whether the specified property is likely to </s>
|
funcom_train/49601947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void readBiometricData(InputStream in, int length) throws IOException {
DataInputStream dataIn = new DataInputStream(in);
byte[] data = new byte[length];
dataIn.readFully(data);
if (templates == null) { templates = new ArrayList<byte[]>(); }
templates.add(data);
}
COM: <s> reads the biometric data block </s>
|
funcom_train/437937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeObsolete() {
Component[] items = getMenuComponents();
for (int i = 0; i < items.length; i++) {
// Breaks at separator
if (items[i] instanceof JSeparator) break;
// Removes item, if obsolete
JMenuItem item = (JMenuItem)items[i];
if (!new File(item.getText()).exists())
remove(item);
}
// Updates properties
updateProperties();
}
COM: <s> removes all obsolete file items from the reopen menu </s>
|
funcom_train/50768521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveSelector(PredicateSelector predSel,ArrayList from, ArrayList to){
if(!to.contains(predSel))
to.add(predSel);
if(from.contains(predSel))
from.remove(predSel);
Debug.out(Debug.MODE_DEBUG, "LOLA [INCRE]", "[Moved] "+predSel.getQuery());
}
COM: <s> helper method move selector between lists </s>
|
funcom_train/8221521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKeystore(int ks) {
_ks = ks;
_aliases.clear();
if (_ks > -1) {
for (int i = 0; i < _sslcm.getAliasCount(ks); i++)
_aliases.add(_sslcm.getAliasAt(ks, i));
}
fireTableDataChanged();
}
COM: <s> sets the keystore </s>
|
funcom_train/27787635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkDisabledStatus() {
boolean isEnabled = isEnabledCheckBox.isSelected();
sourceComboBox.setEnabled(isEnabled);
symbolListTextField.setEnabled(isEnabled);
suffixTextField.setEnabled(isEnabled);
openTimeTextField.setEnabled(isEnabled);
closeTimeTextField.setEnabled(isEnabled);
periodTextField.setEnabled(isEnabled);
}
COM: <s> enable disable the appropriate widgets depending on which widgets </s>
|
funcom_train/14401344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyValidationCanceledListener() {
if (mValidationCanceledListener != null && !mValidationCanceledListener.isEmpty()) {
Vector targets;
synchronized (mValidationCanceledListener) {
targets = (Vector) mValidationCanceledListener.clone();
}
Enumeration e = targets.elements();
while (e.hasMoreElements()) {
((IValidationCanceledListener) e.nextElement()).validationCanceled();
}
}
}
COM: <s> notifies all validation listeners </s>
|
funcom_train/1245679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeSocketFromPool( Map<String,Map<SockIO,Long>> pool, String host, SockIO socket ) {
if ( pool.containsKey( host ) ) {
Map<SockIO,Long> sockets = pool.get( host );
if ( sockets != null )
sockets.remove( socket );
}
}
COM: <s> removes a socket from specified pool for host </s>
|
funcom_train/16449594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionArgument(final ActionArgumentEvent ev) {
final InteractionEventInfo previous = addToEventHistory(ev, ENDS_SENTENCE, endsParaIfVeto(ev));
docNewSentenceIfPreviousDidNotEndSentence(previous);
doc("Enter argument %d as '%s'", ev.getPosition() + 1, proposedObjectTypeName(ev));
ifVetoedDocShouldBeRefusedWithReason(ev);
}
COM: <s> documents an argument being invoked validating the arguments </s>
|
funcom_train/19540491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Segment getText(GlyphView v, int p0, int p1) {
Segment text = new Segment();
try {
Document doc = v.getDocument();
doc.getText(p0, p1 - p0, text);
} catch (BadLocationException bl) {
throw new IllegalStateException("GlyphView: Stale view: " + bl);
}
return text;
}
COM: <s> fetch a reference to the text that occupies </s>
|
funcom_train/43395034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setErrorJobs(long numberofjobs){
for (int i=0;i<overviewedstatuses.size();++i){
if (overviewedstatuses.get(i).getStatuscode().equals( StatusConstants.ERROR))
overviewedstatuses.get(i).setNumberofinstances(Long.toString(numberofjobs));
}
}
COM: <s> sets the number of the error job instances </s>
|
funcom_train/40478168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addData(String name, Array<?, ?> dataToSet) {
if (fixed) {
throw new IllegalStateException(
"The buffer is already fixed and no new data can be added.");
}
unsetData = true;
BufferFragment fragment1 = new BufferFragment();
fragment1.setData(dataToSet, true);
BufferFragment fragment = fragment1;
fragments.add(fragment);
namedFragments.put(name, fragment);
}
COM: <s> adds a new managed array to the buffer </s>
|
funcom_train/8281115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTabHTML(int index) {
if (index >= getTabCount()) {
return null;
}
Widget widget = panel.getWidget(index + 1);
if (widget instanceof HTML) {
return ((HTML) widget).getHTML();
} else if (widget instanceof Label) {
return ((Label) widget).getText();
} else {
// This will be a ClickDecorator holding a user-supplied widget.
return DOM.getInnerHTML(widget.getElement());
}
}
COM: <s> gets the specified tabs html </s>
|
funcom_train/50025337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void popThisScreen(){
TransitionContext tc = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
tc.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT);
tc.setIntAttribute(TransitionContext.ATTR_KIND, TransitionContext.KIND_OUT);
UiApplication.getUiApplication().getUiEngineInstance().setTransition(this, null,UiEngineInstance.TRIGGER_POP, tc);
UiApplication.getUiApplication().popScreen(this);
}
COM: <s> pop current screen with transition animation </s>
|
funcom_train/21765005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void systemExit() {
int response = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?", "Confirm Exit", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == 0)
System.exit(0);
}
COM: <s> this method call system exit </s>
|
funcom_train/33931359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentLocale(Locale locale) {
currentLocale = locale;
localeCombo.setSelectedItem(currentLocale);
localeCombo.setLocale(currentLocale);
res = ResourceBundle.getBundle("RetireResources", currentLocale);
resStrings = ResourceBundle.getBundle("RetireStrings", currentLocale);
currencyFmt = NumberFormat.getCurrencyInstance(currentLocale);
numberFmt = NumberFormat.getNumberInstance(currentLocale);
percentFmt = NumberFormat.getPercentInstance(currentLocale);
updateDisplay();
updateInfo();
updateData();
updateGraph();
}
COM: <s> sets the current locale </s>
|
funcom_train/42224829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleGravity(){
if (coins >= 10){
removeCoins(10);
if (Constants.GRAVITY.getY() > 0){
Constants.GRAVITY = new net.phys2d.math.Vector2f(0,-15f);
this.getWorld().setGravity(Constants.GRAVITY.getX(), Constants.GRAVITY.getY());
}else{
Constants.GRAVITY = new net.phys2d.math.Vector2f(0,15f);
this.getWorld().setGravity(Constants.GRAVITY.getX(), Constants.GRAVITY.getY());
}
}
}
COM: <s> toggle the worlds gravity at the cost of one coin </s>
|
funcom_train/2711236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyDefinitions(List propertyDefinitions) {
if (propertyDefinitions == null) {
this.propertyDefinitions = null;
} else {
java.util.Map rollback = null;
if (this.propertyDefinitions != null) {
rollback = new HashMap(this.propertyDefinitions);
}
Iterator iterator = propertyDefinitions.iterator();
try {
while (iterator.hasNext()) {
addPropertyDefinition((PropertyDefinition) iterator.next());
}
} catch (ClassCastException cce) {
this.propertyDefinitions = rollback;
}
}
}
COM: <s> sets the property definitions </s>
|
funcom_train/48496057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStatistics() {
final Class<? extends Agent>[] types = statistics.keySet().toArray(ctmp);
if (types == null) return;
int k = types.length;
for (int j = 0; j < k; j++) {
String name = types[j].getSimpleName();
long time = statistics.get(types[j]);
logger.debug(name + ": " + time);
System.err.println(name + ": " + time);
}
}
COM: <s> prints statistic in the following form </s>
|
funcom_train/28750833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSamplegroupid(Long newVal) {
if ((newVal != null && this.samplegroupid != null && (newVal.compareTo(this.samplegroupid) == 0)) ||
(newVal == null && this.samplegroupid == null && samplegroupid_is_initialized)) {
return;
}
this.samplegroupid = newVal;
samplegroupid_is_modified = true;
samplegroupid_is_initialized = true;
}
COM: <s> setter method for samplegroupid </s>
|
funcom_train/13954487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTags(Object tags) {
NSArray<ERTag> erTags = tags();
NSArray<ERTag> matchingTags = ERXQ.filtered(erTags, ERTag.NAME.in(_entity.splitTagNames(tags)));
for (ERTag tag : matchingTags) {
removeTag(tag);
}
}
COM: <s> this method removes tags from the target object by parsing the tags parameter </s>
|
funcom_train/36756968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String escape(String s) {
int slen = s.length();
for (int index = 0; index < slen; index++) {
char c = s.charAt(index);
if ((c < replacementLength && replacements[c] != null)
|| c < safeMin || c > safeMax) {
return escapeSlow(s, index);
}
}
return s;
}
COM: <s> overridden for performance see </s>
|
funcom_train/49789384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateInferenceOutput(IdentifyState state) throws IOException {
// creates tab-delimited output of (rule, usage)
StringBuffer buf = new StringBuffer();
for (String rule : state.inferenceRules.keySet()) {
int count = state.inferenceRules.get(rule);
buf.append(rule).append("\t").append(count).append("\n");
}
// write to file
System.out.println("Writing to file...");
FileWriter fw = new FileWriter(new File("unused/inference-rules.txt"));
fw.write(buf.toString());
fw.close();
}
COM: <s> actually generates the usage statistics for the inference rules into </s>
|
funcom_train/9769233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRAW( int x, int y, int width, int height ) {
// System.out.println("updateRaw was called from: " + StackMethodExtractor.getCaller(1));
// Thread.dumpStack();
proxy.add( new RFBUpdateRequestRAW(x,y,width,height), getWidth(), getHeight() );
setChanged();
notifyObservers();
}
COM: <s> convenience method to simplify the calls in jim graphics </s>
|
funcom_train/41114708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpanded(SourceListCategory category, boolean expanded) {
DefaultMutableTreeNode categoryNode = getNodeForObject(category);
checkCategoryNodeNotNull(categoryNode);
TreeUtils.setExpandedOnEdt(fTree, new TreePath(categoryNode.getPath()), expanded);
}
COM: <s> sets the expanded state of the given </s>
|
funcom_train/20044806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _removePrintJobListener() {
requiredMethod("addPrintJobListener");
oObj.removePrintJobListener(listenerImpl);
util.utils.shortWait(5000);
listenerImpl.reset();
listenerImpl.fireEvent();
tRes.tested("removePrintJobListener()", !listenerImpl.actionTriggered());
}
COM: <s> remove the listener see if its still caleed </s>
|
funcom_train/3775956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setStatus(InstallerProxy ip, int status) {
status = (status != 0) ? 1 : 0;
String statusStr = new Integer(status).toString();
System.out.println(FP_ACTION_NAME + ": " + "Status set to " + statusStr);
// Set the status variable.
ip.setVariable(FP_STATUS_VAR_NAME, statusStr);
}
COM: <s> set the status install anywhere output variable </s>
|
funcom_train/2628529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetType() {
System.out.println("getType");
EventWrapper instance = new EventWrapper();
String expResult = "";
String result = instance.getType();
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 type method of class event wrapper </s>
|
funcom_train/50487048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveCompleteMetadata(CompleteMetadataBean cmb) throws SQLException {
Connection conn = dataSource.getConnection();
conn.setAutoCommit(false);
try {
saveCompleteMetadata(cmb, conn);
conn.commit();
} finally {
try {
conn.setAutoCommit(true);
conn.close();
} catch(SQLException ex2) {
//ignore
}
}
}
COM: <s> saves a complete metadata bean </s>
|
funcom_train/18726944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renameTab() {
final JaxoTab t = getSelectedTab();
final String oldName = isUntitled(t) ? "" : getName(t);
final String newName = JaxoDialogs.getNewTabName(tabbedPane, oldName);
if ((newName.length() != 0) && !(newName.equals(oldName))) {
setUntitled(t, false);
renameTab(t, newName);
}
}
COM: <s> brings up a dialog to rename the current tab </s>
|
funcom_train/5512225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawBottomGraph(Graphics2D g2d){
g2d.setColor(Color.white);
g2d.drawLine(xStartPosit, yMidPosit, xEndPosit, yMidPosit);
g2d.drawLine(xStartPosit, yStartPosit, xStartPosit, yEndPosit);
}
COM: <s> draws the bottom graph </s>
|
funcom_train/18058283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long tryArg(int k, long n) {
long value;
try {
value = processArg(theArgs[k], n);
} catch (ArrayIndexOutOfBoundsException e) {
if (optErr)
System.err.println("tryArg: no theArgs[" + k + "]");
return n;
}
return value;
}
COM: <s> try to process a long argument </s>
|
funcom_train/22630248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete_aid(byte[] aid) throws UserException{
int cardResp ;
byte[] apdu1P = ApplicationOnCard.deleteApplication(aid,(byte)00);
byte[] apduRespP ;
apduRespP = trySend(apdu1P);
cardResp = GP_responses.get_GP_response(apduRespP) ;
if (cardResp != GP_responses.SUCCESS){
throw new UserException("Delete:::" + GP_responses.getErrMsg(cardResp), cardResp) ;
}
}
COM: <s> send the gp command delete with the aid aid </s>
|
funcom_train/37611228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
m_container.start();
final ConsoleCommunication communication =
m_container.getComponent(ConsoleCommunication.class);
// Need to request components, or they won't be instantiated.
m_container.getComponent(WireMessageDispatch.class);
m_container.getComponent(WireFileDistribution.class);
m_container.getComponent(WireDistributedBarriers.class);
while (communication.processOneMessage()) {
// Process until communication is shut down.
}
}
COM: <s> console message event loop </s>
|
funcom_train/28875538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insert(int rowIndex, int columnIndex, int value) {
int size=Shared.tracks[actTune][rowIndex].getSize();
if (size<Track.DIMENSION && columnIndex<size-1) {
Shared.tracks[actTune][rowIndex].insertValueAt(columnIndex, value);
fireTableRowsUpdated(rowIndex, rowIndex);
return true;
}
return false;
}
COM: <s> insert one element if it is allowed </s>
|
funcom_train/12156835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWritingToPrintWriter() throws IOException {
// Test writing the print writer
testee.getWriter().print("12345");
testee.getWriter().flush();
// No data is expected to reach the underlying response,
// so no expectation set on the mock
// but the length should be correct
responseMock.expects.setContentLength(5);
testee.updateContentLength();
}
COM: <s> test data written to the print writer do not reach the response </s>
|
funcom_train/3990138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSkoraPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_skora_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_skora_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__SKORA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the skora feature </s>
|
funcom_train/51139785 | /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 simpleName, String qualName) throws SAXException {
Entry parentEntry;
try {
this.addText();
if (xmlStack.isEmpty()) return;
parentEntry = (Entry)xmlStack.pop();
classMapper.addChild(parentEntry.object, parentEntry.name, currentEntry.object, currentEntry.name);
} catch (ClassMapperException e) {
this.lastException = e;
throw new SAXException(e);
}
currentEntry = parentEntry;
}
COM: <s> called at the end of a xml element </s>
|
funcom_train/2546957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTargetDataConnections() {
ArrayList connList = new ArrayList();
for (int i = 0; i < targetConnections.size(); i++) {
if (targetConnections.get(i) instanceof DataConnectionModel) {
connList.add(targetConnections.get(i));
}
}
return connList;
}
COM: <s> gets a list of data connections for which this activity is the target </s>
|
funcom_train/22077696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test08RootNameError() {
Map input = new HashMap();
input.put("id", "ut061111");
input.put("nom", "NAQUIN");
input.put("prenom", "thiery");
Map lenv = new HashMap();
lenv.put("scope", "2");
npmock.reset();
npmock.expects(once()).method("parse").with(
eq("cn=ut061111,ou=Personnes,o=canam")).will(
throwException(new NamingException("Invalid name")));
try {
ami.delete(input, lenv);
fail("Should have thrown exception");
} catch (MapperException e) {
}
}
COM: <s> error catching with root name </s>
|
funcom_train/13306760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SiocPostBean getPost(PostedResource postedResource, String postUri) {
List<SiocPostBean> posts = postedResource.getRootPosts();
for (Iterator<SiocPostBean> iter = posts.iterator(); iter.hasNext();) {
SiocPostBean post = iter.next();
if (postUri.equals(post.getUri())) {
return post;
}
}
return null;
}
COM: <s> gets the posts subtree where the post uri is a root post </s>
|
funcom_train/14011814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void renderDisposeDirective(RenderContext rc, SplitPane splitPane) {
String elementId = ContainerInstance.getElementId(splitPane);
ServerMessage serverMessage = rc.getServerMessage();
Element initElement = serverMessage.appendPartDirective(ServerMessage.GROUP_ID_PREREMOVE,
"EchoSplitPane.MessageProcessor", "dispose");
initElement.setAttribute("eid", elementId);
}
COM: <s> renders a directive to the outgoing code server message code to </s>
|
funcom_train/50170814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
// Is there a valid user logged on?
boolean valid = false;
HttpSession session = pageContext.getSession();
User user
= (User) session.getAttribute(WebApplicationConstants.USER);
// Forward control based on the results
if (user != null) {
//we can get on with whatever action we're on
return (EVAL_PAGE);
}
else {
try {
pageContext.forward(page);
} catch (Exception err) {
throw new JspException(err.toString());
}
return (SKIP_PAGE);
}
}
COM: <s> perform our logged in user check by looking for the existence of </s>
|
funcom_train/34907976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNegovanyDusledekPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Pravidlo_negovanyDusledek_feature"),
getString("_UI_Pravidlo_negovanyDusledek_description"),
GebzPackage.Literals.PRAVIDLO__NEGOVANY_DUSLEDEK, true, false,
false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
getString("_UI_SpojePropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the negovany dusledek feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.