repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java | ParagraphBuilder.styledSpan | public ParagraphBuilder styledSpan(final String text, final TextStyle ts) {
final ParagraphElement paragraphElement = new Span(text, ts);
this.paragraphElements.add(paragraphElement);
return this;
} | java | public ParagraphBuilder styledSpan(final String text, final TextStyle ts) {
final ParagraphElement paragraphElement = new Span(text, ts);
this.paragraphElements.add(paragraphElement);
return this;
} | [
"public",
"ParagraphBuilder",
"styledSpan",
"(",
"final",
"String",
"text",
",",
"final",
"TextStyle",
"ts",
")",
"{",
"final",
"ParagraphElement",
"paragraphElement",
"=",
"new",
"Span",
"(",
"text",
",",
"ts",
")",
";",
"this",
".",
"paragraphElements",
".",... | Create a styled span with a text content
@param text the text
@param ts the style
@return this for fluent style | [
"Create",
"a",
"styled",
"span",
"with",
"a",
"text",
"content"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java#L183-L187 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.create | public static TableBuilder create(final PositionUtil positionUtil, final WriteUtil writeUtil,
final XMLUtil xmlUtil, final StylesContainer stylesContainer,
final DataStyles format, final boolean libreOfficeMode, final String name,
... | java | public static TableBuilder create(final PositionUtil positionUtil, final WriteUtil writeUtil,
final XMLUtil xmlUtil, final StylesContainer stylesContainer,
final DataStyles format, final boolean libreOfficeMode, final String name,
... | [
"public",
"static",
"TableBuilder",
"create",
"(",
"final",
"PositionUtil",
"positionUtil",
",",
"final",
"WriteUtil",
"writeUtil",
",",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"StylesContainer",
"stylesContainer",
",",
"final",
"DataStyles",
"format",
",",
"fi... | Create a new table builder
@param positionUtil an util
@param writeUtil an util
@param xmlUtil an util
@param stylesContainer the container
@param format the available data styles
@param name the name of the table
@param rowCapacity the row capacity of the table
@param columnCa... | [
"Create",
"a",
"new",
"table",
"builder"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L93-L116 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.flushEndTable | public void flushEndTable(final TableAppender appender) throws IOException {
this.observer.update(new EndTableFlusher(appender,
this.tableRows.subList(this.lastFlushedRowIndex, this.tableRows.usedSize())));
} | java | public void flushEndTable(final TableAppender appender) throws IOException {
this.observer.update(new EndTableFlusher(appender,
this.tableRows.subList(this.lastFlushedRowIndex, this.tableRows.usedSize())));
} | [
"public",
"void",
"flushEndTable",
"(",
"final",
"TableAppender",
"appender",
")",
"throws",
"IOException",
"{",
"this",
".",
"observer",
".",
"update",
"(",
"new",
"EndTableFlusher",
"(",
"appender",
",",
"this",
".",
"tableRows",
".",
"subList",
"(",
"this",... | Flush the end of the table
@param appender the destination
@throws IOException if an error occurs | [
"Flush",
"the",
"end",
"of",
"the",
"table"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L200-L203 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.nextRow | public TableRow nextRow(final Table table, final TableAppender appender) throws IOException {
return this.getRowSecure(table, appender, this.curRowIndex + 1, true);
} | java | public TableRow nextRow(final Table table, final TableAppender appender) throws IOException {
return this.getRowSecure(table, appender, this.curRowIndex + 1, true);
} | [
"public",
"TableRow",
"nextRow",
"(",
"final",
"Table",
"table",
",",
"final",
"TableAppender",
"appender",
")",
"throws",
"IOException",
"{",
"return",
"this",
".",
"getRowSecure",
"(",
"table",
",",
"appender",
",",
"this",
".",
"curRowIndex",
"+",
"1",
",... | Get the next row
@param table the table
@param appender the appender
@return the row
@throws IOException if an I/O error occurs | [
"Get",
"the",
"next",
"row"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L309-L311 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java | TableBuilder.setStyle | public void setStyle(final TableStyle style) {
this.stylesContainer.addPageStyle(style.getPageStyle());
this.stylesContainer.addContentStyle(style);
this.style = style;
} | java | public void setStyle(final TableStyle style) {
this.stylesContainer.addPageStyle(style.getPageStyle());
this.stylesContainer.addContentStyle(style);
this.style = style;
} | [
"public",
"void",
"setStyle",
"(",
"final",
"TableStyle",
"style",
")",
"{",
"this",
".",
"stylesContainer",
".",
"addPageStyle",
"(",
"style",
".",
"getPageStyle",
"(",
")",
")",
";",
"this",
".",
"stylesContainer",
".",
"addContentStyle",
"(",
"style",
")"... | Set a new TableFamilyStyle
@param style The new TableStyle to be used | [
"Set",
"a",
"new",
"TableFamilyStyle"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L403-L407 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.appendXMLToTable | public static void appendXMLToTable(final TableRow row, final XMLUtil xmlUtil,
final Appendable appendable) throws IOException {
if (row == null) appendable.append("<row />");
else row.appendXMLToTable(xmlUtil, appendable);
} | java | public static void appendXMLToTable(final TableRow row, final XMLUtil xmlUtil,
final Appendable appendable) throws IOException {
if (row == null) appendable.append("<row />");
else row.appendXMLToTable(xmlUtil, appendable);
} | [
"public",
"static",
"void",
"appendXMLToTable",
"(",
"final",
"TableRow",
"row",
",",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"if",
"(",
"row",
"==",
"null",
")",
"appendable",
".",
"append",
... | Append the XML corresponding to a given row to the appendable
@param row a TableRow
@param xmlUtil an instance of xml util
@param appendable where to append the row XML
@throws IOException if an error occurs | [
"Append",
"the",
"XML",
"corresponding",
"to",
"a",
"given",
"row",
"to",
"the",
"appendable"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L52-L56 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.setColumnsSpanned | public void setColumnsSpanned(final int colIndex, final int n) {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(colIndex);
if (firstCell.isCovered()) // already spanned
return;
firstCell.markColumnsSpanned(n);
this.coverRightCells(colIn... | java | public void setColumnsSpanned(final int colIndex, final int n) {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(colIndex);
if (firstCell.isCovered()) // already spanned
return;
firstCell.markColumnsSpanned(n);
this.coverRightCells(colIn... | [
"public",
"void",
"setColumnsSpanned",
"(",
"final",
"int",
"colIndex",
",",
"final",
"int",
"n",
")",
"{",
"if",
"(",
"n",
"<=",
"1",
")",
"return",
";",
"final",
"TableCell",
"firstCell",
"=",
"this",
".",
"getOrCreateCell",
"(",
"colIndex",
")",
";",
... | Add a span across columns
@param colIndex the index of the first column
@param n the number of columns in the span | [
"Add",
"a",
"span",
"across",
"columns"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L179-L188 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.setRowsSpanned | public void setRowsSpanned(final int rowIndex, final int n) throws IOException {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(rowIndex);
if (firstCell.isCovered()) return;
this.parent.setRowsSpanned(this.rowIndex, rowIndex, n);
} | java | public void setRowsSpanned(final int rowIndex, final int n) throws IOException {
if (n <= 1) return;
final TableCell firstCell = this.getOrCreateCell(rowIndex);
if (firstCell.isCovered()) return;
this.parent.setRowsSpanned(this.rowIndex, rowIndex, n);
} | [
"public",
"void",
"setRowsSpanned",
"(",
"final",
"int",
"rowIndex",
",",
"final",
"int",
"n",
")",
"throws",
"IOException",
"{",
"if",
"(",
"n",
"<=",
"1",
")",
"return",
";",
"final",
"TableCell",
"firstCell",
"=",
"this",
".",
"getOrCreateCell",
"(",
... | Add a span across rows
@param rowIndex the index of the first row
@param n the number of rows in the span
@throws IOException if the cells can't be merged | [
"Add",
"a",
"span",
"across",
"rows"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L216-L223 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.getOrCreateCell | public TableCell getOrCreateCell(final int colIndex) {
TableCell cell = this.cells.get(colIndex);
if (cell == null) {
cell = new TableCellImpl(this.writeUtil, this.xmlUtil, this.stylesContainer, this.dataStyles,
this.libreOfficeMode, this,
colInde... | java | public TableCell getOrCreateCell(final int colIndex) {
TableCell cell = this.cells.get(colIndex);
if (cell == null) {
cell = new TableCellImpl(this.writeUtil, this.xmlUtil, this.stylesContainer, this.dataStyles,
this.libreOfficeMode, this,
colInde... | [
"public",
"TableCell",
"getOrCreateCell",
"(",
"final",
"int",
"colIndex",
")",
"{",
"TableCell",
"cell",
"=",
"this",
".",
"cells",
".",
"get",
"(",
"colIndex",
")",
";",
"if",
"(",
"cell",
"==",
"null",
")",
"{",
"cell",
"=",
"new",
"TableCellImpl",
... | Get the cell at given index. If the cell was not created before, then it is created by this method.
@param colIndex the index of the cell in the row
@return a cell | [
"Get",
"the",
"cell",
"at",
"given",
"index",
".",
"If",
"the",
"cell",
"was",
"not",
"created",
"before",
"then",
"it",
"is",
"created",
"by",
"this",
"method",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L231-L240 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableRow.java | TableRow.setStyle | public void setStyle(final TableRowStyle rowStyle) {
this.stylesContainer.addContentFontFaceContainerStyle(rowStyle);
this.stylesContainer.addContentStyle(rowStyle);
this.rowStyle = rowStyle;
} | java | public void setStyle(final TableRowStyle rowStyle) {
this.stylesContainer.addContentFontFaceContainerStyle(rowStyle);
this.stylesContainer.addContentStyle(rowStyle);
this.rowStyle = rowStyle;
} | [
"public",
"void",
"setStyle",
"(",
"final",
"TableRowStyle",
"rowStyle",
")",
"{",
"this",
".",
"stylesContainer",
".",
"addContentFontFaceContainerStyle",
"(",
"rowStyle",
")",
";",
"this",
".",
"stylesContainer",
".",
"addContentStyle",
"(",
"rowStyle",
")",
";"... | Set the row style
@param rowStyle the style | [
"Set",
"the",
"row",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L247-L251 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Table.java | Table.getRow | public TableRow getRow(final String pos) throws FastOdsException, IOException {
return this.builder.getRow(this, this.appender, pos);
} | java | public TableRow getRow(final String pos) throws FastOdsException, IOException {
return this.builder.getRow(this, this.appender, pos);
} | [
"public",
"TableRow",
"getRow",
"(",
"final",
"String",
"pos",
")",
"throws",
"FastOdsException",
",",
"IOException",
"{",
"return",
"this",
".",
"builder",
".",
"getRow",
"(",
"this",
",",
"this",
".",
"appender",
",",
"pos",
")",
";",
"}"
] | Return a row from a position
@param pos the position, e.g. A5
@return the row
@throws FastOdsException if the index is invalid
@throws IOException if the row was flushed | [
"Return",
"a",
"row",
"from",
"a",
"position"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L222-L224 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/Table.java | Table.setCellMerge | public void setCellMerge(final int rowIndex, final int colIndex, final int rowMerge,
final int columnMerge) throws IOException {
this.builder.setCellMerge(this, this.appender, rowIndex, colIndex, rowMerge, columnMerge);
} | java | public void setCellMerge(final int rowIndex, final int colIndex, final int rowMerge,
final int columnMerge) throws IOException {
this.builder.setCellMerge(this, this.appender, rowIndex, colIndex, rowMerge, columnMerge);
} | [
"public",
"void",
"setCellMerge",
"(",
"final",
"int",
"rowIndex",
",",
"final",
"int",
"colIndex",
",",
"final",
"int",
"rowMerge",
",",
"final",
"int",
"columnMerge",
")",
"throws",
"IOException",
"{",
"this",
".",
"builder",
".",
"setCellMerge",
"(",
"thi... | Set a span over cells
@param rowIndex the top row
@param colIndex the leftmost col
@param rowMerge the number of rows
@param columnMerge the number of cols
@throws IOException if an error occurs | [
"Set",
"a",
"span",
"over",
"cells"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L252-L255 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java | MasterPageStyle.addEmbeddedStyles | @Override
public void addEmbeddedStyles(final StylesContainer stylesContainer) {
if (this.header != null) this.header.addEmbeddedStyles(stylesContainer);
if (this.footer != null) this.footer.addEmbeddedStyles(stylesContainer);
} | java | @Override
public void addEmbeddedStyles(final StylesContainer stylesContainer) {
if (this.header != null) this.header.addEmbeddedStyles(stylesContainer);
if (this.footer != null) this.footer.addEmbeddedStyles(stylesContainer);
} | [
"@",
"Override",
"public",
"void",
"addEmbeddedStyles",
"(",
"final",
"StylesContainer",
"stylesContainer",
")",
"{",
"if",
"(",
"this",
".",
"header",
"!=",
"null",
")",
"this",
".",
"header",
".",
"addEmbeddedStyles",
"(",
"stylesContainer",
")",
";",
"if",
... | Add the style embedded in this master page style to a container
@param stylesContainer the container | [
"Add",
"the",
"style",
"embedded",
"in",
"this",
"master",
"page",
"style",
"to",
"a",
"container"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java#L70-L74 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java | MasterPageStyle.appendXMLToMasterStyle | public void appendXMLToMasterStyle(final XMLUtil util, final Appendable appendable)
throws IOException {
appendable.append("<style:master-page");
util.appendEAttribute(appendable, "style:name", this.name);
util.appendEAttribute(appendable, "style:page-layout-name", this.layoutName);
... | java | public void appendXMLToMasterStyle(final XMLUtil util, final Appendable appendable)
throws IOException {
appendable.append("<style:master-page");
util.appendEAttribute(appendable, "style:name", this.name);
util.appendEAttribute(appendable, "style:page-layout-name", this.layoutName);
... | [
"public",
"void",
"appendXMLToMasterStyle",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"\"<style:master-page\"",
")",
";",
"util",
".",
"appendEAttribute",
"(",
"a... | Return the master-style informations for this PageStyle.
@param util a util for XML writing
@param appendable where to write
@throws IOException If an I/O error occurs | [
"Return",
"the",
"master",
"-",
"style",
"informations",
"for",
"this",
"PageStyle",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/MasterPageStyle.java#L88-L106 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/ZipUTF8WriterBuilder.java | ZipUTF8WriterBuilder.build | public ZipUTF8Writer build(final OutputStream out) {
final OutputStream bufferedOut;
switch (this.zipBufferSize) {
case NO_BUFFER:
bufferedOut = out;
break;
case DEFAULT_BUFFER:
bufferedOut = new BufferedOutputStream(out);
break;
default:
bufferedOut = new BufferedOutputStream(out, this.zipBuff... | java | public ZipUTF8Writer build(final OutputStream out) {
final OutputStream bufferedOut;
switch (this.zipBufferSize) {
case NO_BUFFER:
bufferedOut = out;
break;
case DEFAULT_BUFFER:
bufferedOut = new BufferedOutputStream(out);
break;
default:
bufferedOut = new BufferedOutputStream(out, this.zipBuff... | [
"public",
"ZipUTF8Writer",
"build",
"(",
"final",
"OutputStream",
"out",
")",
"{",
"final",
"OutputStream",
"bufferedOut",
";",
"switch",
"(",
"this",
".",
"zipBufferSize",
")",
"{",
"case",
"NO_BUFFER",
":",
"bufferedOut",
"=",
"out",
";",
"break",
";",
"ca... | Build the new writer, with a given output stream
@param out the destination
@return the writer | [
"Build",
"the",
"new",
"writer",
"with",
"a",
"given",
"output",
"stream"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/ZipUTF8WriterBuilder.java#L61-L92 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java | EqualityUtil.hashObjects | public int hashObjects(final Object... objects) {
final int prime = 31;
int result = 1;
for (final Object object : objects) {
result = prime * result
+ ((object == null) ? 0 : object.hashCode());
}
return result;
} | java | public int hashObjects(final Object... objects) {
final int prime = 31;
int result = 1;
for (final Object object : objects) {
result = prime * result
+ ((object == null) ? 0 : object.hashCode());
}
return result;
} | [
"public",
"int",
"hashObjects",
"(",
"final",
"Object",
"...",
"objects",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"for",
"(",
"final",
"Object",
"object",
":",
"objects",
")",
"{",
"result",
"=",
"prime",
"*... | Hash a bunch of objects
@param objects the objects
@return a hash code | [
"Hash",
"a",
"bunch",
"of",
"objects"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java#L62-L70 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java | EqualityUtil.hashInts | public int hashInts(final int... integers) {
final int prime = 31;
int result = 1;
for (final int integer : integers)
result = prime * result + integer;
return result;
} | java | public int hashInts(final int... integers) {
final int prime = 31;
int result = 1;
for (final int integer : integers)
result = prime * result + integer;
return result;
} | [
"public",
"int",
"hashInts",
"(",
"final",
"int",
"...",
"integers",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"for",
"(",
"final",
"int",
"integer",
":",
"integers",
")",
"result",
"=",
"prime",
"*",
"result"... | Hash a bunch of integers
@param integers the integers
@return a hash code | [
"Hash",
"a",
"bunch",
"of",
"integers"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/util/EqualityUtil.java#L77-L83 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsDocument.java | AnonymousOdsDocument.create | static AnonymousOdsDocument create(final Logger logger, final XMLUtil xmlUtil,
final OdsElements odsElements) {
return new AnonymousOdsDocument(logger, xmlUtil, odsElements,
new CommonOdsDocument(odsElements));
} | java | static AnonymousOdsDocument create(final Logger logger, final XMLUtil xmlUtil,
final OdsElements odsElements) {
return new AnonymousOdsDocument(logger, xmlUtil, odsElements,
new CommonOdsDocument(odsElements));
} | [
"static",
"AnonymousOdsDocument",
"create",
"(",
"final",
"Logger",
"logger",
",",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"OdsElements",
"odsElements",
")",
"{",
"return",
"new",
"AnonymousOdsDocument",
"(",
"logger",
",",
"xmlUtil",
",",
"odsElements",
",",... | Create a new anonymous ODS document.
@param logger the logger
@param xmlUtil a util for XML writing
@param odsElements the ods elements (file entries in zip archive) | [
"Create",
"a",
"new",
"anonymous",
"ODS",
"document",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsDocument.java#L56-L60 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/CoreDataStyle.java | CoreDataStyle.appendLVAttributes | public void appendLVAttributes(final XMLUtil util,
final Appendable appendable) throws IOException {
this.appendLocaleAttributes(util, appendable);
this.appendVolatileAttribute(util, appendable);
} | java | public void appendLVAttributes(final XMLUtil util,
final Appendable appendable) throws IOException {
this.appendLocaleAttributes(util, appendable);
this.appendVolatileAttribute(util, appendable);
} | [
"public",
"void",
"appendLVAttributes",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendLocaleAttributes",
"(",
"util",
",",
"appendable",
")",
";",
"this",
".",
"appendVolatileAttri... | Append locale and volatile attributes
@param util an util
@param appendable the destination
@throws IOException if an error occurs | [
"Append",
"locale",
"and",
"volatile",
"attributes"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/CoreDataStyle.java#L80-L84 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/Settings.java | Settings.create | static Settings create(final ConfigItemSet viewSettings, final ConfigItemMapEntrySet firstView,
final ConfigItemSet configurationSettings) {
final List<ConfigBlock> rootBlocks = new ArrayList<ConfigBlock>();
final ConfigItemMapIndexed views = new ConfigItemMapIndexed("Vi... | java | static Settings create(final ConfigItemSet viewSettings, final ConfigItemMapEntrySet firstView,
final ConfigItemSet configurationSettings) {
final List<ConfigBlock> rootBlocks = new ArrayList<ConfigBlock>();
final ConfigItemMapIndexed views = new ConfigItemMapIndexed("Vi... | [
"static",
"Settings",
"create",
"(",
"final",
"ConfigItemSet",
"viewSettings",
",",
"final",
"ConfigItemMapEntrySet",
"firstView",
",",
"final",
"ConfigItemSet",
"configurationSettings",
")",
"{",
"final",
"List",
"<",
"ConfigBlock",
">",
"rootBlocks",
"=",
"new",
"... | Create a new settings representation
@param viewSettings inner view settings
@param firstView the view to display
@param configurationSettings the configuration
@return the settings representation | [
"Create",
"a",
"new",
"settings",
"representation"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/Settings.java#L132-L140 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java | FloatStyle.appendXMLHelper | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName, final CharSequence number) throws IOException {
this.numberStyle.appendXMLHelper(util, appendable, numberStyleName, number);
} | java | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName, final CharSequence number) throws IOException {
this.numberStyle.appendXMLHelper(util, appendable, numberStyleName, number);
} | [
"void",
"appendXMLHelper",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
",",
"final",
"String",
"numberStyleName",
",",
"final",
"CharSequence",
"number",
")",
"throws",
"IOException",
"{",
"this",
".",
"numberStyle",
".",
"appendXMLH... | A helper to create the XML representation of the float style
@param util a util
@param appendable the destination
@param numberStyleName the style name ("currency-style", ...)
@param number the number itslef
@throws IOException if an I/O error occurs | [
"A",
"helper",
"to",
"create",
"the",
"XML",
"representation",
"of",
"the",
"float",
"style"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java#L104-L106 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java | NumberStyleHelper.appendXMLHelper | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName,
final CharSequence number) throws IOException {
this.appendOpenTag(util, appendable, numberStyleName, this.dataStyle.getName());
appendable.append(number);
this.appendClos... | java | void appendXMLHelper(final XMLUtil util, final Appendable appendable, final String numberStyleName,
final CharSequence number) throws IOException {
this.appendOpenTag(util, appendable, numberStyleName, this.dataStyle.getName());
appendable.append(number);
this.appendClos... | [
"void",
"appendXMLHelper",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
",",
"final",
"String",
"numberStyleName",
",",
"final",
"CharSequence",
"number",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendOpenTag",
"(",
"util",
... | A helper to append XML content
@param util an util
@param appendable destination
@param numberStyleName the name of the number syle
@param number the number itself
@throws IOException if an I/O error occurs | [
"A",
"helper",
"to",
"append",
"XML",
"content"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L69-L83 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java | NumberStyleHelper.appendNumberAttribute | public void appendNumberAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
this.appendMinIntegerDigitsAttribute(util, appendable);
this.appendGroupingAttribute(util, appendable);
} | java | public void appendNumberAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
this.appendMinIntegerDigitsAttribute(util, appendable);
this.appendGroupingAttribute(util, appendable);
} | [
"public",
"void",
"appendNumberAttribute",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"this",
".",
"appendMinIntegerDigitsAttribute",
"(",
"util",
",",
"appendable",
")",
";",
"this",
".",
"appendG... | Append the attributes of the number
@param util an util
@param appendable the destination
@throws IOException if an I/O error occurs | [
"Append",
"the",
"attributes",
"of",
"the",
"number"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L119-L122 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java | NumberStyleHelper.appendStyleColor | private void appendStyleColor(final XMLUtil util, final Appendable appendable) throws IOException {
appendable.append("<style:text-properties");
util.appendAttribute(appendable, "fo:color", this.negativeValueColor.hexValue());
appendable.append("/>");
} | java | private void appendStyleColor(final XMLUtil util, final Appendable appendable) throws IOException {
appendable.append("<style:text-properties");
util.appendAttribute(appendable, "fo:color", this.negativeValueColor.hexValue());
appendable.append("/>");
} | [
"private",
"void",
"appendStyleColor",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"appendable",
".",
"append",
"(",
"\"<style:text-properties\"",
")",
";",
"util",
".",
"appendAttribute",
"(",
"app... | Appends the style color.
@param util XML util
@param appendable where to write
@throws IOException If an I/O error occurs | [
"Appends",
"the",
"style",
"color",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/NumberStyleHelper.java#L131-L135 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/config/ConfigItemMapEntrySequence.java | ConfigItemMapEntrySequence.set | public String set(final int i, final String value) {
final ConfigBlock block = this.blocks.get(i);
if (block instanceof ConfigItem) {
final ConfigItem item = (ConfigItem) block;
final String previousValue = item.getValue();
item.setValue(value);
return previousValue;
}
return null;
} | java | public String set(final int i, final String value) {
final ConfigBlock block = this.blocks.get(i);
if (block instanceof ConfigItem) {
final ConfigItem item = (ConfigItem) block;
final String previousValue = item.getValue();
item.setValue(value);
return previousValue;
}
return null;
} | [
"public",
"String",
"set",
"(",
"final",
"int",
"i",
",",
"final",
"String",
"value",
")",
"{",
"final",
"ConfigBlock",
"block",
"=",
"this",
".",
"blocks",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"block",
"instanceof",
"ConfigItem",
")",
"{",
"fi... | Set a value for an item at a given index
@param i the index
@param value the new value
@return the previous value
@throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()) | [
"Set",
"a",
"value",
"for",
"an",
"item",
"at",
"a",
"given",
"index"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/config/ConfigItemMapEntrySequence.java#L119-L128 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.addChildCellStyle | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.contentElement.addChildCellStyle(style, type);
} | java | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.contentElement.addChildCellStyle(style, type);
} | [
"public",
"void",
"addChildCellStyle",
"(",
"final",
"TableCellStyle",
"style",
",",
"final",
"TableCell",
".",
"Type",
"type",
")",
"{",
"this",
".",
"contentElement",
".",
"addChildCellStyle",
"(",
"style",
",",
"type",
")",
";",
"}"
] | Create an automatic style for this TableCellStyle and this type of cell.
Do not produce any effect if the type is Type.STRING or Type.VOID
@param style the style of the cell (color, data style, etc.)
@param type the type of the cell | [
"Create",
"an",
"automatic",
"style",
"for",
"this",
"TableCellStyle",
"and",
"this",
"type",
"of",
"cell",
".",
"Do",
"not",
"produce",
"any",
"effect",
"if",
"the",
"type",
"is",
"Type",
".",
"STRING",
"or",
"Type",
".",
"VOID"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L127-L129 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.addTableToContent | public Table addTableToContent(final String name, final int rowCapacity,
final int columnCapacity) throws IOException {
final Table previousTable = this.contentElement.getLastTable();
final Table table = this.contentElement.addTable(name, rowCapacity, columnCapacity... | java | public Table addTableToContent(final String name, final int rowCapacity,
final int columnCapacity) throws IOException {
final Table previousTable = this.contentElement.getLastTable();
final Table table = this.contentElement.addTable(name, rowCapacity, columnCapacity... | [
"public",
"Table",
"addTableToContent",
"(",
"final",
"String",
"name",
",",
"final",
"int",
"rowCapacity",
",",
"final",
"int",
"columnCapacity",
")",
"throws",
"IOException",
"{",
"final",
"Table",
"previousTable",
"=",
"this",
".",
"contentElement",
".",
"get... | Add a new table to content. The config for this table is added to the settings.
If the OdsElements is observed, the previous table is flushed. If there is no previous table,
meta.xml, styles.xml and the preamble of content.xml are written to destination.
@param name name of the table
@param rowCapacity es... | [
"Add",
"a",
"new",
"table",
"to",
"content",
".",
"The",
"config",
"for",
"this",
"table",
"is",
"added",
"to",
"the",
"settings",
".",
"If",
"the",
"OdsElements",
"is",
"observed",
"the",
"previous",
"table",
"is",
"flushed",
".",
"If",
"there",
"is",
... | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L214-L226 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.createEmptyElements | public void createEmptyElements(final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing empty ods elements to zip file");
for (final String elementName : EMPTY_ELEMENT_NAMES) {
this.logger.log(Level.FINEST, "Writing odselement: {0} to zip file", elementName)... | java | public void createEmptyElements(final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing empty ods elements to zip file");
for (final String elementName : EMPTY_ELEMENT_NAMES) {
this.logger.log(Level.FINEST, "Writing odselement: {0} to zip file", elementName)... | [
"public",
"void",
"createEmptyElements",
"(",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing empty ods elements to zip file\"",
")",
";",
"for",
"(",
"final",
... | Create empty elements for package. Used on save or by the ImmutableElementsFlusher.
@param writer destination
@throws IOException if the elements were not created. | [
"Create",
"empty",
"elements",
"for",
"package",
".",
"Used",
"on",
"save",
"or",
"by",
"the",
"ImmutableElementsFlusher",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L234-L241 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.finalizeContent | public void finalizeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(xmlUtil, writer);
this.contentElement.writePostamble(xmlUtil, writer);
} | java | public void finalizeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(xmlUtil, writer);
this.contentElement.writePostamble(xmlUtil, writer);
} | [
"public",
"void",
"finalizeContent",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"contentElement",
".",
"flushTables",
"(",
"xmlUtil",
",",
"writer",
")",
";",
"this",
".",
"conte... | Flush tables and write end of document
@param xmlUtil the util
@param writer the stream to write
@throws IOException when write fails | [
"Flush",
"tables",
"and",
"write",
"end",
"of",
"document"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L257-L260 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.flushRows | public void flushRows(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushRows(util, writer, this.settingsElement);
} | java | public void flushRows(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushRows(util, writer, this.settingsElement);
} | [
"public",
"void",
"flushRows",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"contentElement",
".",
"flushRows",
"(",
"util",
",",
"writer",
",",
"this",
".",
"settingsElement",
")",
... | Flush the rows
@param util the util
@param writer the stream to write
@throws IOException when write fails | [
"Flush",
"the",
"rows"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L269-L271 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.flushTables | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(util, writer);
} | java | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.contentElement.flushTables(util, writer);
} | [
"public",
"void",
"flushTables",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"contentElement",
".",
"flushTables",
"(",
"util",
",",
"writer",
")",
";",
"}"
] | Flush the tables
@param util the util
@param writer the stream to write
@throws IOException when write fails | [
"Flush",
"the",
"tables"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L280-L282 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.save | public void save() throws IOException {
final Table previousTable = this.contentElement.getLastTable();
if (previousTable != null) previousTable.flush();
this.observer.update(new FinalizeFlusher(this.contentElement, this.settingsElement));
} | java | public void save() throws IOException {
final Table previousTable = this.contentElement.getLastTable();
if (previousTable != null) previousTable.flush();
this.observer.update(new FinalizeFlusher(this.contentElement, this.settingsElement));
} | [
"public",
"void",
"save",
"(",
")",
"throws",
"IOException",
"{",
"final",
"Table",
"previousTable",
"=",
"this",
".",
"contentElement",
".",
"getLastTable",
"(",
")",
";",
"if",
"(",
"previousTable",
"!=",
"null",
")",
"previousTable",
".",
"flush",
"(",
... | Save the elements
@throws IOException if the write fails | [
"Save",
"the",
"elements"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L339-L344 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeContent | public void writeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: contentElement to zip file");
this.contentElement.write(xmlUtil, writer);
} | java | public void writeContent(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: contentElement to zip file");
this.contentElement.write(xmlUtil, writer);
} | [
"public",
"void",
"writeContent",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing odselement: contentElement to zip file\""... | Write the content element to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"content",
"element",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L373-L376 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeImmutableElements | public void writeImmutableElements(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: mimeTypeEntry to zip file");
this.mimetypeElement.write(xmlUtil, writer);
this.logger.log(Level.FINER, "Writing odselement: manifestElem... | java | public void writeImmutableElements(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: mimeTypeEntry to zip file");
this.mimetypeElement.write(xmlUtil, writer);
this.logger.log(Level.FINER, "Writing odselement: manifestElem... | [
"public",
"void",
"writeImmutableElements",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing odselement: mimeTypeEntry to zi... | Write the mimetype and manifest elements to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"mimetype",
"and",
"manifest",
"elements",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L385-L390 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeMeta | public void writeMeta(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: metaElement to zip file");
this.metaElement.write(xmlUtil, writer);
} | java | public void writeMeta(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: metaElement to zip file");
this.metaElement.write(xmlUtil, writer);
} | [
"public",
"void",
"writeMeta",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing odselement: metaElement to zip file\"",
")... | Write the meta element to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"meta",
"element",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L399-L402 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeSettings | public void writeSettings(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.settingsElement.setTables(this.getTables());
this.logger.log(Level.FINER, "Writing odselement: settingsElement to zip file");
this.settingsElement.write(xmlUtil, writer);
} | java | public void writeSettings(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.settingsElement.setTables(this.getTables());
this.logger.log(Level.FINER, "Writing odselement: settingsElement to zip file");
this.settingsElement.write(xmlUtil, writer);
} | [
"public",
"void",
"writeSettings",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"settingsElement",
".",
"setTables",
"(",
"this",
".",
"getTables",
"(",
")",
")",
";",
"this",
".... | Write the settings element to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"settings",
"element",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L411-L415 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.writeStyles | public void writeStyles(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: stylesElement to zip file");
this.stylesElement.write(xmlUtil, writer);
} | java | public void writeStyles(final XMLUtil xmlUtil, final ZipUTF8Writer writer) throws IOException {
this.logger.log(Level.FINER, "Writing odselement: stylesElement to zip file");
this.stylesElement.write(xmlUtil, writer);
} | [
"public",
"void",
"writeStyles",
"(",
"final",
"XMLUtil",
"xmlUtil",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"logger",
".",
"log",
"(",
"Level",
".",
"FINER",
",",
"\"Writing odselement: stylesElement to zip file\"",
... | Write the styles element to a writer.
@param xmlUtil the xml util
@param writer the writer
@throws IOException if write fails | [
"Write",
"the",
"styles",
"element",
"to",
"a",
"writer",
"."
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L424-L427 | train |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableAppender.java | TableAppender.appendPreamble | public void appendPreamble(final XMLUtil util, final Appendable appendable) throws IOException {
if (this.preambleWritten)
return;
appendable.append("<table:table");
util.appendEAttribute(appendable, "table:name", this.builder.getName());
util.appendEAttribute(appendable, "t... | java | public void appendPreamble(final XMLUtil util, final Appendable appendable) throws IOException {
if (this.preambleWritten)
return;
appendable.append("<table:table");
util.appendEAttribute(appendable, "table:name", this.builder.getName());
util.appendEAttribute(appendable, "t... | [
"public",
"void",
"appendPreamble",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"Appendable",
"appendable",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"preambleWritten",
")",
"return",
";",
"appendable",
".",
"append",
"(",
"\"<table:table\"",... | Append the preamble
@param util an util
@param appendable the destination
@throws IOException if an I/O error occurs | [
"Append",
"the",
"preamble"
] | a034d173083ffa602dc525699b97f753082eaef9 | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableAppender.java#L68-L83 | train |
eBay/xcelite | src/main/java/com/ebay/xcelite/Xcelite.java | Xcelite.getSheet | public XceliteSheet getSheet(int sheetIndex) {
Sheet sheet = workbook.getSheetAt(sheetIndex);
if (sheet == null) {
throw new XceliteException(String.format("Could not find sheet at index %s", sheetIndex));
}
return new XceliteSheetImpl(sheet, file);
} | java | public XceliteSheet getSheet(int sheetIndex) {
Sheet sheet = workbook.getSheetAt(sheetIndex);
if (sheet == null) {
throw new XceliteException(String.format("Could not find sheet at index %s", sheetIndex));
}
return new XceliteSheetImpl(sheet, file);
} | [
"public",
"XceliteSheet",
"getSheet",
"(",
"int",
"sheetIndex",
")",
"{",
"Sheet",
"sheet",
"=",
"workbook",
".",
"getSheetAt",
"(",
"sheetIndex",
")",
";",
"if",
"(",
"sheet",
"==",
"null",
")",
"{",
"throw",
"new",
"XceliteException",
"(",
"String",
".",... | Gets the sheet at the specified index.
@param sheetIndex the sheet index
@return XceliteSheet object | [
"Gets",
"the",
"sheet",
"at",
"the",
"specified",
"index",
"."
] | 0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1 | https://github.com/eBay/xcelite/blob/0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1/src/main/java/com/ebay/xcelite/Xcelite.java#L85-L91 | train |
eBay/xcelite | src/main/java/com/ebay/xcelite/Xcelite.java | Xcelite.getSheet | public XceliteSheet getSheet(String sheetName) {
Sheet sheet = workbook.getSheet(sheetName);
if (sheet == null) {
throw new XceliteException(String.format("Could not find sheet named \"%s\"", sheetName));
}
return new XceliteSheetImpl(sheet, file);
} | java | public XceliteSheet getSheet(String sheetName) {
Sheet sheet = workbook.getSheet(sheetName);
if (sheet == null) {
throw new XceliteException(String.format("Could not find sheet named \"%s\"", sheetName));
}
return new XceliteSheetImpl(sheet, file);
} | [
"public",
"XceliteSheet",
"getSheet",
"(",
"String",
"sheetName",
")",
"{",
"Sheet",
"sheet",
"=",
"workbook",
".",
"getSheet",
"(",
"sheetName",
")",
";",
"if",
"(",
"sheet",
"==",
"null",
")",
"{",
"throw",
"new",
"XceliteException",
"(",
"String",
".",
... | Gets the sheet with the specified index.
@param sheetIndex the sheet name
@return XceliteSheet object | [
"Gets",
"the",
"sheet",
"with",
"the",
"specified",
"index",
"."
] | 0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1 | https://github.com/eBay/xcelite/blob/0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1/src/main/java/com/ebay/xcelite/Xcelite.java#L99-L105 | train |
eBay/xcelite | src/main/java/com/ebay/xcelite/Xcelite.java | Xcelite.write | public void write(File file) {
FileOutputStream out = null;
try {
out = new FileOutputStream(file, false);
workbook.write(out);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
} catch (IOException e) {
new RuntimeException(e);
} finally {
if... | java | public void write(File file) {
FileOutputStream out = null;
try {
out = new FileOutputStream(file, false);
workbook.write(out);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
} catch (IOException e) {
new RuntimeException(e);
} finally {
if... | [
"public",
"void",
"write",
"(",
"File",
"file",
")",
"{",
"FileOutputStream",
"out",
"=",
"null",
";",
"try",
"{",
"out",
"=",
"new",
"FileOutputStream",
"(",
"file",
",",
"false",
")",
";",
"workbook",
".",
"write",
"(",
"out",
")",
";",
"}",
"catch... | Saves data to a new file.
@param file the file to save the data into | [
"Saves",
"data",
"to",
"a",
"new",
"file",
"."
] | 0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1 | https://github.com/eBay/xcelite/blob/0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1/src/main/java/com/ebay/xcelite/Xcelite.java#L123-L140 | train |
eBay/xcelite | src/main/java/com/ebay/xcelite/Xcelite.java | Xcelite.getBytes | public byte[] getBytes() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
workbook.write(baos);
} catch (IOException e) {
new RuntimeException(e);
} finally {
if (baos != null)
try {
baos.close();
} catch (IOException e) {
... | java | public byte[] getBytes() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
workbook.write(baos);
} catch (IOException e) {
new RuntimeException(e);
} finally {
if (baos != null)
try {
baos.close();
} catch (IOException e) {
... | [
"public",
"byte",
"[",
"]",
"getBytes",
"(",
")",
"{",
"ByteArrayOutputStream",
"baos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"try",
"{",
"workbook",
".",
"write",
"(",
"baos",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"n... | Gets the excel file as byte array.
@return byte array which represents the excel file | [
"Gets",
"the",
"excel",
"file",
"as",
"byte",
"array",
"."
] | 0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1 | https://github.com/eBay/xcelite/blob/0362f4cf9c5b8dee73e8ec00a860f0fef0f0c2e1/src/main/java/com/ebay/xcelite/Xcelite.java#L147-L162 | train |
EsotericSoftware/minlog | src/com/esotericsoftware/minlog/Log.java | Log.set | static public void set (int level) {
// Comment out method contents when compiling fixed level JARs.
Log.level = level;
ERROR = level <= LEVEL_ERROR;
WARN = level <= LEVEL_WARN;
INFO = level <= LEVEL_INFO;
DEBUG = level <= LEVEL_DEBUG;
TRACE = level <= LEVEL_TRACE;
} | java | static public void set (int level) {
// Comment out method contents when compiling fixed level JARs.
Log.level = level;
ERROR = level <= LEVEL_ERROR;
WARN = level <= LEVEL_WARN;
INFO = level <= LEVEL_INFO;
DEBUG = level <= LEVEL_DEBUG;
TRACE = level <= LEVEL_TRACE;
} | [
"static",
"public",
"void",
"set",
"(",
"int",
"level",
")",
"{",
"// Comment out method contents when compiling fixed level JARs.\r",
"Log",
".",
"level",
"=",
"level",
";",
"ERROR",
"=",
"level",
"<=",
"LEVEL_ERROR",
";",
"WARN",
"=",
"level",
"<=",
"LEVEL_WARN"... | Sets the level to log. If a version of this class is being used that has a final log level, this has no affect. | [
"Sets",
"the",
"level",
"to",
"log",
".",
"If",
"a",
"version",
"of",
"this",
"class",
"is",
"being",
"used",
"that",
"has",
"a",
"final",
"log",
"level",
"this",
"has",
"no",
"affect",
"."
] | 5906ffcd6efdb3dcd27e84621cb80ccc8a698176 | https://github.com/EsotericSoftware/minlog/blob/5906ffcd6efdb3dcd27e84621cb80ccc8a698176/src/com/esotericsoftware/minlog/Log.java#L39-L47 | train |
hgoebl/DavidWebb | src/main/java/com/goebl/david/WebbUtils.java | WebbUtils.queryString | public static String queryString(Map<String, Object> values) {
StringBuilder sbuf = new StringBuilder();
String separator = "";
for (Map.Entry<String, Object> entry : values.entrySet()) {
Object entryValue = entry.getValue();
if (entryValue instanceof Object[]) {
... | java | public static String queryString(Map<String, Object> values) {
StringBuilder sbuf = new StringBuilder();
String separator = "";
for (Map.Entry<String, Object> entry : values.entrySet()) {
Object entryValue = entry.getValue();
if (entryValue instanceof Object[]) {
... | [
"public",
"static",
"String",
"queryString",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"values",
")",
"{",
"StringBuilder",
"sbuf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"separator",
"=",
"\"\"",
";",
"for",
"(",
"Map",
".",
"Entry",... | Convert a Map to a query string.
@param values the map with the values
<code>null</code> will be encoded as empty string, all other objects are converted to
String by calling its <code>toString()</code> method.
@return e.g. "key1=value&key2=&email=max%40example.com" | [
"Convert",
"a",
"Map",
"to",
"a",
"query",
"string",
"."
] | 4f1532fbc3d817886d38de24eacc02b44b910b42 | https://github.com/hgoebl/DavidWebb/blob/4f1532fbc3d817886d38de24eacc02b44b910b42/src/main/java/com/goebl/david/WebbUtils.java#L43-L66 | train |
hgoebl/DavidWebb | src/main/java/com/goebl/david/WebbUtils.java | WebbUtils.toJsonObject | public static JSONObject toJsonObject(byte[] bytes) {
String json;
try {
json = new String(bytes, Const.UTF8);
return new JSONObject(json);
} catch (UnsupportedEncodingException e) {
throw new WebbException(e);
} catch (JSONException e) {
t... | java | public static JSONObject toJsonObject(byte[] bytes) {
String json;
try {
json = new String(bytes, Const.UTF8);
return new JSONObject(json);
} catch (UnsupportedEncodingException e) {
throw new WebbException(e);
} catch (JSONException e) {
t... | [
"public",
"static",
"JSONObject",
"toJsonObject",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"String",
"json",
";",
"try",
"{",
"json",
"=",
"new",
"String",
"(",
"bytes",
",",
"Const",
".",
"UTF8",
")",
";",
"return",
"new",
"JSONObject",
"(",
"json",
... | Convert a byte array to a JSONObject.
@param bytes a UTF-8 encoded string representing a JSON object.
@return the parsed object
@throws WebbException in case of error (usually a parsing error due to invalid JSON) | [
"Convert",
"a",
"byte",
"array",
"to",
"a",
"JSONObject",
"."
] | 4f1532fbc3d817886d38de24eacc02b44b910b42 | https://github.com/hgoebl/DavidWebb/blob/4f1532fbc3d817886d38de24eacc02b44b910b42/src/main/java/com/goebl/david/WebbUtils.java#L82-L92 | train |
hgoebl/DavidWebb | src/main/java/com/goebl/david/WebbUtils.java | WebbUtils.toJsonArray | public static JSONArray toJsonArray(byte[] bytes) {
String json;
try {
json = new String(bytes, Const.UTF8);
return new JSONArray(json);
} catch (UnsupportedEncodingException e) {
throw new WebbException(e);
} catch (JSONException e) {
thro... | java | public static JSONArray toJsonArray(byte[] bytes) {
String json;
try {
json = new String(bytes, Const.UTF8);
return new JSONArray(json);
} catch (UnsupportedEncodingException e) {
throw new WebbException(e);
} catch (JSONException e) {
thro... | [
"public",
"static",
"JSONArray",
"toJsonArray",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"String",
"json",
";",
"try",
"{",
"json",
"=",
"new",
"String",
"(",
"bytes",
",",
"Const",
".",
"UTF8",
")",
";",
"return",
"new",
"JSONArray",
"(",
"json",
"... | Convert a byte array to a JSONArray.
@param bytes a UTF-8 encoded string representing a JSON array.
@return the parsed JSON array
@throws WebbException in case of error (usually a parsing error due to invalid JSON) | [
"Convert",
"a",
"byte",
"array",
"to",
"a",
"JSONArray",
"."
] | 4f1532fbc3d817886d38de24eacc02b44b910b42 | https://github.com/hgoebl/DavidWebb/blob/4f1532fbc3d817886d38de24eacc02b44b910b42/src/main/java/com/goebl/david/WebbUtils.java#L100-L110 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/handler/FileHandler.java | FileHandler.sendStream | private void sendStream(InputStream in) {
new Thread(() -> {
try {
con.sendData(in);
con.sendResponse(226, "File sent!");
} catch(ResponseException ex) {
con.sendResponse(ex.getCode(), ex.getMessage());
} catch(Exception ex) {
... | java | private void sendStream(InputStream in) {
new Thread(() -> {
try {
con.sendData(in);
con.sendResponse(226, "File sent!");
} catch(ResponseException ex) {
con.sendResponse(ex.getCode(), ex.getMessage());
} catch(Exception ex) {
... | [
"private",
"void",
"sendStream",
"(",
"InputStream",
"in",
")",
"{",
"new",
"Thread",
"(",
"(",
")",
"->",
"{",
"try",
"{",
"con",
".",
"sendData",
"(",
"in",
")",
";",
"con",
".",
"sendResponse",
"(",
"226",
",",
"\"File sent!\"",
")",
";",
"}",
"... | Sends a stream asynchronously, sending a response after it's done
@param in The stream | [
"Sends",
"a",
"stream",
"asynchronously",
"sending",
"a",
"response",
"after",
"it",
"s",
"done"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/handler/FileHandler.java#L461-L472 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/handler/FileHandler.java | FileHandler.receiveStream | private void receiveStream(OutputStream out) {
new Thread(() -> {
try {
con.receiveData(out);
con.sendResponse(226, "File received!");
} catch(ResponseException ex) {
con.sendResponse(ex.getCode(), ex.getMessage());
} catch(Exce... | java | private void receiveStream(OutputStream out) {
new Thread(() -> {
try {
con.receiveData(out);
con.sendResponse(226, "File received!");
} catch(ResponseException ex) {
con.sendResponse(ex.getCode(), ex.getMessage());
} catch(Exce... | [
"private",
"void",
"receiveStream",
"(",
"OutputStream",
"out",
")",
"{",
"new",
"Thread",
"(",
"(",
")",
"->",
"{",
"try",
"{",
"con",
".",
"receiveData",
"(",
"out",
")",
";",
"con",
".",
"sendResponse",
"(",
"226",
",",
"\"File received!\"",
")",
";... | Receives a stream asynchronously, sending a response after it's done
@param out The stream | [
"Receives",
"a",
"stream",
"asynchronously",
"sending",
"a",
"response",
"after",
"it",
"s",
"done"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/handler/FileHandler.java#L478-L489 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPServer.java | FTPServer.listen | public void listen(InetAddress address, int port) throws IOException {
if(auth == null) throw new NullPointerException("The Authenticator is null");
if(socket != null) throw new IOException("Server already started");
socket = Utils.createServer(port, 50, address, ssl, !explicitSecurity);
... | java | public void listen(InetAddress address, int port) throws IOException {
if(auth == null) throw new NullPointerException("The Authenticator is null");
if(socket != null) throw new IOException("Server already started");
socket = Utils.createServer(port, 50, address, ssl, !explicitSecurity);
... | [
"public",
"void",
"listen",
"(",
"InetAddress",
"address",
",",
"int",
"port",
")",
"throws",
"IOException",
"{",
"if",
"(",
"auth",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"The Authenticator is null\"",
")",
";",
"if",
"(",
"socket",... | Starts the FTP server asynchronously.
@param address The server address or {@code null} for a local address
@param port The server port or {@code 0} to automatically allocate the port
@throws IOException When an error occurs while starting the server | [
"Starts",
"the",
"FTP",
"server",
"asynchronously",
"."
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L197-L206 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPServer.java | FTPServer.listenSync | public void listenSync(InetAddress address, int port) throws IOException {
if(auth == null) throw new NullPointerException("The Authenticator is null");
if(socket != null) throw new IOException("Server already started");
socket = Utils.createServer(port, 50, address, ssl, !explicitSecurity);
... | java | public void listenSync(InetAddress address, int port) throws IOException {
if(auth == null) throw new NullPointerException("The Authenticator is null");
if(socket != null) throw new IOException("Server already started");
socket = Utils.createServer(port, 50, address, ssl, !explicitSecurity);
... | [
"public",
"void",
"listenSync",
"(",
"InetAddress",
"address",
",",
"int",
"port",
")",
"throws",
"IOException",
"{",
"if",
"(",
"auth",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"The Authenticator is null\"",
")",
";",
"if",
"(",
"sock... | Starts the FTP server synchronously, blocking the current thread.
Connections to the server will still create new threads.
@param address The server address or {@code null} for a local address
@param port The server port or {@code 0} to automatically allocate the port
@throws IOException When an error occurs while st... | [
"Starts",
"the",
"FTP",
"server",
"synchronously",
"blocking",
"the",
"current",
"thread",
"."
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L229-L238 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPServer.java | FTPServer.addConnection | protected void addConnection(Socket socket) throws IOException {
FTPConnection con = createConnection(socket);
synchronized(listeners) {
for(IFTPListener l : listeners) {
l.onConnected(con);
}
}
synchronized(connections) {
connections.... | java | protected void addConnection(Socket socket) throws IOException {
FTPConnection con = createConnection(socket);
synchronized(listeners) {
for(IFTPListener l : listeners) {
l.onConnected(con);
}
}
synchronized(connections) {
connections.... | [
"protected",
"void",
"addConnection",
"(",
"Socket",
"socket",
")",
"throws",
"IOException",
"{",
"FTPConnection",
"con",
"=",
"createConnection",
"(",
"socket",
")",
";",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"IFTPListener",
"l",
":",
"liste... | Called when a connection is created.
@param socket The connection socket
@throws IOException When an error occurs | [
"Called",
"when",
"a",
"connection",
"is",
"created",
"."
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L270-L281 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPServer.java | FTPServer.removeConnection | protected void removeConnection(FTPConnection con) throws IOException {
synchronized(listeners) {
for(IFTPListener l : listeners) {
l.onDisconnected(con);
}
}
synchronized(connections) {
connections.remove(con);
}
} | java | protected void removeConnection(FTPConnection con) throws IOException {
synchronized(listeners) {
for(IFTPListener l : listeners) {
l.onDisconnected(con);
}
}
synchronized(connections) {
connections.remove(con);
}
} | [
"protected",
"void",
"removeConnection",
"(",
"FTPConnection",
"con",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"listeners",
")",
"{",
"for",
"(",
"IFTPListener",
"l",
":",
"listeners",
")",
"{",
"l",
".",
"onDisconnected",
"(",
"con",
")",
";"... | Called when a connection is terminated
@param con The FTP connection
@throws IOException When an error occurs | [
"Called",
"when",
"a",
"connection",
"is",
"terminated"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L288-L297 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPServer.java | FTPServer.dispose | protected void dispose() {
// Terminates the server thread
if(serverThread != null) {
serverThread.interrupt();
serverThread = null;
}
// Stops each connection and clears them
synchronized(connections) {
for(FTPConnection con : connections) {
... | java | protected void dispose() {
// Terminates the server thread
if(serverThread != null) {
serverThread.interrupt();
serverThread = null;
}
// Stops each connection and clears them
synchronized(connections) {
for(FTPConnection con : connections) {
... | [
"protected",
"void",
"dispose",
"(",
")",
"{",
"// Terminates the server thread",
"if",
"(",
"serverThread",
"!=",
"null",
")",
"{",
"serverThread",
".",
"interrupt",
"(",
")",
";",
"serverThread",
"=",
"null",
";",
"}",
"// Stops each connection and clears them",
... | Starts disposing server resources.
For a complete cleanup, use {@link #close()} instead | [
"Starts",
"disposing",
"server",
"resources",
"."
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L304-L322 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPServer.java | FTPServer.close | @Override
public void close() throws IOException {
dispose();
if(socket != null) {
socket.close();
socket = null;
}
} | java | @Override
public void close() throws IOException {
dispose();
if(socket != null) {
socket.close();
socket = null;
}
} | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"dispose",
"(",
")",
";",
"if",
"(",
"socket",
"!=",
"null",
")",
"{",
"socket",
".",
"close",
"(",
")",
";",
"socket",
"=",
"null",
";",
"}",
"}"
] | Stops the server and dispose its resources.
@throws IOException When an I/O error occurs | [
"Stops",
"the",
"server",
"and",
"dispose",
"its",
"resources",
"."
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPServer.java#L328-L336 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.sendResponse | public void sendResponse(int code, String response) {
if(con.isClosed()) return;
if(response == null || response.isEmpty()) {
response = "Unknown";
}
try {
if(response.charAt(0) == '-') {
writer.write(code + response + "\r\n");
} else... | java | public void sendResponse(int code, String response) {
if(con.isClosed()) return;
if(response == null || response.isEmpty()) {
response = "Unknown";
}
try {
if(response.charAt(0) == '-') {
writer.write(code + response + "\r\n");
} else... | [
"public",
"void",
"sendResponse",
"(",
"int",
"code",
",",
"String",
"response",
")",
"{",
"if",
"(",
"con",
".",
"isClosed",
"(",
")",
")",
"return",
";",
"if",
"(",
"response",
"==",
"null",
"||",
"response",
".",
"isEmpty",
"(",
")",
")",
"{",
"... | Sends a response to the connection
@param code The response code
@param response The response message | [
"Sends",
"a",
"response",
"to",
"the",
"connection"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L211-L229 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.sendData | public void sendData(byte[] data) throws ResponseException {
if(con.isClosed()) return;
Socket socket = null;
try {
socket = conHandler.createDataSocket();
dataConnections.add(socket);
OutputStream out = socket.getOutputStream();
Utils.write(out,... | java | public void sendData(byte[] data) throws ResponseException {
if(con.isClosed()) return;
Socket socket = null;
try {
socket = conHandler.createDataSocket();
dataConnections.add(socket);
OutputStream out = socket.getOutputStream();
Utils.write(out,... | [
"public",
"void",
"sendData",
"(",
"byte",
"[",
"]",
"data",
")",
"throws",
"ResponseException",
"{",
"if",
"(",
"con",
".",
"isClosed",
"(",
")",
")",
"return",
";",
"Socket",
"socket",
"=",
"null",
";",
"try",
"{",
"socket",
"=",
"conHandler",
".",
... | Sends an array of bytes through a data connection
@param data The data to be sent
@throws ResponseException When an error occurs | [
"Sends",
"an",
"array",
"of",
"bytes",
"through",
"a",
"data",
"connection"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L236-L259 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.sendData | public void sendData(InputStream in) throws ResponseException {
if(con.isClosed()) return;
Socket socket = null;
try {
socket = conHandler.createDataSocket();
dataConnections.add(socket);
OutputStream out = socket.getOutputStream();
byte[] buffer... | java | public void sendData(InputStream in) throws ResponseException {
if(con.isClosed()) return;
Socket socket = null;
try {
socket = conHandler.createDataSocket();
dataConnections.add(socket);
OutputStream out = socket.getOutputStream();
byte[] buffer... | [
"public",
"void",
"sendData",
"(",
"InputStream",
"in",
")",
"throws",
"ResponseException",
"{",
"if",
"(",
"con",
".",
"isClosed",
"(",
")",
")",
"return",
";",
"Socket",
"socket",
"=",
"null",
";",
"try",
"{",
"socket",
"=",
"conHandler",
".",
"createD... | Sends a stream through a data connection
@param in The input stream
@throws ResponseException When an error occurs | [
"Sends",
"a",
"stream",
"through",
"a",
"data",
"connection"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L266-L294 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.abortDataTransfers | public void abortDataTransfers() {
while(!dataConnections.isEmpty()) {
Socket socket = dataConnections.poll();
if(socket != null) Utils.closeQuietly(socket);
}
} | java | public void abortDataTransfers() {
while(!dataConnections.isEmpty()) {
Socket socket = dataConnections.poll();
if(socket != null) Utils.closeQuietly(socket);
}
} | [
"public",
"void",
"abortDataTransfers",
"(",
")",
"{",
"while",
"(",
"!",
"dataConnections",
".",
"isEmpty",
"(",
")",
")",
"{",
"Socket",
"socket",
"=",
"dataConnections",
".",
"poll",
"(",
")",
";",
"if",
"(",
"socket",
"!=",
"null",
")",
"Utils",
".... | Aborts all data transfers | [
"Aborts",
"all",
"data",
"transfers"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L334-L339 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.registerOption | public void registerOption(String option, String value) {
options.put(option.toUpperCase(), value);
} | java | public void registerOption(String option, String value) {
options.put(option.toUpperCase(), value);
} | [
"public",
"void",
"registerOption",
"(",
"String",
"option",
",",
"String",
"value",
")",
"{",
"options",
".",
"put",
"(",
"option",
".",
"toUpperCase",
"(",
")",
",",
"value",
")",
";",
"}"
] | Registers an option for the OPTS command
@param option The option name
@param value The default value | [
"Registers",
"an",
"option",
"for",
"the",
"OPTS",
"command"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L356-L358 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.addSiteCommand | protected void addSiteCommand(String label, String help, Command cmd) {
siteCommands.put(label.toUpperCase(), new CommandInfo(cmd, help, true));
} | java | protected void addSiteCommand(String label, String help, Command cmd) {
siteCommands.put(label.toUpperCase(), new CommandInfo(cmd, help, true));
} | [
"protected",
"void",
"addSiteCommand",
"(",
"String",
"label",
",",
"String",
"help",
",",
"Command",
"cmd",
")",
"{",
"siteCommands",
".",
"put",
"(",
"label",
".",
"toUpperCase",
"(",
")",
",",
"new",
"CommandInfo",
"(",
"cmd",
",",
"help",
",",
"true"... | Internally registers a SITE sub-command
@param label The command name
@param help The help message
@param cmd The command function | [
"Internally",
"registers",
"a",
"SITE",
"sub",
"-",
"command"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L411-L413 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.addCommand | protected void addCommand(String label, String help, Command cmd, boolean needsAuth) {
commands.put(label.toUpperCase(), new CommandInfo(cmd, help, needsAuth));
} | java | protected void addCommand(String label, String help, Command cmd, boolean needsAuth) {
commands.put(label.toUpperCase(), new CommandInfo(cmd, help, needsAuth));
} | [
"protected",
"void",
"addCommand",
"(",
"String",
"label",
",",
"String",
"help",
",",
"Command",
"cmd",
",",
"boolean",
"needsAuth",
")",
"{",
"commands",
".",
"put",
"(",
"label",
".",
"toUpperCase",
"(",
")",
",",
"new",
"CommandInfo",
"(",
"cmd",
","... | Internally registers a command
@param label The command name
@param help The help message
@param cmd The command function
@param needsAuth Whether authentication is required to run this command | [
"Internally",
"registers",
"a",
"command"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L422-L424 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.getSiteHelpMessage | public String getSiteHelpMessage(String label) {
CommandInfo info = siteCommands.get(label);
return info != null ? info.help : null;
} | java | public String getSiteHelpMessage(String label) {
CommandInfo info = siteCommands.get(label);
return info != null ? info.help : null;
} | [
"public",
"String",
"getSiteHelpMessage",
"(",
"String",
"label",
")",
"{",
"CommandInfo",
"info",
"=",
"siteCommands",
".",
"get",
"(",
"label",
")",
";",
"return",
"info",
"!=",
"null",
"?",
"info",
".",
"help",
":",
"null",
";",
"}"
] | Gets the help message from a SITE command
@param label The command name
@return The help message or {@code null} if the command was not found | [
"Gets",
"the",
"help",
"message",
"from",
"a",
"SITE",
"command"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L431-L434 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.getHelpMessage | public String getHelpMessage(String label) {
CommandInfo info = commands.get(label);
return info != null ? info.help : null;
} | java | public String getHelpMessage(String label) {
CommandInfo info = commands.get(label);
return info != null ? info.help : null;
} | [
"public",
"String",
"getHelpMessage",
"(",
"String",
"label",
")",
"{",
"CommandInfo",
"info",
"=",
"commands",
".",
"get",
"(",
"label",
")",
";",
"return",
"info",
"!=",
"null",
"?",
"info",
".",
"help",
":",
"null",
";",
"}"
] | Gets the help message from a command
@param label The command name
@return The help message or {@code null} if the command was not found | [
"Gets",
"the",
"help",
"message",
"from",
"a",
"command"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L441-L444 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.update | protected void update() {
if(conHandler.shouldStop()) {
Utils.closeQuietly(this);
return;
}
String line;
try {
line = reader.readLine();
} catch(SocketTimeoutException ex) {
// Check if the socket has timed out
if(!dat... | java | protected void update() {
if(conHandler.shouldStop()) {
Utils.closeQuietly(this);
return;
}
String line;
try {
line = reader.readLine();
} catch(SocketTimeoutException ex) {
// Check if the socket has timed out
if(!dat... | [
"protected",
"void",
"update",
"(",
")",
"{",
"if",
"(",
"conHandler",
".",
"shouldStop",
"(",
")",
")",
"{",
"Utils",
".",
"closeQuietly",
"(",
"this",
")",
";",
"return",
";",
"}",
"String",
"line",
";",
"try",
"{",
"line",
"=",
"reader",
".",
"r... | Updates the connection | [
"Updates",
"the",
"connection"
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L550-L578 | train |
Guichaguri/MinimalFTP | src/main/java/com/guichaguri/minimalftp/FTPConnection.java | FTPConnection.stop | protected void stop(boolean close) throws IOException {
if(!thread.isInterrupted()) {
thread.interrupt();
}
conHandler.onDisconnected();
if(close) con.close();
} | java | protected void stop(boolean close) throws IOException {
if(!thread.isInterrupted()) {
thread.interrupt();
}
conHandler.onDisconnected();
if(close) con.close();
} | [
"protected",
"void",
"stop",
"(",
"boolean",
"close",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"thread",
".",
"isInterrupted",
"(",
")",
")",
"{",
"thread",
".",
"interrupt",
"(",
")",
";",
"}",
"conHandler",
".",
"onDisconnected",
"(",
")",
... | Stops the connection, but does not removes it from the list.
For a complete cleanup, use {@link #close()} instead
@param close Whether it will close the connection
@throws IOException When an I/O error occurs | [
"Stops",
"the",
"connection",
"but",
"does",
"not",
"removes",
"it",
"from",
"the",
"list",
"."
] | ddd81e26ec88079ee4c37fe53d8efe420996e9b1 | https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L587-L595 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/osgi/DependencyEmbedder.java | DependencyEmbedder.generate | public Properties generate(Properties instructions, ProjectDependencies dependencies) {
Properties result = new Properties();
result.putAll(instructions);
StringBuilder include = new StringBuilder();
if (instructions.getProperty(Constants.INCLUDE_RESOURCE) != null) {
include.... | java | public Properties generate(Properties instructions, ProjectDependencies dependencies) {
Properties result = new Properties();
result.putAll(instructions);
StringBuilder include = new StringBuilder();
if (instructions.getProperty(Constants.INCLUDE_RESOURCE) != null) {
include.... | [
"public",
"Properties",
"generate",
"(",
"Properties",
"instructions",
",",
"ProjectDependencies",
"dependencies",
")",
"{",
"Properties",
"result",
"=",
"new",
"Properties",
"(",
")",
";",
"result",
".",
"putAll",
"(",
"instructions",
")",
";",
"StringBuilder",
... | Generates the new set of instruction containing the original set of instructions enhanced with the embed
dependencies results.
@param instructions the current set of instructions
@param dependencies the project's dependencies
@return the final set of instructions | [
"Generates",
"the",
"new",
"set",
"of",
"instruction",
"containing",
"the",
"original",
"set",
"of",
"instructions",
"enhanced",
"with",
"the",
"embed",
"dependencies",
"results",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/osgi/DependencyEmbedder.java#L160-L191 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/WatcherUtils.java | WatcherUtils.isInDirectory | public static boolean isInDirectory(File file, File directory) {
try {
return FilenameUtils.directoryContains(directory.getCanonicalPath(), file.getCanonicalPath());
} catch (IOException e) { //NOSONAR
return false;
}
} | java | public static boolean isInDirectory(File file, File directory) {
try {
return FilenameUtils.directoryContains(directory.getCanonicalPath(), file.getCanonicalPath());
} catch (IOException e) { //NOSONAR
return false;
}
} | [
"public",
"static",
"boolean",
"isInDirectory",
"(",
"File",
"file",
",",
"File",
"directory",
")",
"{",
"try",
"{",
"return",
"FilenameUtils",
".",
"directoryContains",
"(",
"directory",
".",
"getCanonicalPath",
"(",
")",
",",
"file",
".",
"getCanonicalPath",
... | Checks whether the given file is inside the given directory.
@param file the file
@param directory the directory
@return {@literal true} if the file is in the directory (or any subdirectories), {@literal false} otherwise. | [
"Checks",
"whether",
"the",
"given",
"file",
"is",
"inside",
"the",
"given",
"directory",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/WatcherUtils.java#L44-L50 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/WatcherUtils.java | WatcherUtils.hasExtension | public static boolean hasExtension(File file, String... extensions) {
String extension = FilenameUtils.getExtension(file.getName());
for (String s : extensions) {
if (extension.equalsIgnoreCase(s) || ("." + extension).equalsIgnoreCase(s)) {
return true;
}
... | java | public static boolean hasExtension(File file, String... extensions) {
String extension = FilenameUtils.getExtension(file.getName());
for (String s : extensions) {
if (extension.equalsIgnoreCase(s) || ("." + extension).equalsIgnoreCase(s)) {
return true;
}
... | [
"public",
"static",
"boolean",
"hasExtension",
"(",
"File",
"file",
",",
"String",
"...",
"extensions",
")",
"{",
"String",
"extension",
"=",
"FilenameUtils",
".",
"getExtension",
"(",
"file",
".",
"getName",
"(",
")",
")",
";",
"for",
"(",
"String",
"s",
... | Checks whether the given file has one of the given extension.
@param file the file
@param extensions the extensions
@return {@literal true} if the file has one of the given extension, {@literal false} otherwise | [
"Checks",
"whether",
"the",
"given",
"file",
"has",
"one",
"of",
"the",
"given",
"extension",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/WatcherUtils.java#L159-L167 | train |
wisdom-framework/wisdom | documentation/documentation/src/main/java/controllers/Documentation.java | Documentation.routes | @Override
public List<org.wisdom.api.router.Route> routes() {
// If documentation.standalone is not set to false, register a route on /
if (configuration.getBooleanWithDefault("documentation.standalone", true)) {
return ImmutableList.of(new RouteBuilder().route(HttpMethod.GET).on("/").to... | java | @Override
public List<org.wisdom.api.router.Route> routes() {
// If documentation.standalone is not set to false, register a route on /
if (configuration.getBooleanWithDefault("documentation.standalone", true)) {
return ImmutableList.of(new RouteBuilder().route(HttpMethod.GET).on("/").to... | [
"@",
"Override",
"public",
"List",
"<",
"org",
".",
"wisdom",
".",
"api",
".",
"router",
".",
"Route",
">",
"routes",
"(",
")",
"{",
"// If documentation.standalone is not set to false, register a route on /",
"if",
"(",
"configuration",
".",
"getBooleanWithDefault",
... | Default implementation of the routes method.
@return an empty list. The router must also check for the {@link org.wisdom.api.annotations
.Route} annotations. | [
"Default",
"implementation",
"of",
"the",
"routes",
"method",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/documentation/documentation/src/main/java/controllers/Documentation.java#L57-L65 | train |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java | ExtractUtil.extractResponseCodes | public static List<String> extractResponseCodes(JavadocComment jdoc){
List<String> list = new ArrayList<>();
list.addAll(extractDocAnnotation(DOC_RESPONSE_CODE,jdoc));
return list;
} | java | public static List<String> extractResponseCodes(JavadocComment jdoc){
List<String> list = new ArrayList<>();
list.addAll(extractDocAnnotation(DOC_RESPONSE_CODE,jdoc));
return list;
} | [
"public",
"static",
"List",
"<",
"String",
">",
"extractResponseCodes",
"(",
"JavadocComment",
"jdoc",
")",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"list",
".",
"addAll",
"(",
"extractDocAnnotation",
"(",
"DOC... | Return the response codes as String from a JavaDoc comment block.
@param jdoc The javadoc block comment.
@return the response codes as String | [
"Return",
"the",
"response",
"codes",
"as",
"String",
"from",
"a",
"JavaDoc",
"comment",
"block",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java#L183-L188 | train |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java | ExtractUtil.extractResponseDescription | public static List<String> extractResponseDescription(JavadocComment jdoc){
List<String> list = new ArrayList<>();
list.addAll(extractDocAnnotation(DOC_RESPONSE_DESCRIPTION,jdoc));
return list;
} | java | public static List<String> extractResponseDescription(JavadocComment jdoc){
List<String> list = new ArrayList<>();
list.addAll(extractDocAnnotation(DOC_RESPONSE_DESCRIPTION,jdoc));
return list;
} | [
"public",
"static",
"List",
"<",
"String",
">",
"extractResponseDescription",
"(",
"JavadocComment",
"jdoc",
")",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"list",
".",
"addAll",
"(",
"extractDocAnnotation",
"(",
... | Return the response descriptions as String from a JavaDoc comment block.
@param jdoc The javadoc block comment.
@return the response descriptions as String | [
"Return",
"the",
"response",
"descriptions",
"as",
"String",
"from",
"a",
"JavaDoc",
"comment",
"block",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java#L196-L201 | train |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java | ExtractUtil.extractResponseBodies | public static List<String> extractResponseBodies(JavadocComment jdoc){
List<String> list = new ArrayList<>();
list.addAll(extractDocAnnotation(DOC_RESPONSE_BODY,jdoc));
return list;
} | java | public static List<String> extractResponseBodies(JavadocComment jdoc){
List<String> list = new ArrayList<>();
list.addAll(extractDocAnnotation(DOC_RESPONSE_BODY,jdoc));
return list;
} | [
"public",
"static",
"List",
"<",
"String",
">",
"extractResponseBodies",
"(",
"JavadocComment",
"jdoc",
")",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"list",
".",
"addAll",
"(",
"extractDocAnnotation",
"(",
"DO... | Return the response bodies as String from a JavaDoc comment block.
@param jdoc The javadoc block comment.
@return the response bodies as String | [
"Return",
"the",
"response",
"bodies",
"as",
"String",
"from",
"a",
"JavaDoc",
"comment",
"block",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java#L209-L214 | train |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java | ExtractUtil.extractDescription | public static String extractDescription(JavadocComment jdoc){
String content = jdoc.getContent().replaceAll("\n[ \t]+\\* ?","\n"); //remove the * at the beginning of a line
int end = content.indexOf("\n@"); //look for the first annotation
//The first charater is always a new line
if(en... | java | public static String extractDescription(JavadocComment jdoc){
String content = jdoc.getContent().replaceAll("\n[ \t]+\\* ?","\n"); //remove the * at the beginning of a line
int end = content.indexOf("\n@"); //look for the first annotation
//The first charater is always a new line
if(en... | [
"public",
"static",
"String",
"extractDescription",
"(",
"JavadocComment",
"jdoc",
")",
"{",
"String",
"content",
"=",
"jdoc",
".",
"getContent",
"(",
")",
".",
"replaceAll",
"(",
"\"\\n[ \\t]+\\\\* ?\"",
",",
"\"\\n\"",
")",
";",
"//remove the * at the beginning of... | Get a text description from JavaDoc block comment.
@param jdoc the javadoc block comment.
@return The description as String. | [
"Get",
"a",
"text",
"description",
"from",
"JavaDoc",
"block",
"comment",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/util/ExtractUtil.java#L222-L233 | train |
wisdom-framework/wisdom | framework/hibernate-validation-service/src/main/java/org/wisdom/validation/hibernate/HibernateValidatorModule.java | HibernateValidatorModule.version | public final Version version() {
return new Version(bundle.getVersion().getMajor(), bundle.getVersion().getMinor(),
bundle.getVersion().getMicro(), null, null, null);
} | java | public final Version version() {
return new Version(bundle.getVersion().getMajor(), bundle.getVersion().getMinor(),
bundle.getVersion().getMicro(), null, null, null);
} | [
"public",
"final",
"Version",
"version",
"(",
")",
"{",
"return",
"new",
"Version",
"(",
"bundle",
".",
"getVersion",
"(",
")",
".",
"getMajor",
"(",
")",
",",
"bundle",
".",
"getVersion",
"(",
")",
".",
"getMinor",
"(",
")",
",",
"bundle",
".",
"get... | Retrieves the version from the bundle version.
@return the version | [
"Retrieves",
"the",
"version",
"from",
"the",
"bundle",
"version",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/hibernate-validation-service/src/main/java/org/wisdom/validation/hibernate/HibernateValidatorModule.java#L71-L74 | train |
wisdom-framework/wisdom | core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java | CookieHelper.convertWisdomCookieToNettyCookie | public static DefaultCookie convertWisdomCookieToNettyCookie(Cookie cookie) {
DefaultCookie nettyCookie = new DefaultCookie(cookie.name(), cookie.value());
nettyCookie.setMaxAge(cookie.maxAge());
// Comments are not supported anymore by netty.
if (cookie.domain() != null) {
n... | java | public static DefaultCookie convertWisdomCookieToNettyCookie(Cookie cookie) {
DefaultCookie nettyCookie = new DefaultCookie(cookie.name(), cookie.value());
nettyCookie.setMaxAge(cookie.maxAge());
// Comments are not supported anymore by netty.
if (cookie.domain() != null) {
n... | [
"public",
"static",
"DefaultCookie",
"convertWisdomCookieToNettyCookie",
"(",
"Cookie",
"cookie",
")",
"{",
"DefaultCookie",
"nettyCookie",
"=",
"new",
"DefaultCookie",
"(",
"cookie",
".",
"name",
"(",
")",
",",
"cookie",
".",
"value",
"(",
")",
")",
";",
"net... | Converts the Wisdom's cookie to a Netty's cookie.
@param cookie the Wisdom's cookie
@return the Netty's cookie with the same metadata and content than the input cookie. | [
"Converts",
"the",
"Wisdom",
"s",
"cookie",
"to",
"a",
"Netty",
"s",
"cookie",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java#L44-L61 | train |
wisdom-framework/wisdom | core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java | CookieHelper.convertNettyCookieToWisdomCookie | public static Cookie convertNettyCookieToWisdomCookie(DefaultCookie cookie) {
Preconditions.checkNotNull(cookie);
String value = cookie.value();
// // Netty append some data at the end f the cookie:
// // -createdBy=wisdom&at=3+nov.+2013+11%3A52%3A15&___TS=1383475935779, path=/, maxAge=360... | java | public static Cookie convertNettyCookieToWisdomCookie(DefaultCookie cookie) {
Preconditions.checkNotNull(cookie);
String value = cookie.value();
// // Netty append some data at the end f the cookie:
// // -createdBy=wisdom&at=3+nov.+2013+11%3A52%3A15&___TS=1383475935779, path=/, maxAge=360... | [
"public",
"static",
"Cookie",
"convertNettyCookieToWisdomCookie",
"(",
"DefaultCookie",
"cookie",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"cookie",
")",
";",
"String",
"value",
"=",
"cookie",
".",
"value",
"(",
")",
";",
"// // Netty append some ... | Converts the Netty's cookie to a Wisdom's cookie.
@param cookie the Netty's cookie
@return the Wisdom's cookie with the same metadata and content than the input cookie. | [
"Converts",
"the",
"Netty",
"s",
"cookie",
"to",
"a",
"Wisdom",
"s",
"cookie",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java#L69-L98 | train |
wisdom-framework/wisdom | core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java | CookieHelper.getCookieValue | public static String getCookieValue(String name, Cookies cookies) {
Cookie c = cookies.get(name);
if (c != null) {
return c.value();
}
return null;
} | java | public static String getCookieValue(String name, Cookies cookies) {
Cookie c = cookies.get(name);
if (c != null) {
return c.value();
}
return null;
} | [
"public",
"static",
"String",
"getCookieValue",
"(",
"String",
"name",
",",
"Cookies",
"cookies",
")",
"{",
"Cookie",
"c",
"=",
"cookies",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"return",
"c",
".",
"value",
"(",
... | Gets the value of the cookie having the given name. The cookie is looked from the given cookies set.
@param name the name of the cookie
@param cookies the set of cookie
@return the value of the cookie, {@literal null} if there are no cookie with the given name in the cookies set. | [
"Gets",
"the",
"value",
"of",
"the",
"cookie",
"having",
"the",
"given",
"name",
".",
"The",
"cookie",
"is",
"looked",
"from",
"the",
"given",
"cookies",
"set",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/cookies/CookieHelper.java#L107-L113 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/ApplicationSecretGenerator.java | ApplicationSecretGenerator.ensureOrGenerateSecret | public static void ensureOrGenerateSecret(MavenProject project, Log log) throws IOException {
File conf = new File(project.getBasedir(), "src/main/configuration/application.conf");
if (conf.isFile()) {
List<String> lines = FileUtils.readLines(conf);
boolean changed = false;
... | java | public static void ensureOrGenerateSecret(MavenProject project, Log log) throws IOException {
File conf = new File(project.getBasedir(), "src/main/configuration/application.conf");
if (conf.isFile()) {
List<String> lines = FileUtils.readLines(conf);
boolean changed = false;
... | [
"public",
"static",
"void",
"ensureOrGenerateSecret",
"(",
"MavenProject",
"project",
",",
"Log",
"log",
")",
"throws",
"IOException",
"{",
"File",
"conf",
"=",
"new",
"File",
"(",
"project",
".",
"getBasedir",
"(",
")",
",",
"\"src/main/configuration/application.... | Checks whether the application configuration file as the application secret.
If not generates one.
@param project the Maven Project
@param log the logger
@throws java.io.IOException if the application file cannot be read, or rewritten | [
"Checks",
"whether",
"the",
"application",
"configuration",
"file",
"as",
"the",
"application",
"secret",
".",
"If",
"not",
"generates",
"one",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/ApplicationSecretGenerator.java#L78-L110 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/PluginExtractor.java | PluginExtractor.getBuildPluginVersion | public static String getBuildPluginVersion(AbstractWisdomMojo mojo, String plugin) {
List<Plugin> plugins = mojo.project.getBuildPlugins();
for (Plugin plug : plugins) {
if (plug.getArtifactId().equals(plugin)) {
return plug.getVersion();
}
}
// No... | java | public static String getBuildPluginVersion(AbstractWisdomMojo mojo, String plugin) {
List<Plugin> plugins = mojo.project.getBuildPlugins();
for (Plugin plug : plugins) {
if (plug.getArtifactId().equals(plugin)) {
return plug.getVersion();
}
}
// No... | [
"public",
"static",
"String",
"getBuildPluginVersion",
"(",
"AbstractWisdomMojo",
"mojo",
",",
"String",
"plugin",
")",
"{",
"List",
"<",
"Plugin",
">",
"plugins",
"=",
"mojo",
".",
"project",
".",
"getBuildPlugins",
"(",
")",
";",
"for",
"(",
"Plugin",
"plu... | Retrieves the plugin version from Maven Project.
@param mojo the mojo
@param plugin the artifact id of the plugin
@return the version, {@code null} if the Maven Project does not used the given plugin | [
"Retrieves",
"the",
"plugin",
"version",
"from",
"Maven",
"Project",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/PluginExtractor.java#L43-L52 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/PluginExtractor.java | PluginExtractor.getBuildPluginConfiguration | public static Xpp3Dom getBuildPluginConfiguration(AbstractWisdomMojo mojo, String artifactId, String goal) {
List<Plugin> plugins = mojo.project.getBuildPlugins();
Plugin plugin = null;
for (Plugin plug : plugins) {
if (plug.getArtifactId().equals(artifactId)) {
plug... | java | public static Xpp3Dom getBuildPluginConfiguration(AbstractWisdomMojo mojo, String artifactId, String goal) {
List<Plugin> plugins = mojo.project.getBuildPlugins();
Plugin plugin = null;
for (Plugin plug : plugins) {
if (plug.getArtifactId().equals(artifactId)) {
plug... | [
"public",
"static",
"Xpp3Dom",
"getBuildPluginConfiguration",
"(",
"AbstractWisdomMojo",
"mojo",
",",
"String",
"artifactId",
",",
"String",
"goal",
")",
"{",
"List",
"<",
"Plugin",
">",
"plugins",
"=",
"mojo",
".",
"project",
".",
"getBuildPlugins",
"(",
")",
... | Retrieves the main configuration of the given plugin from the Maven Project.
@param mojo the mojo
@param artifactId the artifact id of the plugin
@param goal an optional goal. If set if first check for a specific configuration executing this
goal, if not found, it returns the global configuration
@return t... | [
"Retrieves",
"the",
"main",
"configuration",
"of",
"the",
"given",
"plugin",
"from",
"the",
"Maven",
"Project",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/PluginExtractor.java#L63-L93 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/InitializeMojo.java | InitializeMojo.clearPipelineError | private void clearPipelineError() {
File dir = new File(buildDirectory, "pipeline");
if (dir.isDirectory()) {
try {
FileUtils.cleanDirectory(dir);
} catch (IOException e) {
getLog().warn("Cannot clean the pipeline directory", e);
}
... | java | private void clearPipelineError() {
File dir = new File(buildDirectory, "pipeline");
if (dir.isDirectory()) {
try {
FileUtils.cleanDirectory(dir);
} catch (IOException e) {
getLog().warn("Cannot clean the pipeline directory", e);
}
... | [
"private",
"void",
"clearPipelineError",
"(",
")",
"{",
"File",
"dir",
"=",
"new",
"File",
"(",
"buildDirectory",
",",
"\"pipeline\"",
")",
";",
"if",
"(",
"dir",
".",
"isDirectory",
"(",
")",
")",
"{",
"try",
"{",
"FileUtils",
".",
"cleanDirectory",
"("... | Deletes all error report from the pipeline error directory. | [
"Deletes",
"all",
"error",
"report",
"from",
"the",
"pipeline",
"error",
"directory",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/InitializeMojo.java#L190-L199 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/osgi/Classpath.java | Classpath.store | public static void store(MavenProject project) throws IOException {
final File output = new File(project.getBasedir(), Constants.DEPENDENCIES_FILE);
output.getParentFile().mkdirs();
ProjectDependencies dependencies = new ProjectDependencies(project);
mapper.writer()
.with... | java | public static void store(MavenProject project) throws IOException {
final File output = new File(project.getBasedir(), Constants.DEPENDENCIES_FILE);
output.getParentFile().mkdirs();
ProjectDependencies dependencies = new ProjectDependencies(project);
mapper.writer()
.with... | [
"public",
"static",
"void",
"store",
"(",
"MavenProject",
"project",
")",
"throws",
"IOException",
"{",
"final",
"File",
"output",
"=",
"new",
"File",
"(",
"project",
".",
"getBasedir",
"(",
")",
",",
"Constants",
".",
"DEPENDENCIES_FILE",
")",
";",
"output"... | Stores the dependencies from the given project into the 'dependencies.json' file.
@param project the project
@throws IOException if the file cannot be created. | [
"Stores",
"the",
"dependencies",
"from",
"the",
"given",
"project",
"into",
"the",
"dependencies",
".",
"json",
"file",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/osgi/Classpath.java#L73-L83 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/osgi/Classpath.java | Classpath.load | public static ProjectDependencies load(File basedir) throws IOException {
return mapper.reader(ProjectDependencies.class)
.readValue(new File(basedir, Constants.DEPENDENCIES_FILE));
} | java | public static ProjectDependencies load(File basedir) throws IOException {
return mapper.reader(ProjectDependencies.class)
.readValue(new File(basedir, Constants.DEPENDENCIES_FILE));
} | [
"public",
"static",
"ProjectDependencies",
"load",
"(",
"File",
"basedir",
")",
"throws",
"IOException",
"{",
"return",
"mapper",
".",
"reader",
"(",
"ProjectDependencies",
".",
"class",
")",
".",
"readValue",
"(",
"new",
"File",
"(",
"basedir",
",",
"Constant... | Reloads the dependencies stored in the 'dependencies.json' file.
@param basedir the base directory
@return the list of artifacts.
@throws IOException if the file cannot be read. | [
"Reloads",
"the",
"dependencies",
"stored",
"in",
"the",
"dependencies",
".",
"json",
"file",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/osgi/Classpath.java#L92-L95 | train |
wisdom-framework/wisdom | core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DefensiveThreadFactory.java | DefensiveThreadFactory.newThread | @Override
public Thread newThread(final Runnable runnable) {
Runnable wrapped = new Runnable() {
@Override
public void run() {
try {
// As the runnable is wrapped in another runnable object, we call the run method directly.
runn... | java | @Override
public Thread newThread(final Runnable runnable) {
Runnable wrapped = new Runnable() {
@Override
public void run() {
try {
// As the runnable is wrapped in another runnable object, we call the run method directly.
runn... | [
"@",
"Override",
"public",
"Thread",
"newThread",
"(",
"final",
"Runnable",
"runnable",
")",
"{",
"Runnable",
"wrapped",
"=",
"new",
"Runnable",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"// As the runnable is wrappe... | Creates a new threads.
@param runnable the runnable, should not be {@literal null}.
@return the created thread. | [
"Creates",
"a",
"new",
"threads",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DefensiveThreadFactory.java#L53-L70 | train |
wisdom-framework/wisdom | extensions/wisdom-asciidoc-maven-plugin/src/main/java/org/wisdom/asciidoc/AsciidocMojo.java | AsciidocMojo.execute | public void execute()
throws MojoExecutionException {
if (! watch) {
removeFromWatching();
}
if (extensions == null || extensions.isEmpty()) {
extensions = ImmutableList.of("ad", "asciidoc", "adoc");
}
if (instance == null) {
ins... | java | public void execute()
throws MojoExecutionException {
if (! watch) {
removeFromWatching();
}
if (extensions == null || extensions.isEmpty()) {
extensions = ImmutableList.of("ad", "asciidoc", "adoc");
}
if (instance == null) {
ins... | [
"public",
"void",
"execute",
"(",
")",
"throws",
"MojoExecutionException",
"{",
"if",
"(",
"!",
"watch",
")",
"{",
"removeFromWatching",
"(",
")",
";",
"}",
"if",
"(",
"extensions",
"==",
"null",
"||",
"extensions",
".",
"isEmpty",
"(",
")",
")",
"{",
... | Compiles Asciidoc files from the internal and external assets to HTML.
@throws MojoExecutionException if the processing failed | [
"Compiles",
"Asciidoc",
"files",
"from",
"the",
"internal",
"and",
"external",
"assets",
"to",
"HTML",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-asciidoc-maven-plugin/src/main/java/org/wisdom/asciidoc/AsciidocMojo.java#L113-L186 | train |
wisdom-framework/wisdom | framework/i18n-service/src/main/java/org/wisdom/i18n/I18nController.java | I18nController.getBundleResourceForI18Next | @Route(method = HttpMethod.GET, uri = "i18n/bundles/{file<.+>}.json")
public Result getBundleResourceForI18Next(@QueryParameter("locales") String listOfLocales,
@HttpParameter(HeaderNames.IF_NONE_MATCH) String ifNoneMatch) {
// Parse the list of locale
L... | java | @Route(method = HttpMethod.GET, uri = "i18n/bundles/{file<.+>}.json")
public Result getBundleResourceForI18Next(@QueryParameter("locales") String listOfLocales,
@HttpParameter(HeaderNames.IF_NONE_MATCH) String ifNoneMatch) {
// Parse the list of locale
L... | [
"@",
"Route",
"(",
"method",
"=",
"HttpMethod",
".",
"GET",
",",
"uri",
"=",
"\"i18n/bundles/{file<.+>}.json\"",
")",
"public",
"Result",
"getBundleResourceForI18Next",
"(",
"@",
"QueryParameter",
"(",
"\"locales\"",
")",
"String",
"listOfLocales",
",",
"@",
"Http... | Gets the internationalized messages as a JSON document compliant with the I18Next format.
@param listOfLocales the list of locales
@param ifNoneMatch the received ETAG if any
@return the JSON document containing the messages | [
"Gets",
"the",
"internationalized",
"messages",
"as",
"a",
"JSON",
"document",
"compliant",
"with",
"the",
"I18Next",
"format",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/i18n-service/src/main/java/org/wisdom/i18n/I18nController.java#L98-L145 | train |
wisdom-framework/wisdom | framework/i18n-service/src/main/java/org/wisdom/i18n/I18nController.java | I18nController.getMessage | @Route(method = HttpMethod.GET, uri = "i18n/{key}")
public Result getMessage(@Parameter("key") String key, @QueryParameter("locale") Locale locale) {
String message;
if (locale != null && !locale.equals(InternationalizationService.DEFAULT_LOCALE)) {
message = service.get(locale, key);
... | java | @Route(method = HttpMethod.GET, uri = "i18n/{key}")
public Result getMessage(@Parameter("key") String key, @QueryParameter("locale") Locale locale) {
String message;
if (locale != null && !locale.equals(InternationalizationService.DEFAULT_LOCALE)) {
message = service.get(locale, key);
... | [
"@",
"Route",
"(",
"method",
"=",
"HttpMethod",
".",
"GET",
",",
"uri",
"=",
"\"i18n/{key}\"",
")",
"public",
"Result",
"getMessage",
"(",
"@",
"Parameter",
"(",
"\"key\"",
")",
"String",
"key",
",",
"@",
"QueryParameter",
"(",
"\"locale\"",
")",
"Locale",... | Gets a specific internationalized message.
@param key the key
@param locale the locale. If {@code null} if uses the first locale from the request.
@return the message as text, or {@code NOT FOUND} if the key cannot be found. | [
"Gets",
"a",
"specific",
"internationalized",
"message",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/i18n-service/src/main/java/org/wisdom/i18n/I18nController.java#L173-L187 | train |
wisdom-framework/wisdom | core/router/src/main/java/org/wisdom/router/DefaultWebSocketCallback.java | DefaultWebSocketCallback.check | public boolean check() {
if (!method.getReturnType().equals(Void.TYPE)) {
WebSocketRouter.getLogger().error("The method {} annotated with a web socket callback is not well-formed. " +
"These methods receive only parameter annotated with @Parameter and do not return anythi... | java | public boolean check() {
if (!method.getReturnType().equals(Void.TYPE)) {
WebSocketRouter.getLogger().error("The method {} annotated with a web socket callback is not well-formed. " +
"These methods receive only parameter annotated with @Parameter and do not return anythi... | [
"public",
"boolean",
"check",
"(",
")",
"{",
"if",
"(",
"!",
"method",
".",
"getReturnType",
"(",
")",
".",
"equals",
"(",
"Void",
".",
"TYPE",
")",
")",
"{",
"WebSocketRouter",
".",
"getLogger",
"(",
")",
".",
"error",
"(",
"\"The method {} annotated wi... | Checks that the callback is well-formed.
@return {@code true} if the callback is well-formed, {@code false} otherwise. | [
"Checks",
"that",
"the",
"callback",
"is",
"well",
"-",
"formed",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/router/src/main/java/org/wisdom/router/DefaultWebSocketCallback.java#L143-L159 | train |
wisdom-framework/wisdom | core/router/src/main/java/org/wisdom/router/DefaultWebSocketCallback.java | DefaultWebSocketCallback.invoke | public void invoke(String uri, String client, byte[] content) throws
InvocationTargetException,
IllegalAccessException {
Map<String, String> values = getPathParametersEncoded(uri);
Object[] parameters = new Object[arguments.size()];
for (int i = 0; i < arguments.size(); i... | java | public void invoke(String uri, String client, byte[] content) throws
InvocationTargetException,
IllegalAccessException {
Map<String, String> values = getPathParametersEncoded(uri);
Object[] parameters = new Object[arguments.size()];
for (int i = 0; i < arguments.size(); i... | [
"public",
"void",
"invoke",
"(",
"String",
"uri",
",",
"String",
"client",
",",
"byte",
"[",
"]",
"content",
")",
"throws",
"InvocationTargetException",
",",
"IllegalAccessException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"values",
"=",
"getPathParame... | Invokes the callback.
@param uri the uri
@param client the client identifier (the one having sent the message)
@param content the payload of the message
@throws InvocationTargetException when the callback throws an exception
@throws IllegalAccessException when the callback cannot be called | [
"Invokes",
"the",
"callback",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/router/src/main/java/org/wisdom/router/DefaultWebSocketCallback.java#L187-L207 | train |
wisdom-framework/wisdom | extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/terminal/WisitOutputStream.java | WisitOutputStream.publish | private void publish(String buffer){
CommandResult out = new CommandResult(myType);
out.setContent(buffer);
synchronized (lock) {
publisher.publish(topic, out.toString());
}
} | java | private void publish(String buffer){
CommandResult out = new CommandResult(myType);
out.setContent(buffer);
synchronized (lock) {
publisher.publish(topic, out.toString());
}
} | [
"private",
"void",
"publish",
"(",
"String",
"buffer",
")",
"{",
"CommandResult",
"out",
"=",
"new",
"CommandResult",
"(",
"myType",
")",
";",
"out",
".",
"setContent",
"(",
"buffer",
")",
";",
"synchronized",
"(",
"lock",
")",
"{",
"publisher",
".",
"pu... | Use the Publisher in order to broadcast the command result through the web-socket.
@param buffer the buffer in which data is written | [
"Use",
"the",
"Publisher",
"in",
"order",
"to",
"broadcast",
"the",
"command",
"result",
"through",
"the",
"web",
"-",
"socket",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/terminal/WisitOutputStream.java#L90-L98 | train |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/mojo/RamlCompilerMojo.java | RamlCompilerMojo.controllerParsed | @Override
public void controllerParsed(File source, ControllerModel<Raml> model) throws WatchingException {
Raml raml = new Raml(); //Create a new raml file
raml.setBaseUri(baseUri); //set the base uri
raml.setVersion(project().getVersion());
//Visit the controller model to populate... | java | @Override
public void controllerParsed(File source, ControllerModel<Raml> model) throws WatchingException {
Raml raml = new Raml(); //Create a new raml file
raml.setBaseUri(baseUri); //set the base uri
raml.setVersion(project().getVersion());
//Visit the controller model to populate... | [
"@",
"Override",
"public",
"void",
"controllerParsed",
"(",
"File",
"source",
",",
"ControllerModel",
"<",
"Raml",
">",
"model",
")",
"throws",
"WatchingException",
"{",
"Raml",
"raml",
"=",
"new",
"Raml",
"(",
")",
";",
"//Create a new raml file",
"raml",
"."... | Generate the raml file from a given controller source file.
@param source The controller source file.
@param model The controller model
@throws WatchingException If there is a problem while creating the raml file. | [
"Generate",
"the",
"raml",
"file",
"from",
"a",
"given",
"controller",
"source",
"file",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/mojo/RamlCompilerMojo.java#L85-L106 | train |
wisdom-framework/wisdom | extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/mojo/RamlCompilerMojo.java | RamlCompilerMojo.getRamlOutputFile | private File getRamlOutputFile(File input) {
String ramlFileName = input.getName().substring(0, input.getName().length() - 4) + "raml";
File outDir;
if (outputDirectory == null) {
outDir = new File(WatcherUtils.getExternalAssetsDestination(basedir), "raml");
} else {
... | java | private File getRamlOutputFile(File input) {
String ramlFileName = input.getName().substring(0, input.getName().length() - 4) + "raml";
File outDir;
if (outputDirectory == null) {
outDir = new File(WatcherUtils.getExternalAssetsDestination(basedir), "raml");
} else {
... | [
"private",
"File",
"getRamlOutputFile",
"(",
"File",
"input",
")",
"{",
"String",
"ramlFileName",
"=",
"input",
".",
"getName",
"(",
")",
".",
"substring",
"(",
"0",
",",
"input",
".",
"getName",
"(",
")",
".",
"length",
"(",
")",
"-",
"4",
")",
"+",... | Create the .raml file from the java source file.
@param input The java source file.
@return The File where the raml spec, for the given input, will be written. | [
"Create",
"the",
".",
"raml",
"file",
"from",
"the",
"java",
"source",
"file",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-raml-maven-plugin/src/main/java/org/wisdom/raml/mojo/RamlCompilerMojo.java#L124-L135 | train |
wisdom-framework/wisdom | extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/terminal/WisitSession.java | WisitSession.exec | public CommandResult exec(String commandLine) {
CommandResult result = new CommandResult(RESULT);
try {
Object raw = shellSession.execute(commandLine);
if(raw != null){
result.setContent(format(raw));
}
} catch (Exception e) { //NOSONAR
... | java | public CommandResult exec(String commandLine) {
CommandResult result = new CommandResult(RESULT);
try {
Object raw = shellSession.execute(commandLine);
if(raw != null){
result.setContent(format(raw));
}
} catch (Exception e) { //NOSONAR
... | [
"public",
"CommandResult",
"exec",
"(",
"String",
"commandLine",
")",
"{",
"CommandResult",
"result",
"=",
"new",
"CommandResult",
"(",
"RESULT",
")",
";",
"try",
"{",
"Object",
"raw",
"=",
"shellSession",
".",
"execute",
"(",
"commandLine",
")",
";",
"if",
... | Execute a command on the gogo shell.
@param commandLine The command to be executed.
@return The CommandResult | [
"Execute",
"a",
"command",
"on",
"the",
"gogo",
"shell",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/terminal/WisitSession.java#L71-L88 | train |
wisdom-framework/wisdom | extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/terminal/WisitSession.java | WisitSession.format | private String format(Object o) {
return shellSession.format(o, Converter.INSPECT).toString();
} | java | private String format(Object o) {
return shellSession.format(o, Converter.INSPECT).toString();
} | [
"private",
"String",
"format",
"(",
"Object",
"o",
")",
"{",
"return",
"shellSession",
".",
"format",
"(",
"o",
",",
"Converter",
".",
"INSPECT",
")",
".",
"toString",
"(",
")",
";",
"}"
] | Format the given object as a String.
@param o The raw object to be formatted
@return The formatted string version of the raw object. | [
"Format",
"the",
"given",
"object",
"as",
"a",
"String",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/terminal/WisitSession.java#L95-L97 | train |
wisdom-framework/wisdom | core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/file/MixedFileUpload.java | MixedFileUpload.checkSize | private void checkSize(long newSize, long maxSize, HttpServerFileUpload upload) {
if (maxSize >= 0 && newSize > maxSize) {
upload.handler(null);
report(new IllegalStateException("Size exceed allowed maximum capacity"));
}
} | java | private void checkSize(long newSize, long maxSize, HttpServerFileUpload upload) {
if (maxSize >= 0 && newSize > maxSize) {
upload.handler(null);
report(new IllegalStateException("Size exceed allowed maximum capacity"));
}
} | [
"private",
"void",
"checkSize",
"(",
"long",
"newSize",
",",
"long",
"maxSize",
",",
"HttpServerFileUpload",
"upload",
")",
"{",
"if",
"(",
"maxSize",
">=",
"0",
"&&",
"newSize",
">",
"maxSize",
")",
"{",
"upload",
".",
"handler",
"(",
"null",
")",
";",
... | Checks whether we exceed the max allowed file size.
@param newSize the expected size once the current chunk is consumed
@param maxSize the max allowed size.
@param upload the upload | [
"Checks",
"whether",
"we",
"exceed",
"the",
"max",
"allowed",
"file",
"size",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/file/MixedFileUpload.java#L98-L103 | train |
wisdom-framework/wisdom | framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java | ThymeleafTemplateCollector.updatedTemplate | public void updatedTemplate(Bundle bundle, File templateFile) {
ThymeLeafTemplateImplementation template = getTemplateByFile(templateFile);
if (template != null) {
LOGGER.debug("Thymeleaf template updated for {} ({})", templateFile.getAbsoluteFile(), template.fullName());
updated... | java | public void updatedTemplate(Bundle bundle, File templateFile) {
ThymeLeafTemplateImplementation template = getTemplateByFile(templateFile);
if (template != null) {
LOGGER.debug("Thymeleaf template updated for {} ({})", templateFile.getAbsoluteFile(), template.fullName());
updated... | [
"public",
"void",
"updatedTemplate",
"(",
"Bundle",
"bundle",
",",
"File",
"templateFile",
")",
"{",
"ThymeLeafTemplateImplementation",
"template",
"=",
"getTemplateByFile",
"(",
"templateFile",
")",
";",
"if",
"(",
"template",
"!=",
"null",
")",
"{",
"LOGGER",
... | Updates the template object using the given file as backend.
@param bundle the bundle containing the template, use system bundle for external templates.
@param templateFile the template file | [
"Updates",
"the",
"template",
"object",
"using",
"the",
"given",
"file",
"as",
"backend",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java#L125-L137 | train |
wisdom-framework/wisdom | framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java | ThymeleafTemplateCollector.getTemplateByFile | private ThymeLeafTemplateImplementation getTemplateByFile(File templateFile) {
try {
return getTemplateByURL(templateFile.toURI().toURL());
} catch (MalformedURLException e) { //NOSONAR
// Ignored.
}
return null;
} | java | private ThymeLeafTemplateImplementation getTemplateByFile(File templateFile) {
try {
return getTemplateByURL(templateFile.toURI().toURL());
} catch (MalformedURLException e) { //NOSONAR
// Ignored.
}
return null;
} | [
"private",
"ThymeLeafTemplateImplementation",
"getTemplateByFile",
"(",
"File",
"templateFile",
")",
"{",
"try",
"{",
"return",
"getTemplateByURL",
"(",
"templateFile",
".",
"toURI",
"(",
")",
".",
"toURL",
"(",
")",
")",
";",
"}",
"catch",
"(",
"MalformedURLExc... | Gets the template object using the given file as backend.
@param templateFile the file
@return the template object, {@literal null} if not found | [
"Gets",
"the",
"template",
"object",
"using",
"the",
"given",
"file",
"as",
"backend",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java#L145-L152 | train |
wisdom-framework/wisdom | framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java | ThymeleafTemplateCollector.getTemplateByURL | private ThymeLeafTemplateImplementation getTemplateByURL(URL url) {
Collection<ThymeLeafTemplateImplementation> list = registrations.keySet();
for (ThymeLeafTemplateImplementation template : list) {
if (template.getURL().sameFile(url)) {
return template;
}
... | java | private ThymeLeafTemplateImplementation getTemplateByURL(URL url) {
Collection<ThymeLeafTemplateImplementation> list = registrations.keySet();
for (ThymeLeafTemplateImplementation template : list) {
if (template.getURL().sameFile(url)) {
return template;
}
... | [
"private",
"ThymeLeafTemplateImplementation",
"getTemplateByURL",
"(",
"URL",
"url",
")",
"{",
"Collection",
"<",
"ThymeLeafTemplateImplementation",
">",
"list",
"=",
"registrations",
".",
"keySet",
"(",
")",
";",
"for",
"(",
"ThymeLeafTemplateImplementation",
"template... | Gets the template object using the given url as backend.
@param url the url
@return the template object, {@literal null} if not found | [
"Gets",
"the",
"template",
"object",
"using",
"the",
"given",
"url",
"as",
"backend",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java#L160-L168 | train |
wisdom-framework/wisdom | framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java | ThymeleafTemplateCollector.deleteTemplate | public void deleteTemplate(File templateFile) {
ThymeLeafTemplateImplementation template = getTemplateByFile(templateFile);
if (template != null) {
deleteTemplate(template);
}
} | java | public void deleteTemplate(File templateFile) {
ThymeLeafTemplateImplementation template = getTemplateByFile(templateFile);
if (template != null) {
deleteTemplate(template);
}
} | [
"public",
"void",
"deleteTemplate",
"(",
"File",
"templateFile",
")",
"{",
"ThymeLeafTemplateImplementation",
"template",
"=",
"getTemplateByFile",
"(",
"templateFile",
")",
";",
"if",
"(",
"template",
"!=",
"null",
")",
"{",
"deleteTemplate",
"(",
"template",
")"... | Deletes the template using the given file as backend.
@param templateFile the file | [
"Deletes",
"the",
"template",
"using",
"the",
"given",
"file",
"as",
"backend",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java#L175-L180 | train |
wisdom-framework/wisdom | framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java | ThymeleafTemplateCollector.addTemplate | public ThymeLeafTemplateImplementation addTemplate(Bundle bundle, URL templateURL) {
ThymeLeafTemplateImplementation template = getTemplateByURL(templateURL);
if (template != null) {
// Already existing.
return template;
}
synchronized (this) {
// need... | java | public ThymeLeafTemplateImplementation addTemplate(Bundle bundle, URL templateURL) {
ThymeLeafTemplateImplementation template = getTemplateByURL(templateURL);
if (template != null) {
// Already existing.
return template;
}
synchronized (this) {
// need... | [
"public",
"ThymeLeafTemplateImplementation",
"addTemplate",
"(",
"Bundle",
"bundle",
",",
"URL",
"templateURL",
")",
"{",
"ThymeLeafTemplateImplementation",
"template",
"=",
"getTemplateByURL",
"(",
"templateURL",
")",
";",
"if",
"(",
"template",
"!=",
"null",
")",
... | Adds a template form the given url.
@param bundle the bundle containing the template, use system bundle for external templates.
@param templateURL the url
@return the added template. IF the given url is already used by another template, return this other template. | [
"Adds",
"a",
"template",
"form",
"the",
"given",
"url",
"."
] | a35b6431200fec56b178c0ff60837ed73fd7874d | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/ThymeleafTemplateCollector.java#L189-L205 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.