__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/14012811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String renderInline() {
StringBuffer out = new StringBuffer();
for (int i = 0; i < length; i += 2) {
out.append(data[i]);
out.append(":");
out.append(data[i + 1]);
out.append(";");
}
return out.toString();
}
COM: <s> renders the style inline </s>
|
funcom_train/51059358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fatalErrorOccured(String error, Exception e) {
fatalError = true;
if (minimumJreNotFound) {
errorMessage = minimumJREMessage;
errorMessage[errorMessage.length-1] = error;
}
else if (certificateRefused) {
errorMessage = certificateRefusedMessage;
}
else {
errorMessage = genericErrorMessage;
errorMessage[errorMessage.length-1] = error;
}
System.out.println(error);
if(e != null) {
System.out.println(e.getMessage());
System.out.println(generateStacktrace(e));
}
repaint();
}
COM: <s> sets the error message and print debug information </s>
|
funcom_train/12106920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand() {
if (itemCommand == null) {//GEN-END:|30-getter|0|30-preInit
// write pre-init user code here
itemCommand = new Command("OK", Command.ITEM, 0);//GEN-LINE:|30-getter|1|30-postInit
// write post-init user code here
}//GEN-BEGIN:|30-getter|2|
return itemCommand;
}
COM: <s> returns an initiliazed instance of item command component </s>
|
funcom_train/4522702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean headerLineHit(int x, int y) {
if (_orientation == Orientation.HORIZONTAL) {
return (_yAxisWidth > 0 && Math.abs(_hierarchyWidth + _yAxisWidth - x) < _selectionDelta);
} else {
return (_yAxisWidth > 0 && Math.abs(_hierarchyWidth + _yAxisWidth - y) < _selectionDelta);
}
}
COM: <s> check whether the header delimiting line is hit by the given location </s>
|
funcom_train/18323041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDebugBlockEndPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Statement_debugBlockEnd_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Statement_debugBlockEnd_feature", "_UI_Statement_type"),
MetalangPackage.Literals.STATEMENT__DEBUG_BLOCK_END,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the debug block end feature </s>
|
funcom_train/45918125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startStopAnimations(boolean state) {
if (state) {
achievementRenderer.startAnimations();
starmapRenderer.startAnimations();
informationRenderer.startAnimations();
planetRenderer.startTimers();
if (researchRenderer.isVisible()) {
researchRenderer.startAnimations();
}
if (productionRenderer.isVisible()) {
productionRenderer.startAnimations();
}
} else {
achievementRenderer.stopAnimations();
starmapRenderer.stopAnimations();
informationRenderer.stopAnimations();
planetRenderer.stopTimers();
researchRenderer.stopAnimations();
productionRenderer.stopAnimations();
}
}
COM: <s> start or stop animations when the options screen is displayed </s>
|
funcom_train/21942092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field19 getField19() {
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("19");
if (t == null) {
log.fine("field 19 not found");
return null;
} else {
return new Field19(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 19 </s>
|
funcom_train/47593173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertAdjacentAreas(final String areaName, final int expectedNeighbours) {
final AbstractBoard board = new USABoard(2);
board.setAreaAdjacencies();
final Area area = board.getArea(areaName);
assertEquals(expectedNeighbours, area.getAdjacentAreas().size());
}
COM: <s> checks that the named area has the given number of adjacent areas </s>
|
funcom_train/41849882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(CMV aCMV) {
if (aCMV instanceof SugCMV) {
SugCMV theSugCMV = (SugCMV) aCMV;
if (itsValue.equals(theSugCMV.itsValue))
if (itsWeight>=theSugCMV.itsWeight) return 1;
else return -1;
}
System.out.println("I tried to compare sugCMV that are not comparable");
return 0;
}
COM: <s> compare the weights </s>
|
funcom_train/48705052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(BstEntry context) {
if (stack.size() < 1) {
throw new VMException("Not enough operands on stack for operation int.to.chr$");
}
Object o1 = stack.pop();
if (!(o1 instanceof Integer)) {
throw new VMException("Can only perform operation int.to.chr$ on an Integer");
}
Integer i = (Integer) o1;
stack.push(String.valueOf((char) i.intValue()));
}
COM: <s> pops the top integer literal interpreted as the ascii integer </s>
|
funcom_train/46062565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void markAsDeployed(String courseExportPath, RepositoryEntry re) {
PropertyManager pm = PropertyManager.getInstance();
Property prop = pm.createPropertyInstance(null, null, null, "_o3_", "deployedCourses", null, re.getKey(), courseExportPath, null);
pm.saveProperty(prop);
deplyedCoursePaths.put(courseExportPath, re);
}
COM: <s> mark a course as deployed </s>
|
funcom_train/18826333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String mutualAuthenticationSRP(String piggyBackMSG, CallbackHandler handler) throws TransportException{
boolean fake=false;
if (profiles==null){
fake=true;
Document doc=XMLhelpers.getNewDocument();
profiles=doc.createElement("profiles");
Element p=doc.createElement("profile");
p.setAttribute("name",SRPProfile.URI);
p.setAttribute("class", SRPProfile.CLASS);
profiles.appendChild(p);
}
String s= transport.mutualAuthenticationSRP(profiles, userInfo, piggyBackMSG, handler);
if (fake){
profiles=null;
}
return s;
}
COM: <s> establishes a sacredconnection to a sacredserver with mutual authentication by srp </s>
|
funcom_train/4364259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilter(OutputFilter filter) {
OutputFilter[] newFilterLibrary =
new OutputFilter[filterLibrary.length + 1];
for (int i = 0; i < filterLibrary.length; i++) {
newFilterLibrary[i] = filterLibrary[i];
}
newFilterLibrary[filterLibrary.length] = filter;
filterLibrary = newFilterLibrary;
activeFilters = new OutputFilter[filterLibrary.length];
}
COM: <s> add an output filter to the filter library </s>
|
funcom_train/24242149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFreeChart generateChart(){
if(chartType)
chart = ChartFactory.createLineChart3D(title, "Year", "Primary Studies", dataset, PlotOrientation.VERTICAL, true, false, false);
else
chart = ChartFactory.createLineChart(title, "Year", "Primary Studies", dataset, PlotOrientation.VERTICAL, true, false, false);
return chart;
}
COM: <s> generate the chart based on the given information </s>
|
funcom_train/44770331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDepth() {
int depth = 0;
for (int i = 0; i < elements.length; i++) {
if (elements[i].denotesParent()) {
depth--;
} else if (!elements[i].denotesCurrent()) {
depth++;
}
}
return depth;
}
COM: <s> returns the depth of this path </s>
|
funcom_train/22526507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IRolePartModel findRolePartModel(IRoleModel role) {
for(ILDModelObject obj : fRolePartsModel.getChildren()) {
IRolePartModel rolePart = (IRolePartModel)obj;
if(role == rolePart.getRole() && fComponent == rolePart.getComponent()) {
return (IRolePartModel)rolePart;
}
}
return null;
}
COM: <s> find a role part in this folded role part given a role </s>
|
funcom_train/3719759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConformanceSegment instantiateClone() throws HL7Exception {
ConformanceSegment retVal = new ConformanceSegment((ConformanceStructureHolder) getParent(), myConfDefinition);
int index = 0;
for (ConformanceType<?> next : myPrototypes) {
ConformanceType<?> clone = next.instantiateClone();
index++;
retVal.addChild(clone, getNames()[index-1], getMinReps(index), getMaxCardinality(index), getLength(index));
}
return retVal;
}
COM: <s> create a clone of this segment for the same message </s>
|
funcom_train/8246211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String newUrl) {
Boolean found = false;
for (UrlItem item : this.urlItems) {
if (item.url.equalsIgnoreCase(newUrl)) {
found = true;
item.count++;
}
}
if (!found) {
UrlItem newItem = new UrlItem(newUrl);
this.urlItems.add(newItem);
}
}
COM: <s> either adds url to list or increments count if url is already present </s>
|
funcom_train/19258862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float colorCompGreen(float angle) {
// Convert angle to degrees.
angle *= 180/(float)Math.PI;
float value = 0;
if (angle <= 38)
value = 36.797F/255*(float)Math.exp(0.022089*angle);
else {
float angle2 = angle*angle;
value = -9.4564E-4F*angle*angle2 + 0.15061F*angle2 - 4.9834F*angle + 107.29F;
value /= 255;
}
if (value > 1) value = 1;
if (value < 0) value = 0;
return value;
}
COM: <s> returns the green component of a simple sky color model that transitions </s>
|
funcom_train/32979848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteLocalFile(String fileName)
{ /* deleteLocalFile */
try
{
File srcF= new File(fileName);
if(srcF.exists())
srcF.delete(); /* delete it first */
}
catch(Exception e)
{ return(false); }
return(true);
} /* deleteLocalFile */
COM: <s> delete local file delete local file </s>
|
funcom_train/46152787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processMessage(final WhiteboardCellMessage msg) {
// issue 1017: since message processing can be quite involved, do
// it off of the Darkstar message handling thread. The single
// threaded executor guarantees that messages will be processed
// in the order they are received.
msgExecutor.execute(new Runnable() {
public void run() {
processQueuedMessage(msg);
}
});
}
COM: <s> process the actions in a whiteboard message </s>
|
funcom_train/51644791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Iterator getReplacementScope() throws JavaModelException {
boolean declPredecessorReached= false;
Collection scope= new ArrayList();
for(Iterator bodyDeclarations = getBodyDeclarations(); bodyDeclarations.hasNext();) {
BodyDeclaration bodyDeclaration= (BodyDeclaration) bodyDeclarations.next();
if(bodyDeclaration == getNodeToInsertConstantDeclarationAfter())
declPredecessorReached= true;
if(insertFirst() || declPredecessorReached || !isStaticFieldOrStaticInitializer(bodyDeclaration))
scope.add(bodyDeclaration);
}
return scope.iterator();
}
COM: <s> elements returned by next are body declaration </s>
|
funcom_train/1621052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point computeSizeConstraints(int widthInChars, int heightInChars) {
GC gc= new GC(fContentComposite);
gc.setFont(JFaceResources.getDialogFont());
int width= gc.getFontMetrics().getAverageCharWidth();
int height= gc.getFontMetrics().getHeight();
gc.dispose();
return new Point(widthInChars * width, heightInChars * height);
}
COM: <s> computes the size constraints based on the </s>
|
funcom_train/16258736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDateEnabled() {
if (!isHorizontalAxis) {
return false;
}
for (ISeries series : chart.getSeriesSet().getSeries()) {
if (series.getXAxisId() != id) {
continue;
}
if (((Series) series).isDateSeries() && series.isVisible()) {
return true;
}
}
return false;
}
COM: <s> gets the state indicating if date is enabled </s>
|
funcom_train/50899086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderLine getLine(JDCConnection oConn, int iPgLine) throws SQLException {
OrderLine oRetVal = new OrderLine();
if (oRetVal.load(oConn, new Object[]{getStringNull(DB.gu_order,null),new Integer(iPgLine)}))
return oRetVal;
else
return null;
} // getLine()
COM: <s> get order line by number </s>
|
funcom_train/12796213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isProcessUp(String processName) throws NSClient4JException {
String result = submittRequest(password + "&6&ShowAll&" + processName);
String[] results = split(result, ":");
if(results[1].trim().equalsIgnoreCase("Running")) {
return true;
} else {
return false;
}
}
COM: <s> tests a process by process name </s>
|
funcom_train/17052066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean haveRoute(short destination, short source, short immediate) {
for (RoutingTableEntry routingTableEntry : entries) {
if (routingTableEntry.getSource() == source && routingTableEntry.getDestination() == destination && routingTableEntry.getImmediate() == immediate) {
return true;
}
}
return false;
}
COM: <s> evaluate if a route exists in this forwing table </s>
|
funcom_train/39371377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tapeEditDescrClick() {
String str = JOptionPane.showInputDialog(cp.mainFrame,
"Please enter a description for the tape!", Constants.APP_NAME,
JOptionPane.QUESTION_MESSAGE);
if (str == null)
return;
try {
cp.machTree.getCurrent().setTapeDescription(tape, str);
} catch (UnknownTapeException e) {
e.printStackTrace();
return;
} catch (InvalidNameException e) {
cp.showError("The specified tape name is invalid!");
return;
}
cp.tape_show(true);
}
COM: <s> the description of the currently selected tape is modified </s>
|
funcom_train/3478876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueAt(Object val, int row, int col) {
setValueAt(filteredData, val, row, col);
ConstantPoolInfo thisInfo = (ConstantPoolInfo)val;
setValueAt(data, val, constPool.getIndexOf(thisInfo)-1, col);
}
COM: <s> updates both data and filtered data arrays </s>
|
funcom_train/34665774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPenaltyNeg(double value) throws LinearProgrammingException {
if (dNegSummand == null) {
dNegSummand = new Summand(value, new Variable(ls));
ls.getObjFunctionSummands().add(dNegSummand);
updateLeftSide();
ls.updateObjFunction();
return;
}
if (value == dNegSummand.getCoeff())
return;
dNegSummand.setCoeff(value);
ls.updateObjFunction();
}
COM: <s> the penalty coefficient for positive deviations from the soft </s>
|
funcom_train/6236881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadData(SquirrelPreferences squirrelPreferences) {
List<IWikiTableConfiguration> configurations = wikiTableConfigFactory.getConfigurations();
for (IWikiTableConfiguration configuration : configurations) {
wikiConfigListModel.addElement(configuration);
}
wikiConfigList.setSelectedIndex(0);
IWikiTableConfiguration selectedValue = (IWikiTableConfiguration)wikiConfigList.getSelectedValue();
showDataFor(selectedValue);
if(selectedValue == null){
this.copyButton.setEnabled(false);
}
}
COM: <s> adds all available configurations to this page </s>
|
funcom_train/44849836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChange(ValueChangeEvent inEvent) {
Property lProperty = inEvent.getProperty();
if (questionView.checkSelectionSource(lProperty)) {
if (lProperty instanceof Table) {
Object lValue = ((Table) lProperty).getValue();
if (lValue instanceof QuestionWrapper) {
setQuestionID(((QuestionWrapper) lValue).getQuestionID());
sendEvent(QuestionShowTask.class);
}
}
}
}
COM: <s> handle click events on table of parent or child questions </s>
|
funcom_train/2624996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Timer getActivityTimer() {
if (activityTimer == null) {
activityTimer = root.createTimer(PUtil.ACTIVITY_SCHEDULER_FRAME_DELAY, new ActionListener() {
public void actionPerformed(final ActionEvent e) {
root.processInputs();
}
});
}
return activityTimer;
}
COM: <s> returns the activity timer </s>
|
funcom_train/32007058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(394, 281);
this.setContentPane(getJContentPane());
String hostname = "unknown";
try {
hostname = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException e) {
e.printStackTrace();
}
this.setTitle("ServerGUI [" + hostname + "]");
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
}
COM: <s> this method initializes this </s>
|
funcom_train/42954027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream _getInputStream() throws GPSException {
if (this.inputStream == null) {
try {
CommConnection comm = this._openConnection();
this.inputStream = comm.openDataInputStream();
}
catch (Throwable t) {
throw new GPSException("Exception", t);
}
}
return this.inputStream;
}
COM: <s> returns the input stream </s>
|
funcom_train/16519738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseRelativeConstraint(Element timingElt) {
int group = -1;
if (algo != null) {
String type = timingElt.getTagName();
if (type.equals("relativeconstraint")) {
String vertexpath = timingElt.getAttribute("vertexname");
try {
group = Integer.parseInt(timingElt.getAttribute("group"));
} catch (NumberFormatException e) {
group = -1;
}
scenario.getRelativeconstraintManager().addConstraint(vertexpath, group);
}
}
}
COM: <s> retrieves one timing </s>
|
funcom_train/2949356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newManifest(String className, String classPath) {
prop = new Properties();
prop.setProperty(MANIFEST_VERSION, manifestVersion);
prop.setProperty(CLASS_NAME, className);
prop.setProperty(CLASS_PATH, classPath);
prop.setProperty(HELP_PATH, "index.html"); //$NON-NLS-1$
prop.setProperty(INFO, "Class file " + className); //$NON-NLS-1$
prop.setProperty(CREATED_BY, getClass().getName());
}
COM: <s> creates a new manifest template with class name and path set and </s>
|
funcom_train/45049969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFinished(final TestResult result) {
final long time = result.getDuration();
final String testName = result.getTest().getName();
if (LOG.isLoggable(Level.INFO)) {
LOG.info("Test " + testName + " took " + time + " ms.");
}
}
COM: <s> called when a test finishes </s>
|
funcom_train/21446319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnalysisStatus waitForAnalysis(String idOrMD5, long timeoutMillis) throws EchoNestException {
long startTime = System.currentTimeMillis();
long elapsed = 0;
AnalysisStatus status = AnalysisStatus.UNKNOWN;
do {
status = getAnalysisStatus(idOrMD5);
elapsed = System.currentTimeMillis() - startTime;
} while (status == AnalysisStatus.PENDING && elapsed < timeoutMillis);
return status;
}
COM: <s> wait for an analysis to finish </s>
|
funcom_train/50639826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List validateTypeExistence(ModelMethod method, ModelParameter parameter, List results, ModelClassifier classifier) {
if ( classifier == null ) {
if ( noTypesAllowed == false ) {
return addResult(method, results, "No type specified for " + parameter.getName());
}
}
return results;
}
COM: <s> checks if the attribute has a type </s>
|
funcom_train/23164967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addSetter(String propName, Method method) {
try {
addPropertyDescriptor(
propName, new PropertyDescriptor(propName, null, method));
}
catch (IntrospectionException ex) {
throw new ModelFatalException(
msg.msg("ERR_CannotCreatePropertyDescriptor", //NOI18N
propName, method.getName()), ex);
}
}
COM: <s> adds a setter method to the methods list for the property with the </s>
|
funcom_train/7821490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillJobDomains() {
jobDomains.clear();
for (int i = 0; i < jobsCount; i++) {
jobDomains.add(new LinkedList<Integer>());
for (int j = 0; j < workersCount; j++) {
jobDomains.get(i).add(new Integer(j));
}
}
}
COM: <s> reset the jom domains structure to contain all workers for all jobs </s>
|
funcom_train/7787209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView ownerHandler(HttpServletRequest request, HttpServletResponse response) {
int ownerId = ServletRequestUtils.getIntParameter(request, "ownerId", 0);
Owner owner = this.clinic.loadOwner(ownerId);
if (owner == null) {
return new ModelAndView("redirect:findOwners.htm");
}
return new ModelAndView().addObject(owner);
}
COM: <s> custom handler for owner display </s>
|
funcom_train/4363025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void addConstructor(ConstructorInfo constructor) {
//
// synchronized (constructors) {
// ConstructorInfo results[] =
// new ConstructorInfo[constructors.length + 1];
// System.arraycopy(constructors, 0, results, 0, constructors.length);
// results[constructors.length] = constructor;
// constructors = results;
// this.info = null;
// }
//
// }
COM: <s> add a new constructor to the set of constructors for this mbean </s>
|
funcom_train/50505308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCmpVersion(int version) {
switch (version) {
case CMP_VERSION_1_x:
case CMP_VERSION_2_x:
case CMP_VERSION_UNKNOWN:
this.cmpVersion = version;
break;
default:
throw new IllegalArgumentException("Could not set CMP version (was invalid): " + version);
}
}
COM: <s> sets the cmp version attribute of the aentity bean object </s>
|
funcom_train/31626946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incrementCounters() {
for (int i = (counters.length - 1); i >= 0; i--) {
counters[i]++;
if (counters[i] >= data[i].length) {
if (i == 0) {
throw new ArrayIndexOutOfBoundsException("Register Wraparound");
}
counters[i] = 0;
} else {
break;
}
}
}
COM: <s> increments the counters by performing a rollover addition </s>
|
funcom_train/22222541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void translate(Point2D _delta) {
if (this.isNull())
return;
this.minX += _delta.getX();
this.maxX += _delta.getX();
this.minY += _delta.getY();
this.maxY += _delta.getY();
}
COM: <s> translates this rectangle double by given amounts in the x and y direction </s>
|
funcom_train/2023588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean afterCreate() {
String[] filenames;
int i;
// load files
if (cl.hasValue("filename")) {
filenames = Strings.fromCommalist(cl.getValue("filename"));
for (i = 0; i < filenames.length; i++)
loadFile(filenames[i]);
}
return true;
}
COM: <s> loads the ant file </s>
|
funcom_train/3602094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (object instanceof GenericFile) {
GenericFile otherFile = (GenericFile) object;
if (!isCaseSensitive()) {
return getPath().equals(otherFile.getPath());
} else {
return getPath().equalsIgnoreCase(otherFile.getPath());
}
} else {
return super.equals(object);
}
}
COM: <s> default implementation for generic file equality </s>
|
funcom_train/20887074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TextField getTextFieldrmiAddress() {
if (TextFieldrmiAddress == null) {
TextFieldrmiAddress = new TextField();
TextFieldrmiAddress.setBounds(new java.awt.Rectangle(100, 50, 320, 20));
try {
InetAddress address = InetAddress.getLocalHost();
TextFieldrmiAddress.setText("rmi://"+address.getHostAddress()+":1099/Lobby");
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
TextFieldrmiAddress.setEnabled(false);
}
return TextFieldrmiAddress;
}
COM: <s> this method initializes text field rmi address </s>
|
funcom_train/18835652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object sendSyncMessage(Message msg) throws TimeoutException, SuspectedException, Exception {
Object o = md.sendMessage(msg,
GroupRequest.GET_ALL,
60000);
if(o instanceof Exception){
log.error("Exception of type " + o.getClass().getName() + ": " + o.toString(), (Exception)o);
throw (Exception)o;
}
return o;
}
COM: <s> sends a new message to the channel and gets a return value </s>
|
funcom_train/16452743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel5() {
if (jPanel5 == null) {
GridLayout gridLayout2 = new GridLayout();
gridLayout2.setRows(1);
gridLayout2.setHgap(0);
gridLayout2.setVgap(0);
gridLayout2.setColumns(3);
jPanel5 = new JPanel();
jPanel5.setLayout(gridLayout2);
jPanel5.add(getJButton3(), null);
jPanel5.add(getJButton4(), null);
}
return jPanel5;
}
COM: <s> gets the j panel5 </s>
|
funcom_train/6203188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startDocument() {
// initialise variables needed for parsing of the TMX file
headerParsed = false;
inHeader = false;
inTU = false;
inTUV = false;
inSegment = false;
tuvs = new ArrayList<TUV>();
currentElement = new Stack<String>();
currentSub = new Stack<StringBuffer>();
currentElement.push(TMX_TAG_NONE);
}
COM: <s> receives notification of the start of the xml document </s>
|
funcom_train/43123282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(String.format("1st exam code: %s, ", examCode1));
stringBuilder.append(String.format("2nd exam code: %s, ", examCode2));
stringBuilder.append(String.format("Correlation estimation: %s", correlation));
return stringBuilder.toString();
}
COM: <s> returns the values of this objects variables in a single </s>
|
funcom_train/19543581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isCaseInsensitiveMap(String mapName) throws XPathExpressionException {
Element map = (Element)propertyExpressionMap.get(mapName).evaluate(document, XPathConstants.NODE);
if (map == null) return false;
if (CaseInsensitiveHashMap.class.getName().equals(map.getAttribute("class"))) return true;
return false;
}
COM: <s> tests to see if an existing map is a case insensitive hash map </s>
|
funcom_train/9374826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setNumAllowedChannels() {
try {
return setNumAllowedChannels(
Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.WIFI_NUM_ALLOWED_CHANNELS));
} catch (Settings.SettingNotFoundException e) {
if (mNumAllowedChannels != 0) {
WifiNative.setNumAllowedChannelsCommand(mNumAllowedChannels);
}
// otherwise, use the driver default
}
return true;
}
COM: <s> set the number of allowed radio frequency channels from the system </s>
|
funcom_train/25342269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUnused() {
return this.playlistIds.size() == 0 && (this.added == null || this.added.size() == 0)
&& (this.removed == null || this.removed.size() == 0) && this.ownTitle == false;
}
COM: <s> checks if this title is currently unused </s>
|
funcom_train/3290631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
Roots=getRoots();
// org.mmbase start();
sessions=(sessionsInterface)getModule("SESSION");
scancache=(scancacheInterface)getModule("SCANCACHE");
counter=(CounterInterface)getModule("COUNTER");
mmbase=(MMBase)getModule("MMBASEROOT");
transactionhandler=(TransactionHandlerInterface)getModule("TRANSACTIONHANDLER");
// org.mmbase stats=(StatisticsInterface)getModule("STATS");
rnd=new RandomPlus();
crcseed=rnd.nextInt();
}
COM: <s> init the servscan this is needed because it was created using </s>
|
funcom_train/51341206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BTree getIndex(final String name) {
final ReadLock lock = _fieldReadWriteLock.readLock();
lock.lock();
try {
assertOpen();
if (name == null)
throw new IllegalArgumentException();
if (Thread.interrupted()) {
throw new RuntimeException(new InterruptedException());
}
// Note: NullPointerException can be thrown here if asynchronously
// closed (should be fixed by the ReadLock).
synchronized (_name2Addr) {
return _name2Addr.getIndex(name);
}
} finally {
lock.unlock();
}
}
COM: <s> return the mutable view of the named index aka the live or </s>
|
funcom_train/12196840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getProperties() {
return properties;
/*
Hashtable propertiesCopy = new Hashtable();
Enumeration e = properties.keys();
while (e.hasMoreElements()) {
Object name = e.nextElement();
Object value = properties.get(name);
propertiesCopy.put(name, value);
}
// There is a better way to save the context. This shouldn't
// delegate to next, it's for backward compatibility only.
return propertiesCopy;
*/
}
COM: <s> returns a copy of the properties table </s>
|
funcom_train/22783709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initChooser() {
File currentDirectory = null;
if (chooser != null) {
currentDirectory = chooser.getCurrentDirectory();
}
chooser = new JFileChooser();
ImportDialogFileFilter filter = new ImportDialogFileFilter();
chooser.setFileFilter(filter);
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.setMultiSelectionEnabled(true);
chooser.setDialogTitle("Select path to import");
chooser.setCurrentDirectory(currentDirectory);
}
COM: <s> re init file chooser </s>
|
funcom_train/22092588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void render(ServiceItem item) {
if (item instanceof Text) {
renderText((Text) item);
} else if (item instanceof ParaBreak) {
renderParaBreak();
} else if (item instanceof SlideBreak) {
renderSlideBreak((SlideBreak) item);
} else if (item instanceof TabItem) {
renderTab();
}
}
COM: <s> render an individual service item </s>
|
funcom_train/42382943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processingCleanup() {
this.httpRecorder = null;
this.fetchStatus = S_UNATTEMPTED;
this.setPrerequisite(false);
this.contentSize = UNCALCULATED;
this.contentLength = UNCALCULATED;
// Clear 'links extracted' flag.
this.linkExtractorFinished = false;
// Clean the data map of all but registered permanent members.
this.data = getPersistentDataMap();
}
COM: <s> clean up after a run through the processing chain </s>
|
funcom_train/8484567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isLocallyTaggedAs(ATTypeTag tag) throws InterpreterException {
for (int i = 0; i < typeTags_.length; i++) {
if (typeTags_[i].base_isSubtypeOf(tag).asNativeBoolean().javaValue) {
// if one type matches, return true
return true;
}
}
return false;
}
COM: <s> performs a type test for this object locally </s>
|
funcom_train/25346364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createStatusCompact(ActivityExecStatus status, Dimension dimension) {
Position iconPos = new Position();
iconPos.setX(dimension.getWidth() - STATUS_IMAGE().getWidthWithMargin());
iconPos.setY(dimension.getHeight() / 2 - STATUS_IMAGE().getHeight() / 2);
append(new StatusImage(status, iconPos));
}
COM: <s> creates the status view compact </s>
|
funcom_train/33265453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void hideList() {
OverlayPanelGadget overlays = getOverlayPanel();
if ( list.isVisible() && list.getParent() == overlays ) {
if ( overlays != null ) {
if ( list.isDescendentOf(overlays) ) {
overlays.remove(list);
}
}
text.requestFocus();
}
GadgetShell shell = getShell();
if (shell != null) {
shell.flushGraphics();
}
}
COM: <s> hides the list </s>
|
funcom_train/30216222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStatement() {
StringBuffer sb = new StringBuffer(request.length() +
where.length() + 8);
sb.append(request);
if (where.length() > 0) {
sb.append(" WHERE ");
sb.append(where.toString());
}
return sb.toString();
}
COM: <s> the query request </s>
|
funcom_train/3377257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void decodeBufferSuffix(PushbackInputStream inStream, OutputStream outStream) throws IOException {
int c;
c = inStream.read(decoderBuffer);
if ((decoderBuffer[0] != 'e') || (decoderBuffer[1] != 'n') ||
(decoderBuffer[2] != 'd')) {
throw new CEFormatException("UUDecoder: Missing 'end' line.");
}
}
COM: <s> uuencoded files have a buffer suffix which consists of the word </s>
|
funcom_train/38474613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToQueues(ActivationQueue current, ActorActivation actor) {
if (actor.interestingType.isAssignableFrom(current.type)) {
current.addActor(actor);
}
Iterator i = current.subtypes.iterator();
while (i.hasNext()) {
ActivationQueue element = (ActivationQueue) i.next();
addToQueues(element, actor);
}
}
COM: <s> method add to queues </s>
|
funcom_train/33789760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getProcessButton() {
if (processButton == null) {
processButton = new JButton();
processButton.setBounds(new Rectangle(175, 270, 155, 50));
processButton.setText("Portate menu");
processButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
AccedereUnMenu.create(null, null, null, null).accediPortate();
}
});
}
return processButton;
}
COM: <s> this method initializes process button </s>
|
funcom_train/48529456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScheduledMessage scheduleMsgAtFixedRate(Message msg, long delay, long period) {
ScheduledMessage sm = new ScheduledMessage(this, msg);
getEnvironment().getSelectorManager().getTimer().scheduleAtFixedRate(sm, delay, period);
return sm;
}
COM: <s> schedule the specified message for repeated fixed rate delivery to the </s>
|
funcom_train/42399325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void implementCreateGwtRpcProxy(final NewConcreteType newType, final Type serviceInterface) {
final Method method = newType.getMostDerivedMethod(Constants.CREATE_GWT_RPC_PROXY_METHOD, Collections.<Type>emptyList());
final NewMethod newMethod = method.copy(newType);
newMethod.setAbstract(false);
newMethod.setFinal(true);
final GwtCreateTemplatedFile template = new GwtCreateTemplatedFile();
template.setType(serviceInterface);
newMethod.setBody(template);
}
COM: <s> implements the outstanding create deserializer method to return a </s>
|
funcom_train/39396406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFileName() throws MessagingException {
String filename = null;
String header = getHeader(CONTENT_DISPOSITION_NAME,null);
if (header != null) {
ContentDisposition cd = new ContentDisposition(header);
filename = cd.getParameter("filename");
}
if (filename == null) {
header = getHeader(CONTENT_TYPE_NAME,null);
if (header != null) {
try {
ContentType contentType = new ContentType(header);
filename = contentType.getParameter("name");
} catch (ParseException e) {
}
}
}
return filename;
}
COM: <s> returns the filename associated with this body part </s>
|
funcom_train/19426014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer retValue = new StringBuffer();
Node currNode = minNode;
retValue.append("size = " + size + "\n");
if (currNode == null) {
retValue.append("empty");
} else {
do {
retValue.append(currNode + "\n");
currNode = currNode.rightNeighbor;
} while (currNode != minNode);
}
return retValue.toString();
}
COM: <s> outputs the heap for debugging </s>
|
funcom_train/4206823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveLayout() {
LayoutSettings settings = LayoutSettingsManager.getLayoutSettings();
settings.setChatFrameHeight(getHeight());
settings.setChatFrameWidth(getWidth());
settings.setChatFrameX(getX());
settings.setChatFrameY(getY());
LayoutSettingsManager.saveLayoutSettings();
}
COM: <s> saves the layout on closing of the chat frame </s>
|
funcom_train/26525157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getColumnValues(int column) {
Collection answer = new Vector();
int rows = getRowCount();
if((column >= 0) && (column < getColumnCount())) {
for(int row=0; row < rows; row++) {
answer.add(getValueAt(row,column));
}
}
return answer;
}
COM: <s> returns a collection including all rows values for a specified column </s>
|
funcom_train/2293872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List updateContextDates(CmsDbContext dbc, List resourceList) {
CmsFlexRequestContextInfo info = dbc.getFlexRequestContextInfo();
if (info != null) {
for (int i = 0; i < resourceList.size(); i++) {
CmsResource resource = (CmsResource)resourceList.get(i);
info.updateFromResource(resource);
}
}
return resourceList;
}
COM: <s> updates the current users context dates with each </s>
|
funcom_train/22033685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (isMissing()) return "missing";
String s = "(" + tupleComponents[0];
for (int i=1; i<tupleComponents.length; i++) {
s = s + ", " + tupleComponents[i];
}
return s + ")";
}
COM: <s> provide a string representation of this real tuple </s>
|
funcom_train/38288201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PageLocator getActivePage() {
IWizard wizard = getActiveWizard();
// the list of pages must not be empty - if it is then there's a bug
// because the wizard should have been disposed... see
// deletePagesAfter() for details
return new PageLocator(wizard, wizards.size() - 1, pages.get(wizard)
.size() - 1);
}
COM: <s> returns active last page </s>
|
funcom_train/51342903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean rangeCheck(final int aoff, final int alen) {
if (aoff < 0)
throw new IndexOutOfBoundsException();
if (alen < 0)
throw new IndexOutOfBoundsException();
if ((aoff + alen) > len) {
/*
* The operation run length at that offset would extend beyond the
* end of the slice.
*/
throw new IndexOutOfBoundsException();
}
return true;
}
COM: <s> verify that an operation starting at the specified offset into the slice </s>
|
funcom_train/28215585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImplicitTransitionsFromPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImplicitEvent_implicitTransitionsFrom_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImplicitEvent_implicitTransitionsFrom_feature", "_UI_ImplicitEvent_type"),
StateMachinePackage.Literals.IMPLICIT_EVENT__IMPLICIT_TRANSITIONS_FROM,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the implicit transitions from feature </s>
|
funcom_train/22871971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performBoot() {
// configure the classloader from the properties-file.
ObjectUtilities.setClassLoaderSource
(getConfiguration().getConfigProperty("org.jfree.ClassLoader"));
getPackageManager().addModule(DefaultLogModule.class.getName());
getPackageManager().load("org.jfree.base.");
getPackageManager().initializeModules();
}
COM: <s> performs the boot process </s>
|
funcom_train/13531521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void expandKinTypes(){
ListVector lv1 = new ListVector();
ListVector lv = kinTypes;
for (lv.reset();lv.isNext();){
ListVector tmp = new ListVector();
StringVector sv = (StringVector)lv.getNext();
sv.reset();
StringVector sv1 = new StringVector();
tmp.addElement(sv1);
expandParentChildKinTypes(tmp,sv1,sv);
for (tmp.reset();tmp.isNext();){
lv1.addElement(tmp.getNext());
}
}
kinTypes = lv1;
}
COM: <s> replace fc mc by fs fd ms ms </s>
|
funcom_train/33848441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAnnotationDescription(String key) {
try {
return annotationDescriptionBundle.getString(key);
} catch (MissingResourceException mre) {
if (DEBUG)
return "TRANSLATE(" + key + ") (param={0}}";
else
try {
return englishAnnotationDescriptionBundle.getString(key);
} catch (MissingResourceException mre2) {
return key + " {0}";
}
}
COM: <s> get an annotation description string </s>
|
funcom_train/32711643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetCamera() {
Vector3f pos = this.terrain_block.getCell(World.WIDTH / 2,
World.HEIGHT / 2).getLocalTranslation();
this.camara.setLocation(new Vector3f(pos.x, pos.y, 210.5f));
this.camara.lookAt(pos, Vector3f.UNIT_Y);
this.camara
.setLocation(new Vector3f(pos.x + 27, pos.y + 1, 211.45628f));
this.camara.update();
}
COM: <s> resets the cameras position and orientation </s>
|
funcom_train/33968160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addToDraft(String text, String category) {
if (!mUser.containsDraftStory(text, category)) {
FMDStoryDetails story = new FMDStoryDetails();
story.setAuthor(mUser.getUsername());
story.setCategory(category);
story.setText(text);
if (mUser.addDraftStory(story)) {
mUserDataController.insertStory(mUser.getLocalId(), story,
cSTORY_DRAFT);
}
}
}
COM: <s> add a story to the user drafts from the submit story dialog </s>
|
funcom_train/135634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showTiers(List<TierLabelGlyph> tier_labels, boolean full_repack, boolean fit_y) {
for (TierLabelGlyph g : tier_labels) {
if (g.getInfo() instanceof TierGlyph) {
TierGlyph tier = (TierGlyph) g.getInfo();
tier.getAnnotStyle().setShow(true);
}
}
repackTheTiers(full_repack, fit_y);
}
COM: <s> restores multiple hidden tiers and then repacks </s>
|
funcom_train/40749922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreSelectedWidgetsStyle() {
for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
Widget widget = (Widget) iterator.next();
SavedWidgetInfo info = (SavedWidgetInfo) savedWidgetInfoMap.get(widget);
DOM.setStyleAttribute(widget.getElement(), "margin", info.initialDraggableMargin);
}
}
COM: <s> restore the selected widgets with their original style </s>
|
funcom_train/35848611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp2() {
String language = "testLanguage";
String script = "testScript";
aUninterpretedAction = Model.getCommonBehaviorFactory()
.buildUninterpretedAction(aActionState);
Object actionExpression = Model.getDataTypesFactory()
.createActionExpression(language, script);
Model.getCommonBehaviorHelper().setScript(aUninterpretedAction,
actionExpression);
}
COM: <s> an extra setup method </s>
|
funcom_train/13864171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
new MuClipseDirectories(),
new MuClipseTests(),
new JavaClasspathTab(),
new JavaJRETab(),
new SourceLookupTab(),
new EnvironmentTab(),
new CommonTab()
};
setTabs(tabs);
}
COM: <s> this method is called from the eclipse api it </s>
|
funcom_train/8229351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void interactWith(int objID, String action) {
log("Doing: " + action + " to " + Integer.toString(objID));
atObject(getNearestObjectByID(objID), action);
wait(random(250, 400));
atObject(getNearestObjectByID(objID), action);
wait(random(2000, 3000));
}
COM: <s> generic method to perform an action on an object </s>
|
funcom_train/4299607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSameTable() throws SQLException {
String sql =
"select name from trees where id in (select id from trees where fruit_id = 3) order by name";
String[] expected = new String[] {
"large red delicious tree", "small red delicious tree"
};
compareResults(sql, expected, jdbcConnection);
}
COM: <s> inner select involving same table </s>
|
funcom_train/2879267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sfDeploy() throws SmartFrogException, RemoteException {
super.sfDeploy();
// get the file name attribute
fileName = sfResolve("filename", fileName, true);
// open one file writer for the file
try {
fileWriter
= new PrintWriter(new BufferedWriter(new FileWriter(fileName)));
}catch (IOException ioex){
throw new SmartFrogDeploymentException(ioex);
}
}
COM: <s> sf deploy default implementation </s>
|
funcom_train/50880469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection requestUpdateConnection() throws SQLException{
if (myUpdateConnection == null){
// get an instance of the JDBCConnection Pool
JDBCConnectionPool tempPool = JDBCConnectionPool.getInstance();
myUpdateConnection = tempPool.requestUpdateConnection(getJDBCURL(), getDatabaseUsername(), getDatabasePassword());
myUpdateConnection.setAutoCommit(false);
}
return myUpdateConnection;
}
COM: <s> get a connection that can be used for updates </s>
|
funcom_train/40322553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpBall() {
try {
mainWindow
.getField()
.addElement(
GameField.BALL_ELEMENT,
new Ball(
GameProperties
.getDoubleValue("field.width") * 100d / 2d,
GameProperties
.getDoubleValue("field.height") * 100d / 2d,
GameProperties.getDoubleValue("ball.mass"),
GameProperties
.getDoubleValue("ball.radius") * 100d));
} catch (Exception e) {
logger.error("ERROR: ", e);;
}
}
COM: <s> put the ball back into its initial position </s>
|
funcom_train/37449780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAutoSave(boolean shouldSave) {
if(!shouldSave) {
getDefaultDbDescriptor().setUseAutoCommit(
JdbcConnectionDescriptor.AUTO_COMMIT_SET_FALSE);
}
else {
//set to OJB default
getDefaultDbDescriptor().setUseAutoCommit(
JdbcConnectionDescriptor.AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE);
}
}
COM: <s> sets the auto commit value </s>
|
funcom_train/5510635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addEdit(UndoableEdit anEdit) {
if (anEdit instanceof DocumentEvent.ElementChange) {
DocumentEvent.ElementChange ec = (DocumentEvent.ElementChange) anEdit;
changeLookup.put(ec.getElement(), ec);
} else {
c.equals("Tried to add edit not instance of ElementChange. Ignoring.");
}
return super.addEdit(anEdit);
}
COM: <s> adds a document edit </s>
|
funcom_train/38854048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean means(Payload other) {
boolean e = false;
if (payload == null || other == null) {
e = false;
} else {
// Comparison between payloads: if you wish to customize its behaviour
// you can define your custom Payload class and override its equals method...
e = payload.equals(other);
}
return e;
}
COM: <s> compares payload contained in this message with another payload </s>
|
funcom_train/44155620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleExcludedBeanNames(Map beans, String beanName) {
if (m_excludeBeanNamesArray != null) {
for (int j = 0; j < m_excludeBeanNamesArray.length; j++) {
if (isMatch(beanName, m_excludeBeanNamesArray[j])) {
beans.remove(beanName);
}
}
}
}
COM: <s> method to exclude beans with a given name </s>
|
funcom_train/21462378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addResponseHeaders(HttpServletResponse res, Map<String, String> headers) {
// add in any extra headers last
if (headers != null && ! headers.isEmpty()) {
for (Entry<String, String> entry : headers.entrySet()) {
res.addHeader(entry.getKey(), entry.getValue());
}
}
}
COM: <s> adds in headers to the response as needed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.