id int32 0 165k | 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
150,400 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mod/ModConfigPanel.java | ModConfigPanel.setLoopValue | public void setLoopValue(int newLoopValue)
{
if (newLoopValue==Helpers.PLAYER_LOOP_DEACTIVATED)
{
getPlayerSetUp_fadeOutLoops().setSelected(false);
getPlayerSetUp_ignoreLoops().setSelected(false);
}
else
if (newLoopValue==Helpers.PLAYER_LOOP_FADEOUT)
{
getPlayerSetUp_fadeOutLoops().setSelected(tru... | java | public void setLoopValue(int newLoopValue)
{
if (newLoopValue==Helpers.PLAYER_LOOP_DEACTIVATED)
{
getPlayerSetUp_fadeOutLoops().setSelected(false);
getPlayerSetUp_ignoreLoops().setSelected(false);
}
else
if (newLoopValue==Helpers.PLAYER_LOOP_FADEOUT)
{
getPlayerSetUp_fadeOutLoops().setSelected(tru... | [
"public",
"void",
"setLoopValue",
"(",
"int",
"newLoopValue",
")",
"{",
"if",
"(",
"newLoopValue",
"==",
"Helpers",
".",
"PLAYER_LOOP_DEACTIVATED",
")",
"{",
"getPlayerSetUp_fadeOutLoops",
"(",
")",
".",
"setSelected",
"(",
"false",
")",
";",
"getPlayerSetUp_ignor... | Never ever call this Method from an event handler for those
two buttons - endless loop!
@param newLoopValue
@since 11.01.2012 | [
"Never",
"ever",
"call",
"this",
"Method",
"from",
"an",
"event",
"handler",
"for",
"those",
"two",
"buttons",
"-",
"endless",
"loop!"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/ModConfigPanel.java#L228-L247 |
150,401 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.removeTags | public void removeTags(int type) throws FileNotFoundException, IOException
{
RandomAccessFile raf = null;
try
{
raf = new RandomAccessFile(mp3File, "rw");
if (allow(type&ID3V1))
{
id3v1.removeTag(raf);
}
if (allow(type&ID3V2))
{
id3v2.removeTag(raf);
}
}
finally
{
if (raf !... | java | public void removeTags(int type) throws FileNotFoundException, IOException
{
RandomAccessFile raf = null;
try
{
raf = new RandomAccessFile(mp3File, "rw");
if (allow(type&ID3V1))
{
id3v1.removeTag(raf);
}
if (allow(type&ID3V2))
{
id3v2.removeTag(raf);
}
}
finally
{
if (raf !... | [
"public",
"void",
"removeTags",
"(",
"int",
"type",
")",
"throws",
"FileNotFoundException",
",",
"IOException",
"{",
"RandomAccessFile",
"raf",
"=",
"null",
";",
"try",
"{",
"raf",
"=",
"new",
"RandomAccessFile",
"(",
"mp3File",
",",
"\"rw\"",
")",
";",
"if"... | Removes id3 tags from the file. The argument specifies which tags to
remove. This can either be BOTH_TAGS, ID3V1_ONLY, ID3V2_ONLY, or
EXISTING_TAGS_ONLY.
@param type specifies what tag(s) to remove
@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs | [
"Removes",
"id3",
"tags",
"from",
"the",
"file",
".",
"The",
"argument",
"specifies",
"which",
"tags",
"to",
"remove",
".",
"This",
"can",
"either",
"be",
"BOTH_TAGS",
"ID3V1_ONLY",
"ID3V2_ONLY",
"or",
"EXISTING_TAGS_ONLY",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L101-L121 |
150,402 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.writeTags | public void writeTags() throws FileNotFoundException, IOException
{
RandomAccessFile raf = null;
try
{
raf = new RandomAccessFile(mp3File, "rw");
// Write out id3v2 first because if the filesize is changed when an
// id3v2 is written then the id3v1 may be moved away from the end
// of the file which ... | java | public void writeTags() throws FileNotFoundException, IOException
{
RandomAccessFile raf = null;
try
{
raf = new RandomAccessFile(mp3File, "rw");
// Write out id3v2 first because if the filesize is changed when an
// id3v2 is written then the id3v1 may be moved away from the end
// of the file which ... | [
"public",
"void",
"writeTags",
"(",
")",
"throws",
"FileNotFoundException",
",",
"IOException",
"{",
"RandomAccessFile",
"raf",
"=",
"null",
";",
"try",
"{",
"raf",
"=",
"new",
"RandomAccessFile",
"(",
"mp3File",
",",
"\"rw\"",
")",
";",
"// Write out id3v2 firs... | Writes the current state of the id3 tags to the file. What tags are
written depends upon the tagType passed to the constructor.
@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs | [
"Writes",
"the",
"current",
"state",
"of",
"the",
"id3",
"tags",
"to",
"the",
"file",
".",
"What",
"tags",
"are",
"written",
"depends",
"upon",
"the",
"tagType",
"passed",
"to",
"the",
"constructor",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L130-L152 |
150,403 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setTitle | public void setTitle(String title, int type)
{
if (allow(type&ID3V1))
{
id3v1.setTitle(title);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.TITLE, title);
}
} | java | public void setTitle(String title, int type)
{
if (allow(type&ID3V1))
{
id3v1.setTitle(title);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.TITLE, title);
}
} | [
"public",
"void",
"setTitle",
"(",
"String",
"title",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setTitle",
"(",
"title",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2"... | Set the title of this mp3.
@param title the title of the mp3 | [
"Set",
"the",
"title",
"of",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L159-L169 |
150,404 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setAlbum | public void setAlbum(String album, int type)
{
if (allow(type&ID3V1))
{
id3v1.setAlbum(album);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.ALBUM, album);
}
} | java | public void setAlbum(String album, int type)
{
if (allow(type&ID3V1))
{
id3v1.setAlbum(album);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.ALBUM, album);
}
} | [
"public",
"void",
"setAlbum",
"(",
"String",
"album",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setAlbum",
"(",
"album",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2"... | Set the album of this mp3.
@param album the album of the mp3 | [
"Set",
"the",
"album",
"of",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L176-L186 |
150,405 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setArtist | public void setArtist(String artist, int type)
{
if (allow(type&ID3V1))
{
id3v1.setArtist(artist);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.LEAD_PERFORMERS, artist);
}
} | java | public void setArtist(String artist, int type)
{
if (allow(type&ID3V1))
{
id3v1.setArtist(artist);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.LEAD_PERFORMERS, artist);
}
} | [
"public",
"void",
"setArtist",
"(",
"String",
"artist",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setArtist",
"(",
"artist",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID... | Set the artist of this mp3.
@param artist the artist of the mp3 | [
"Set",
"the",
"artist",
"of",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L193-L203 |
150,406 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setComment | public void setComment(String comment, int type)
{
if (allow(type&ID3V1))
{
id3v1.setComment(comment);
}
if (allow(type&ID3V2))
{
id3v2.setCommentFrame("", comment);
}
} | java | public void setComment(String comment, int type)
{
if (allow(type&ID3V1))
{
id3v1.setComment(comment);
}
if (allow(type&ID3V2))
{
id3v2.setCommentFrame("", comment);
}
} | [
"public",
"void",
"setComment",
"(",
"String",
"comment",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setComment",
"(",
"comment",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
... | Add a comment to this mp3.
@param comment a comment to add to the mp3 | [
"Add",
"a",
"comment",
"to",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L210-L220 |
150,407 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setGenre | public void setGenre(String genre, int type)
{
if (allow(type&ID3V1))
{
id3v1.setGenreString(genre);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.CONTENT_TYPE, genre);
}
} | java | public void setGenre(String genre, int type)
{
if (allow(type&ID3V1))
{
id3v1.setGenreString(genre);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.CONTENT_TYPE, genre);
}
} | [
"public",
"void",
"setGenre",
"(",
"String",
"genre",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setGenreString",
"(",
"genre",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"... | Set the genre of this mp3.
@param genre the genre of the mp3 | [
"Set",
"the",
"genre",
"of",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L227-L237 |
150,408 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setYear | public void setYear(String year, int type)
{
if (allow(type&ID3V1))
{
id3v1.setYear(year);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.YEAR, year);
}
} | java | public void setYear(String year, int type)
{
if (allow(type&ID3V1))
{
id3v1.setYear(year);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.YEAR, year);
}
} | [
"public",
"void",
"setYear",
"(",
"String",
"year",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setYear",
"(",
"year",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
... | Set the year of this mp3.
@param year of the mp3 | [
"Set",
"the",
"year",
"of",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L244-L254 |
150,409 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.setTrack | public void setTrack(int track, int type)
{
if (allow(type&ID3V1))
{
id3v1.setTrack(track);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.TRACK_NUMBER, String.valueOf(track));
}
} | java | public void setTrack(int track, int type)
{
if (allow(type&ID3V1))
{
id3v1.setTrack(track);
}
if (allow(type&ID3V2))
{
id3v2.setTextFrame(ID3v2Frames.TRACK_NUMBER, String.valueOf(track));
}
} | [
"public",
"void",
"setTrack",
"(",
"int",
"track",
",",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"id3v1",
".",
"setTrack",
"(",
"track",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
... | Set the track number of this mp3.
@param track the track number of this mp3 | [
"Set",
"the",
"track",
"number",
"of",
"this",
"mp3",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L261-L271 |
150,410 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getArtist | public String getArtist(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getArtist();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.LEAD_PERFORMERS);
}
return null;
} | java | public String getArtist(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getArtist();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.LEAD_PERFORMERS);
}
return null;
} | [
"public",
"String",
"getArtist",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"id3v1",
".",
"getArtist",
"(",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
")",
")",
"{",
... | Returns the artist of the mp3 if set and the empty string if not.
@return the artist of the mp3
@exception ID3v2FormatException if the data of the field is incorrect | [
"Returns",
"the",
"artist",
"of",
"the",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L548-L559 |
150,411 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getAlbum | public String getAlbum(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getAlbum();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.ALBUM);
}
return null;
} | java | public String getAlbum(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getAlbum();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.ALBUM);
}
return null;
} | [
"public",
"String",
"getAlbum",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"id3v1",
".",
"getAlbum",
"(",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
")",
")",
"{",
"r... | Returns the album of the mp3 if set and the empty string if not.
@return the album of the mp3
@exception ID3v2FormatException if the data of the field is incorrect | [
"Returns",
"the",
"album",
"of",
"the",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L567-L578 |
150,412 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getComment | public String getComment(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getComment();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.COMMENTS);
}
return null;
} | java | public String getComment(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getComment();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.COMMENTS);
}
return null;
} | [
"public",
"String",
"getComment",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"id3v1",
".",
"getComment",
"(",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
")",
")",
"{",
... | Returns the comment field of this mp3 if set and the empty string if
not.
@return the comment field of this mp3
@exception ID3v2FormatException if the data of the field is incorrect | [
"Returns",
"the",
"comment",
"field",
"of",
"this",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L587-L598 |
150,413 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getGenre | public String getGenre(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getGenreString();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.CONTENT_TYPE);
}
return null;
} | java | public String getGenre(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getGenreString();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.CONTENT_TYPE);
}
return null;
} | [
"public",
"String",
"getGenre",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"id3v1",
".",
"getGenreString",
"(",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
")",
")",
"{"... | Returns the genre of this mp3 if set and the empty string if not.
@return the genre of this mp3
@exception ID3v2FormatException if the data of this field is incorrect | [
"Returns",
"the",
"genre",
"of",
"this",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L606-L617 |
150,414 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getTitle | public String getTitle(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getTitle();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.TITLE);
}
return null;
} | java | public String getTitle(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getTitle();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.TITLE);
}
return null;
} | [
"public",
"String",
"getTitle",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"id3v1",
".",
"getTitle",
"(",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
")",
")",
"{",
"r... | Returns the title of this mp3 if set and the empty string if not.
@return the title of this mp3
@exception ID3v2FormatException if the data of this field is incorrect | [
"Returns",
"the",
"title",
"of",
"this",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L625-L636 |
150,415 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getTrack | public String getTrack(int type)
{
if (allow(type&ID3V1))
{
return Integer.toString(id3v1.getTrack());
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.TRACK_NUMBER);
}
return null;
} | java | public String getTrack(int type)
{
if (allow(type&ID3V1))
{
return Integer.toString(id3v1.getTrack());
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.TRACK_NUMBER);
}
return null;
} | [
"public",
"String",
"getTrack",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"Integer",
".",
"toString",
"(",
"id3v1",
".",
"getTrack",
"(",
")",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"ty... | Returns the track of this mp3 if set and the empty string if not.
@return the track of this mp3
@exception ID3v2FormatException if the data of this field is incorrect | [
"Returns",
"the",
"track",
"of",
"this",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L644-L655 |
150,416 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getYear | public String getYear(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getYear();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.YEAR);
}
return null;
} | java | public String getYear(int type)
{
if (allow(type&ID3V1))
{
return id3v1.getYear();
}
if (allow(type&ID3V2))
{
return id3v2.getFrameDataString(ID3v2Frames.YEAR);
}
return null;
} | [
"public",
"String",
"getYear",
"(",
"int",
"type",
")",
"{",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V1",
")",
")",
"{",
"return",
"id3v1",
".",
"getYear",
"(",
")",
";",
"}",
"if",
"(",
"allow",
"(",
"type",
"&",
"ID3V2",
")",
")",
"{",
"ret... | Returns the year of this mp3 if set and the empty string if not.
@return the year of this mp3
@exception ID3v2FormatException if the data of this field is incorrect | [
"Returns",
"the",
"year",
"of",
"this",
"mp3",
"if",
"set",
"and",
"the",
"empty",
"string",
"if",
"not",
"."
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L663-L674 |
150,417 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.getFileName | public String getFileName()
{
if (mp3File==null) return "";
try
{
return mp3File.getCanonicalPath();
}
catch (IOException ex)
{
return mp3File.getAbsolutePath();
}
} | java | public String getFileName()
{
if (mp3File==null) return "";
try
{
return mp3File.getCanonicalPath();
}
catch (IOException ex)
{
return mp3File.getAbsolutePath();
}
} | [
"public",
"String",
"getFileName",
"(",
")",
"{",
"if",
"(",
"mp3File",
"==",
"null",
")",
"return",
"\"\"",
";",
"try",
"{",
"return",
"mp3File",
".",
"getCanonicalPath",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"ex",
")",
"{",
"return",
"mp3F... | returns the full path of this mp3 file
@since 26.12.2008
@return | [
"returns",
"the",
"full",
"path",
"of",
"this",
"mp3",
"file"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L862-L873 |
150,418 | hawkular/hawkular-inventory | hawkular-inventory-rest-api/src/main/java/org/hawkular/inventory/rest/json/LinkDeserializer.java | LinkDeserializer.deserialize | @Override
public Link deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
String tmp = jp.getText(); // {
validate(jp, tmp, "{");
jp.nextToken(); // skip over { to the rel
String rel = jp.getText();
validateText(jp, rel);
jp.nextToken(); // s... | java | @Override
public Link deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
String tmp = jp.getText(); // {
validate(jp, tmp, "{");
jp.nextToken(); // skip over { to the rel
String rel = jp.getText();
validateText(jp, rel);
jp.nextToken(); // s... | [
"@",
"Override",
"public",
"Link",
"deserialize",
"(",
"JsonParser",
"jp",
",",
"DeserializationContext",
"ctxt",
")",
"throws",
"IOException",
"{",
"String",
"tmp",
"=",
"jp",
".",
"getText",
"(",
")",
";",
"// {",
"validate",
"(",
"jp",
",",
"tmp",
",",
... | Non whitespace; could possibly be narrowed | [
"Non",
"whitespace",
";",
"could",
"possibly",
"be",
"narrowed"
] | f56dc10323dca21777feb5b609a9e9cc70ffaf62 | https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-rest-api/src/main/java/org/hawkular/inventory/rest/json/LinkDeserializer.java#L49-L76 |
150,419 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/FullReadLines.java | FullReadLines.start | public final AsyncWork<T, Exception> start() {
AsyncWork<T, Exception> result = new AsyncWork<>();
resume(result);
return result;
} | java | public final AsyncWork<T, Exception> start() {
AsyncWork<T, Exception> result = new AsyncWork<>();
resume(result);
return result;
} | [
"public",
"final",
"AsyncWork",
"<",
"T",
",",
"Exception",
">",
"start",
"(",
")",
"{",
"AsyncWork",
"<",
"T",
",",
"Exception",
">",
"result",
"=",
"new",
"AsyncWork",
"<>",
"(",
")",
";",
"resume",
"(",
"result",
")",
";",
"return",
"result",
";",... | Start to read lines in a separate task. | [
"Start",
"to",
"read",
"lines",
"in",
"a",
"separate",
"task",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/FullReadLines.java#L31-L35 |
150,420 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.listenInline | public final void listenInline(AsyncWorkListener<T,TError> listener) {
synchronized (this) {
if (!unblocked || listenersInline != null) {
if (listenersInline == null) listenersInline = new ArrayList<>(5);
listenersInline.add(listener);
return;
}
}
if (error != null) listener.error(error)... | java | public final void listenInline(AsyncWorkListener<T,TError> listener) {
synchronized (this) {
if (!unblocked || listenersInline != null) {
if (listenersInline == null) listenersInline = new ArrayList<>(5);
listenersInline.add(listener);
return;
}
}
if (error != null) listener.error(error)... | [
"public",
"final",
"void",
"listenInline",
"(",
"AsyncWorkListener",
"<",
"T",
",",
"TError",
">",
"listener",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"!",
"unblocked",
"||",
"listenersInline",
"!=",
"null",
")",
"{",
"if",
"(",
"list... | Add a listener to be called when this AsyncWork is unblocked. | [
"Add",
"a",
"listener",
"to",
"be",
"called",
"when",
"this",
"AsyncWork",
"is",
"unblocked",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L136-L147 |
150,421 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.listenInline | public final void listenInline(Listener<T> onready, Listener<TError> onerror, Listener<CancelException> oncancel) {
listenInline(new AsyncWorkListener<T,TError>() {
@Override
public void ready(T result) {
onready.fire(result);
}
@Override
public void error(TError error) {
onerror.f... | java | public final void listenInline(Listener<T> onready, Listener<TError> onerror, Listener<CancelException> oncancel) {
listenInline(new AsyncWorkListener<T,TError>() {
@Override
public void ready(T result) {
onready.fire(result);
}
@Override
public void error(TError error) {
onerror.f... | [
"public",
"final",
"void",
"listenInline",
"(",
"Listener",
"<",
"T",
">",
"onready",
",",
"Listener",
"<",
"TError",
">",
"onerror",
",",
"Listener",
"<",
"CancelException",
">",
"oncancel",
")",
"{",
"listenInline",
"(",
"new",
"AsyncWorkListener",
"<",
"T... | Call one of the given listener depending on result. | [
"Call",
"one",
"of",
"the",
"given",
"listener",
"depending",
"on",
"result",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L190-L212 |
150,422 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.listenInline | public final void listenInline(Listener<T> onSuccess) {
listenInline(new AsyncWorkListener<T,TError>() {
@Override
public void ready(T result) {
onSuccess.fire(result);
}
@Override
public void error(TError error) {
}
@Override
public void cancelled(CancelException event... | java | public final void listenInline(Listener<T> onSuccess) {
listenInline(new AsyncWorkListener<T,TError>() {
@Override
public void ready(T result) {
onSuccess.fire(result);
}
@Override
public void error(TError error) {
}
@Override
public void cancelled(CancelException event... | [
"public",
"final",
"void",
"listenInline",
"(",
"Listener",
"<",
"T",
">",
"onSuccess",
")",
"{",
"listenInline",
"(",
"new",
"AsyncWorkListener",
"<",
"T",
",",
"TError",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"ready",
"(",
"T",
"result"... | Register a listener to be called only on success, with the result. | [
"Register",
"a",
"listener",
"to",
"be",
"called",
"only",
"on",
"success",
"with",
"the",
"result",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L290-L310 |
150,423 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.listenInlineGenericError | public final void listenInlineGenericError(AsyncWork<T, Exception> sp) {
listenInline(new AsyncWorkListener<T,TError>() {
@Override
public void ready(T result) {
sp.unblockSuccess(result);
}
@Override
public void error(TError error) {
sp.unblockError(error);
}
@Overrid... | java | public final void listenInlineGenericError(AsyncWork<T, Exception> sp) {
listenInline(new AsyncWorkListener<T,TError>() {
@Override
public void ready(T result) {
sp.unblockSuccess(result);
}
@Override
public void error(TError error) {
sp.unblockError(error);
}
@Overrid... | [
"public",
"final",
"void",
"listenInlineGenericError",
"(",
"AsyncWork",
"<",
"T",
",",
"Exception",
">",
"sp",
")",
"{",
"listenInline",
"(",
"new",
"AsyncWorkListener",
"<",
"T",
",",
"TError",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"read... | Forward the result, error, or cancellation to the given AsyncWork. | [
"Forward",
"the",
"result",
"error",
"or",
"cancellation",
"to",
"the",
"given",
"AsyncWork",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L313-L330 |
150,424 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.unblockSuccess | public final void unblockSuccess(T result) {
ArrayList<AsyncWorkListener<T,TError>> listeners;
synchronized (this) {
if (unblocked) return;
unblocked = true;
this.result = result;
if (listenersInline == null) {
this.notifyAll();
return;
}
listeners = listenersInline;
listener... | java | public final void unblockSuccess(T result) {
ArrayList<AsyncWorkListener<T,TError>> listeners;
synchronized (this) {
if (unblocked) return;
unblocked = true;
this.result = result;
if (listenersInline == null) {
this.notifyAll();
return;
}
listeners = listenersInline;
listener... | [
"public",
"final",
"void",
"unblockSuccess",
"(",
"T",
"result",
")",
"{",
"ArrayList",
"<",
"AsyncWorkListener",
"<",
"T",
",",
"TError",
">",
">",
"listeners",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"unblocked",
")",
"return",
";",
"unb... | Unblock this AsyncWork with the given result. | [
"Unblock",
"this",
"AsyncWork",
"with",
"the",
"given",
"result",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L333-L376 |
150,425 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.unblockError | public final void unblockError(TError error) {
ArrayList<AsyncWorkListener<T,TError>> listeners;
synchronized (this) {
if (unblocked) return;
unblocked = true;
this.error = error;
if (listenersInline == null) {
this.notifyAll();
return;
}
listeners = listenersInline;
listener... | java | public final void unblockError(TError error) {
ArrayList<AsyncWorkListener<T,TError>> listeners;
synchronized (this) {
if (unblocked) return;
unblocked = true;
this.error = error;
if (listenersInline == null) {
this.notifyAll();
return;
}
listeners = listenersInline;
listener... | [
"public",
"final",
"void",
"unblockError",
"(",
"TError",
"error",
")",
"{",
"ArrayList",
"<",
"AsyncWorkListener",
"<",
"T",
",",
"TError",
">",
">",
"listeners",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"unblocked",
")",
"return",
";",
"u... | Unblock this AsyncWork with an error. Equivalent to the method error. | [
"Unblock",
"this",
"AsyncWork",
"with",
"an",
"error",
".",
"Equivalent",
"to",
"the",
"method",
"error",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L379-L433 |
150,426 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.unblockCancel | public void unblockCancel(CancelException event) {
ArrayList<AsyncWorkListener<T,TError>> listeners;
synchronized (this) {
if (unblocked) return;
unblocked = true;
this.cancel = event;
if (listenersInline == null) {
this.notifyAll();
return;
}
listeners = listenersInline;
lis... | java | public void unblockCancel(CancelException event) {
ArrayList<AsyncWorkListener<T,TError>> listeners;
synchronized (this) {
if (unblocked) return;
unblocked = true;
this.cancel = event;
if (listenersInline == null) {
this.notifyAll();
return;
}
listeners = listenersInline;
lis... | [
"public",
"void",
"unblockCancel",
"(",
"CancelException",
"event",
")",
"{",
"ArrayList",
"<",
"AsyncWorkListener",
"<",
"T",
",",
"TError",
">",
">",
"listeners",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"unblocked",
")",
"return",
";",
"un... | Cancel this AsyncWork. Equivalent to the method cancel. | [
"Cancel",
"this",
"AsyncWork",
".",
"Equivalent",
"to",
"the",
"method",
"cancel",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L441-L484 |
150,427 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.blockResult | public final T blockResult(long timeout) throws TError, CancelException {
Thread t;
BlockedThreadHandler blockedHandler;
synchronized (this) {
if (unblocked && listenersInline == null) {
if (error != null) throw error;
if (cancel != null) throw cancel;
return result;
}
t = Thread.cur... | java | public final T blockResult(long timeout) throws TError, CancelException {
Thread t;
BlockedThreadHandler blockedHandler;
synchronized (this) {
if (unblocked && listenersInline == null) {
if (error != null) throw error;
if (cancel != null) throw cancel;
return result;
}
t = Thread.cur... | [
"public",
"final",
"T",
"blockResult",
"(",
"long",
"timeout",
")",
"throws",
"TError",
",",
"CancelException",
"{",
"Thread",
"t",
";",
"BlockedThreadHandler",
"blockedHandler",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"unblocked",
"&&",
"listen... | Block until this AsyncWork is unblocked or the given timeout expired,
and return the result in case of success, or throw the error or cancellation.
@param timeout in milliseconds. 0 or negative value means infinite. | [
"Block",
"until",
"this",
"AsyncWork",
"is",
"unblocked",
"or",
"the",
"given",
"timeout",
"expired",
"and",
"return",
"the",
"result",
"in",
"case",
"of",
"success",
"or",
"throw",
"the",
"error",
"or",
"cancellation",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L517-L538 |
150,428 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java | AsyncWork.reset | public final void reset() {
unblocked = false;
result = null;
error = null;
cancel = null;
listenersInline = null;
} | java | public final void reset() {
unblocked = false;
result = null;
error = null;
cancel = null;
listenersInline = null;
} | [
"public",
"final",
"void",
"reset",
"(",
")",
"{",
"unblocked",
"=",
"false",
";",
"result",
"=",
"null",
";",
"error",
"=",
"null",
";",
"cancel",
"=",
"null",
";",
"listenersInline",
"=",
"null",
";",
"}"
] | Reset this AsyncWork point to reuse it.
This method remove any previous result, error or cancellation, and mark this AsyncWork as blocked.
Any previous listener is also removed. | [
"Reset",
"this",
"AsyncWork",
"point",
"to",
"reuse",
"it",
".",
"This",
"method",
"remove",
"any",
"previous",
"result",
"error",
"or",
"cancellation",
"and",
"mark",
"this",
"AsyncWork",
"as",
"blocked",
".",
"Any",
"previous",
"listener",
"is",
"also",
"r... | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/synch/AsyncWork.java#L564-L570 |
150,429 | mytechia/mytechia_commons | mytechia_commons_library/src/main/java/com/mytechia/commons/util/id/GUID.java | GUID.generarIdentificador | public String generarIdentificador( ) {
String UUID = Long.toHexString(System.currentTimeMillis());
UUID = UUID.concat(obtenerDireccionIP());
UUID = UUID.concat(identityHashCode);
UUID = UUID.concat(Integer.toHexString(_oAleatorioSeguro.nextInt()));
return UUID;
} | java | public String generarIdentificador( ) {
String UUID = Long.toHexString(System.currentTimeMillis());
UUID = UUID.concat(obtenerDireccionIP());
UUID = UUID.concat(identityHashCode);
UUID = UUID.concat(Integer.toHexString(_oAleatorioSeguro.nextInt()));
return UUID;
} | [
"public",
"String",
"generarIdentificador",
"(",
")",
"{",
"String",
"UUID",
"=",
"Long",
".",
"toHexString",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
")",
";",
"UUID",
"=",
"UUID",
".",
"concat",
"(",
"obtenerDireccionIP",
"(",
")",
")",
";",
... | Este metodo genera una nueva cadena de identificador Unico.
La cadena devuelta tiene un maximo de 40 caracteres.
@return un identificador unico | [
"Este",
"metodo",
"genera",
"una",
"nueva",
"cadena",
"de",
"identificador",
"Unico",
".",
"La",
"cadena",
"devuelta",
"tiene",
"un",
"maximo",
"de",
"40",
"caracteres",
"."
] | 02251879085f271a1fb51663a1c8eddc8be78ae7 | https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/util/id/GUID.java#L112-L118 |
150,430 | jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/midi/MidiInfoPanel.java | MidiInfoPanel.fillInfoPanelWith | public void fillInfoPanelWith(Sequence currentSequence, String songName)
{
getMidiDuration().setText(Helpers.getTimeStringFromMilliseconds(currentSequence.getMicrosecondLength() / 1000L));
getMidiName().setText(songName);
Track[] tracks = currentSequence.getTracks();
StringBuilder fullText = new StringBuilder(... | java | public void fillInfoPanelWith(Sequence currentSequence, String songName)
{
getMidiDuration().setText(Helpers.getTimeStringFromMilliseconds(currentSequence.getMicrosecondLength() / 1000L));
getMidiName().setText(songName);
Track[] tracks = currentSequence.getTracks();
StringBuilder fullText = new StringBuilder(... | [
"public",
"void",
"fillInfoPanelWith",
"(",
"Sequence",
"currentSequence",
",",
"String",
"songName",
")",
"{",
"getMidiDuration",
"(",
")",
".",
"setText",
"(",
"Helpers",
".",
"getTimeStringFromMilliseconds",
"(",
"currentSequence",
".",
"getMicrosecondLength",
"(",... | private static final int INSTRUMENTNAME = 0x04; | [
"private",
"static",
"final",
"int",
"INSTRUMENTNAME",
"=",
"0x04",
";"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/midi/MidiInfoPanel.java#L176-L201 |
150,431 | mytechia/mytechia_commons | mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java | PrototypeContainer.getClone | public <T> T getClone( String key, Class<T> c )
{
IPrototype prototype = prototypes.get(new PrototypeKey(key, c));
if (prototype != null) {
return (T) prototype.clone();
}
else
return null;
} | java | public <T> T getClone( String key, Class<T> c )
{
IPrototype prototype = prototypes.get(new PrototypeKey(key, c));
if (prototype != null) {
return (T) prototype.clone();
}
else
return null;
} | [
"public",
"<",
"T",
">",
"T",
"getClone",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"c",
")",
"{",
"IPrototype",
"prototype",
"=",
"prototypes",
".",
"get",
"(",
"new",
"PrototypeKey",
"(",
"key",
",",
"c",
")",
")",
";",
"if",
"(",
"pro... | Obtains a key associated clone of the prototype for
the specified class and key
NOTE: IPrototype pattern
@param c class of the clone to be obtained | [
"Obtains",
"a",
"key",
"associated",
"clone",
"of",
"the",
"prototype",
"for",
"the",
"specified",
"class",
"and",
"key"
] | 02251879085f271a1fb51663a1c8eddc8be78ae7 | https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java#L89-L100 |
150,432 | mytechia/mytechia_commons | mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java | PrototypeContainer.registerPrototype | public void registerPrototype( String key, IPrototype prototype )
{
prototypes.put(new PrototypeKey(key, prototype.getClass()), prototype);
} | java | public void registerPrototype( String key, IPrototype prototype )
{
prototypes.put(new PrototypeKey(key, prototype.getClass()), prototype);
} | [
"public",
"void",
"registerPrototype",
"(",
"String",
"key",
",",
"IPrototype",
"prototype",
")",
"{",
"prototypes",
".",
"put",
"(",
"new",
"PrototypeKey",
"(",
"key",
",",
"prototype",
".",
"getClass",
"(",
")",
")",
",",
"prototype",
")",
";",
"}"
] | Registers a new prototype associated to the specified key
NOTE: IPrototype pattern
@param key key for the new prototype
@param prototype the prototype to register | [
"Registers",
"a",
"new",
"prototype",
"associated",
"to",
"the",
"specified",
"key"
] | 02251879085f271a1fb51663a1c8eddc8be78ae7 | https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java#L138-L143 |
150,433 | mytechia/mytechia_commons | mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java | PrototypeContainer.unregisterPrototype | public void unregisterPrototype( String key, Class c )
{
prototypes.remove(new PrototypeKey(key, c));
} | java | public void unregisterPrototype( String key, Class c )
{
prototypes.remove(new PrototypeKey(key, c));
} | [
"public",
"void",
"unregisterPrototype",
"(",
"String",
"key",
",",
"Class",
"c",
")",
"{",
"prototypes",
".",
"remove",
"(",
"new",
"PrototypeKey",
"(",
"key",
",",
"c",
")",
")",
";",
"}"
] | Unregisters a prototype associated to the specified key
NOTE: IPrototype pattern
@param key key of the prototype
@param c the prototype to unregister | [
"Unregisters",
"a",
"prototype",
"associated",
"to",
"the",
"specified",
"key"
] | 02251879085f271a1fb51663a1c8eddc8be78ae7 | https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia_commons_library/src/main/java/com/mytechia/commons/patterns/prototype/PrototypeContainer.java#L153-L158 |
150,434 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java | RequireOS.displayOSInfo | public void displayOSInfo( Log log, boolean info )
{
String string =
"OS Info: Arch: " + Os.OS_ARCH + " Family: " + Os.OS_FAMILY + " Name: " + Os.OS_NAME + " Version: "
+ Os.OS_VERSION;
if ( !info )
{
log.debug( string );
}
else
... | java | public void displayOSInfo( Log log, boolean info )
{
String string =
"OS Info: Arch: " + Os.OS_ARCH + " Family: " + Os.OS_FAMILY + " Name: " + Os.OS_NAME + " Version: "
+ Os.OS_VERSION;
if ( !info )
{
log.debug( string );
}
else
... | [
"public",
"void",
"displayOSInfo",
"(",
"Log",
"log",
",",
"boolean",
"info",
")",
"{",
"String",
"string",
"=",
"\"OS Info: Arch: \"",
"+",
"Os",
".",
"OS_ARCH",
"+",
"\" Family: \"",
"+",
"Os",
".",
"OS_FAMILY",
"+",
"\" Name: \"",
"+",
"Os",
".",
"OS_NA... | Log the current OS information.
@param log the log
@param info the info | [
"Log",
"the",
"current",
"OS",
"information",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java#L161-L175 |
150,435 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java | RequireOS.allParamsEmpty | public boolean allParamsEmpty()
{
return ( StringUtils.isEmpty( family ) && StringUtils.isEmpty( arch ) && StringUtils.isEmpty( name ) && StringUtils.isEmpty( version ) );
} | java | public boolean allParamsEmpty()
{
return ( StringUtils.isEmpty( family ) && StringUtils.isEmpty( arch ) && StringUtils.isEmpty( name ) && StringUtils.isEmpty( version ) );
} | [
"public",
"boolean",
"allParamsEmpty",
"(",
")",
"{",
"return",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"family",
")",
"&&",
"StringUtils",
".",
"isEmpty",
"(",
"arch",
")",
"&&",
"StringUtils",
".",
"isEmpty",
"(",
"name",
")",
"&&",
"StringUtils",
".",
... | Helper method to check that at least one of family, name, version or arch is set.
@return true if all parameters are empty. | [
"Helper",
"method",
"to",
"check",
"that",
"at",
"least",
"one",
"of",
"family",
"name",
"version",
"or",
"arch",
"is",
"set",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java#L195-L199 |
150,436 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java | RequireOS.createActivation | private Activation createActivation()
{
Activation activation = new Activation();
activation.setActiveByDefault( false );
activation.setOs( createOsBean() );
return activation;
} | java | private Activation createActivation()
{
Activation activation = new Activation();
activation.setActiveByDefault( false );
activation.setOs( createOsBean() );
return activation;
} | [
"private",
"Activation",
"createActivation",
"(",
")",
"{",
"Activation",
"activation",
"=",
"new",
"Activation",
"(",
")",
";",
"activation",
".",
"setActiveByDefault",
"(",
"false",
")",
";",
"activation",
".",
"setOs",
"(",
"createOsBean",
"(",
")",
")",
... | Creates an Activation object that contains the ActivationOS information.
@return a properly populated Activation object. | [
"Creates",
"an",
"Activation",
"object",
"that",
"contains",
"the",
"ActivationOS",
"information",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java#L218-L224 |
150,437 | lkwg82/enforcer-rules | src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java | RequireOS.createOsBean | private ActivationOS createOsBean()
{
ActivationOS os = new ActivationOS();
os.setArch( arch );
os.setFamily( family );
os.setName( name );
os.setVersion( version );
return os;
} | java | private ActivationOS createOsBean()
{
ActivationOS os = new ActivationOS();
os.setArch( arch );
os.setFamily( family );
os.setName( name );
os.setVersion( version );
return os;
} | [
"private",
"ActivationOS",
"createOsBean",
"(",
")",
"{",
"ActivationOS",
"os",
"=",
"new",
"ActivationOS",
"(",
")",
";",
"os",
".",
"setArch",
"(",
"arch",
")",
";",
"os",
".",
"setFamily",
"(",
"family",
")",
";",
"os",
".",
"setName",
"(",
"name",
... | Creates an ActivationOS object containing family, name, version and arch.
@return a properly populated ActivationOS object. | [
"Creates",
"an",
"ActivationOS",
"object",
"containing",
"family",
"name",
"version",
"and",
"arch",
"."
] | fa2d309af7907b17fc8eaf386f8056d77b654749 | https://github.com/lkwg82/enforcer-rules/blob/fa2d309af7907b17fc8eaf386f8056d77b654749/src/main/java/org/apache/maven/plugins/enforcer/RequireOS.java#L231-L241 |
150,438 | GerdHolz/TOVAL | src/de/invation/code/toval/graphic/misc/RegularPolygon.java | RegularPolygon.determineCoordinates | protected void determineCoordinates(){
for (int i=0; i<numPoints; i++){
coordinates.set(i, getPointCoordinate(i));
}
} | java | protected void determineCoordinates(){
for (int i=0; i<numPoints; i++){
coordinates.set(i, getPointCoordinate(i));
}
} | [
"protected",
"void",
"determineCoordinates",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numPoints",
";",
"i",
"++",
")",
"{",
"coordinates",
".",
"set",
"(",
"i",
",",
"getPointCoordinate",
"(",
"i",
")",
")",
";",
"}",
"}"
] | Determines the properties of the underlying circle and the point coordinates. | [
"Determines",
"the",
"properties",
"of",
"the",
"underlying",
"circle",
"and",
"the",
"point",
"coordinates",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/graphic/misc/RegularPolygon.java#L50-L54 |
150,439 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/managers/MessageTypeHandler.java | MessageTypeHandler.handleMessage | public void handleMessage(String message, E_MessageType type, ST max100, Object appID){
this.count++;
boolean doMax = false;
if(this.maxCount!=-1 && this.count>this.maxCount){
max100.add("name", appID);
max100.add("number", this.maxCount);
doMax = true;
}
if(this.useSkbConsole==true){
switch(typ... | java | public void handleMessage(String message, E_MessageType type, ST max100, Object appID){
this.count++;
boolean doMax = false;
if(this.maxCount!=-1 && this.count>this.maxCount){
max100.add("name", appID);
max100.add("number", this.maxCount);
doMax = true;
}
if(this.useSkbConsole==true){
switch(typ... | [
"public",
"void",
"handleMessage",
"(",
"String",
"message",
",",
"E_MessageType",
"type",
",",
"ST",
"max100",
",",
"Object",
"appID",
")",
"{",
"this",
".",
"count",
"++",
";",
"boolean",
"doMax",
"=",
"false",
";",
"if",
"(",
"this",
".",
"maxCount",
... | Handles the message.
@param message the message to be handled
@param type message type
@param appID application identifier for max message count | [
"Handles",
"the",
"message",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/managers/MessageTypeHandler.java#L124-L178 |
150,440 | mytechia/mytechia_commons | mytechia-commons-modelaction/src/main/java/com/mytechia/commons/framework/modelaction/action/background/BackgroundAction.java | BackgroundAction.executeInBackground | public void executeInBackground()
{
Thread t = new Thread() {
public void run() {
try{
execute();
}catch(Exception e) {
notifyException(e);
}
}
};
t.start();
... | java | public void executeInBackground()
{
Thread t = new Thread() {
public void run() {
try{
execute();
}catch(Exception e) {
notifyException(e);
}
}
};
t.start();
... | [
"public",
"void",
"executeInBackground",
"(",
")",
"{",
"Thread",
"t",
"=",
"new",
"Thread",
"(",
")",
"{",
"public",
"void",
"run",
"(",
")",
"{",
"try",
"{",
"execute",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"notifyException"... | A new thread is automatically created to execute the action | [
"A",
"new",
"thread",
"is",
"automatically",
"created",
"to",
"execute",
"the",
"action"
] | 02251879085f271a1fb51663a1c8eddc8be78ae7 | https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia-commons-modelaction/src/main/java/com/mytechia/commons/framework/modelaction/action/background/BackgroundAction.java#L85-L101 |
150,441 | GerdHolz/TOVAL | src/de/invation/code/toval/misc/valuegeneration/StochasticValueGenerator.java | StochasticValueGenerator.getNextValue | public E getNextValue() throws ValueGenerationException{
if(!isValid())
throw new ValueGenerationException("Cannot provide elements in invalid state.");
Double random = rand.nextDouble();
for(int i=0; i<limits.size(); i++)
if(random <= limits.get(i)){
return keys.get(i);
}
return null;
} | java | public E getNextValue() throws ValueGenerationException{
if(!isValid())
throw new ValueGenerationException("Cannot provide elements in invalid state.");
Double random = rand.nextDouble();
for(int i=0; i<limits.size(); i++)
if(random <= limits.get(i)){
return keys.get(i);
}
return null;
} | [
"public",
"E",
"getNextValue",
"(",
")",
"throws",
"ValueGenerationException",
"{",
"if",
"(",
"!",
"isValid",
"(",
")",
")",
"throw",
"new",
"ValueGenerationException",
"(",
"\"Cannot provide elements in invalid state.\"",
")",
";",
"Double",
"random",
"=",
"rand",... | Conducts a stochastic element choice based on the maintained occurrence probabilities.
@return A randomly chosen element based on occurrence probabilities.
@throws ValueGenerationException Thrown, if the chooser is in an invalid state. | [
"Conducts",
"a",
"stochastic",
"element",
"choice",
"based",
"on",
"the",
"maintained",
"occurrence",
"probabilities",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/valuegeneration/StochasticValueGenerator.java#L135-L144 |
150,442 | livetribe/livetribe-slp | core/src/main/java/org/livetribe/slp/spi/msg/Extension.java | Extension.deserialize | public static Extension deserialize(byte[] extensionBytes) throws ServiceLocationException
{
int extensionId = readInt(extensionBytes, 0, ID_BYTES_LENGTH);
Extension extension = createExtension(extensionId);
if (extension != null)
{
byte[] bodyBytes = new byte[extensionBy... | java | public static Extension deserialize(byte[] extensionBytes) throws ServiceLocationException
{
int extensionId = readInt(extensionBytes, 0, ID_BYTES_LENGTH);
Extension extension = createExtension(extensionId);
if (extension != null)
{
byte[] bodyBytes = new byte[extensionBy... | [
"public",
"static",
"Extension",
"deserialize",
"(",
"byte",
"[",
"]",
"extensionBytes",
")",
"throws",
"ServiceLocationException",
"{",
"int",
"extensionId",
"=",
"readInt",
"(",
"extensionBytes",
",",
"0",
",",
"ID_BYTES_LENGTH",
")",
";",
"Extension",
"extensio... | Returns an Extension subclass object obtained deserializing the given bytes, or null
if the bytes contain an extension that is not understood.
@param extensionBytes The bytes to deserialize
@throws ServiceLocationException If the deserialization fails | [
"Returns",
"an",
"Extension",
"subclass",
"object",
"obtained",
"deserializing",
"the",
"given",
"bytes",
"or",
"null",
"if",
"the",
"bytes",
"contain",
"an",
"extension",
"that",
"is",
"not",
"understood",
"."
] | 6cc13dbe81feab133fe3dd291ca081cbc6e1f591 | https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/spi/msg/Extension.java#L77-L88 |
150,443 | lukas-krecan/rest-fire | src/main/java/net/javacrumbs/restfire/impl/DefaultHeaders.java | DefaultHeaders.addHeader | public void addHeader(String name, String value) {
headers.add(name, value);
List<String> list = caseSensitiveHeaders.get(name);
if (list == null) {
list = new ArrayList<String>();
caseSensitiveHeaders.put(name, list);
}
list.add(value);
} | java | public void addHeader(String name, String value) {
headers.add(name, value);
List<String> list = caseSensitiveHeaders.get(name);
if (list == null) {
list = new ArrayList<String>();
caseSensitiveHeaders.put(name, list);
}
list.add(value);
} | [
"public",
"void",
"addHeader",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"headers",
".",
"add",
"(",
"name",
",",
"value",
")",
";",
"List",
"<",
"String",
">",
"list",
"=",
"caseSensitiveHeaders",
".",
"get",
"(",
"name",
")",
";",
"i... | Adds and normalizes the header.
@param name
@param value | [
"Adds",
"and",
"normalizes",
"the",
"header",
"."
] | 2fcc9d451122413900ef44337527abaa75d930a2 | https://github.com/lukas-krecan/rest-fire/blob/2fcc9d451122413900ef44337527abaa75d930a2/src/main/java/net/javacrumbs/restfire/impl/DefaultHeaders.java#L42-L50 |
150,444 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java | NonBlockingReader.getCallWTimeout | public static Callable<String> getCallWTimeout(BufferedReader reader, HasPrompt emptyPrint){
return NonBlockingReader.getCallWTimeout(reader, 200, emptyPrint);
} | java | public static Callable<String> getCallWTimeout(BufferedReader reader, HasPrompt emptyPrint){
return NonBlockingReader.getCallWTimeout(reader, 200, emptyPrint);
} | [
"public",
"static",
"Callable",
"<",
"String",
">",
"getCallWTimeout",
"(",
"BufferedReader",
"reader",
",",
"HasPrompt",
"emptyPrint",
")",
"{",
"return",
"NonBlockingReader",
".",
"getCallWTimeout",
"(",
"reader",
",",
"200",
",",
"emptyPrint",
")",
";",
"}"
] | Returns a new callable for reading strings from a reader with a set timeout of 200ms.
@param reader input stream to read from
@param emptyPrint a printout to realize on an empty readline string, for prompts, set null if not required
@return null if input stream is null, results of read on input stream otherwise | [
"Returns",
"a",
"new",
"callable",
"for",
"reading",
"strings",
"from",
"a",
"reader",
"with",
"a",
"set",
"timeout",
"of",
"200ms",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java#L46-L48 |
150,445 | vdmeer/skb-java-base | src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java | NonBlockingReader.getCallWTimeout | public static Callable<String> getCallWTimeout(BufferedReader reader, int timeout, HasPrompt emptyPrint){
return new Callable<String>() {
@Override
public String call() throws IOException {
String ret = "";
while("".equals(ret)){
try{
while(!reader.ready()){
Thread.sleep(timeout);
... | java | public static Callable<String> getCallWTimeout(BufferedReader reader, int timeout, HasPrompt emptyPrint){
return new Callable<String>() {
@Override
public String call() throws IOException {
String ret = "";
while("".equals(ret)){
try{
while(!reader.ready()){
Thread.sleep(timeout);
... | [
"public",
"static",
"Callable",
"<",
"String",
">",
"getCallWTimeout",
"(",
"BufferedReader",
"reader",
",",
"int",
"timeout",
",",
"HasPrompt",
"emptyPrint",
")",
"{",
"return",
"new",
"Callable",
"<",
"String",
">",
"(",
")",
"{",
"@",
"Override",
"public"... | Returns a new callable for reading strings from a reader with a given timeout.
@param reader input stream to read from
@param timeout read timeout in milliseconds, very low numbers and 0 are accepted but might result in strange behavior
@param emptyPrint a printout to realize on an empty readline string, for prompts, s... | [
"Returns",
"a",
"new",
"callable",
"for",
"reading",
"strings",
"from",
"a",
"reader",
"with",
"a",
"given",
"timeout",
"."
] | 6d845bcc482aa9344d016e80c0c3455aeae13a13 | https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java#L57-L79 |
150,446 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/XMLNode.java | XMLNode.isAncestor | public boolean isAncestor(XMLNode node) {
return node == parent || (parent != null && parent.isAncestor(node));
} | java | public boolean isAncestor(XMLNode node) {
return node == parent || (parent != null && parent.isAncestor(node));
} | [
"public",
"boolean",
"isAncestor",
"(",
"XMLNode",
"node",
")",
"{",
"return",
"node",
"==",
"parent",
"||",
"(",
"parent",
"!=",
"null",
"&&",
"parent",
".",
"isAncestor",
"(",
"node",
")",
")",
";",
"}"
] | Check if the given node is an ancestor of this node. | [
"Check",
"if",
"the",
"given",
"node",
"is",
"an",
"ancestor",
"of",
"this",
"node",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/xml/dom/XMLNode.java#L43-L45 |
150,447 | sahan/RoboZombie | robozombie/src/main/java/org/apache/http42/client/utils/URIBuilder.java | URIBuilder.addParameter | public URIBuilder addParameter(final String param, final String value) {
if (this.queryParams == null) {
this.queryParams = new ArrayList<NameValuePair>();
}
this.queryParams.add(new BasicNameValuePair(param, value));
this.encodedQuery = null;
this.encodedSchemeSpecif... | java | public URIBuilder addParameter(final String param, final String value) {
if (this.queryParams == null) {
this.queryParams = new ArrayList<NameValuePair>();
}
this.queryParams.add(new BasicNameValuePair(param, value));
this.encodedQuery = null;
this.encodedSchemeSpecif... | [
"public",
"URIBuilder",
"addParameter",
"(",
"final",
"String",
"param",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"this",
".",
"queryParams",
"==",
"null",
")",
"{",
"this",
".",
"queryParams",
"=",
"new",
"ArrayList",
"<",
"NameValuePair",
">... | Adds parameter to URI query. The parameter name and value are expected to be unescaped
and may contain non ASCII characters. | [
"Adds",
"parameter",
"to",
"URI",
"query",
".",
"The",
"parameter",
"name",
"and",
"value",
"are",
"expected",
"to",
"be",
"unescaped",
"and",
"may",
"contain",
"non",
"ASCII",
"characters",
"."
] | 2e02f0d41647612e9d89360c5c48811ea86b33c8 | https://github.com/sahan/RoboZombie/blob/2e02f0d41647612e9d89360c5c48811ea86b33c8/robozombie/src/main/java/org/apache/http42/client/utils/URIBuilder.java#L269-L277 |
150,448 | sahan/RoboZombie | robozombie/src/main/java/org/apache/http42/client/utils/URIBuilder.java | URIBuilder.setParameter | public URIBuilder setParameter(final String param, final String value) {
if (this.queryParams == null) {
this.queryParams = new ArrayList<NameValuePair>();
}
if (!this.queryParams.isEmpty()) {
for (Iterator<NameValuePair> it = this.queryParams.iterator(); it.hasNext(); ) ... | java | public URIBuilder setParameter(final String param, final String value) {
if (this.queryParams == null) {
this.queryParams = new ArrayList<NameValuePair>();
}
if (!this.queryParams.isEmpty()) {
for (Iterator<NameValuePair> it = this.queryParams.iterator(); it.hasNext(); ) ... | [
"public",
"URIBuilder",
"setParameter",
"(",
"final",
"String",
"param",
",",
"final",
"String",
"value",
")",
"{",
"if",
"(",
"this",
".",
"queryParams",
"==",
"null",
")",
"{",
"this",
".",
"queryParams",
"=",
"new",
"ArrayList",
"<",
"NameValuePair",
">... | Sets parameter of URI query overriding existing value if set. The parameter name and value
are expected to be unescaped and may contain non ASCII characters. | [
"Sets",
"parameter",
"of",
"URI",
"query",
"overriding",
"existing",
"value",
"if",
"set",
".",
"The",
"parameter",
"name",
"and",
"value",
"are",
"expected",
"to",
"be",
"unescaped",
"and",
"may",
"contain",
"non",
"ASCII",
"characters",
"."
] | 2e02f0d41647612e9d89360c5c48811ea86b33c8 | https://github.com/sahan/RoboZombie/blob/2e02f0d41647612e9d89360c5c48811ea86b33c8/robozombie/src/main/java/org/apache/http42/client/utils/URIBuilder.java#L283-L299 |
150,449 | hycos/regex2smtlib | src/main/java/com/github/hycos/regex2smtlib/translator/TranslationMap.java | TranslationMap.has | public boolean has(Element ele) {
return tmap.containsKey(ele) && !tmap.get(ele).isEmpty();
} | java | public boolean has(Element ele) {
return tmap.containsKey(ele) && !tmap.get(ele).isEmpty();
} | [
"public",
"boolean",
"has",
"(",
"Element",
"ele",
")",
"{",
"return",
"tmap",
".",
"containsKey",
"(",
"ele",
")",
"&&",
"!",
"tmap",
".",
"get",
"(",
"ele",
")",
".",
"isEmpty",
"(",
")",
";",
"}"
] | check the presence of ele in translation map
@param ele regular expression element
@return true, in case ele is present in translation map | [
"check",
"the",
"presence",
"of",
"ele",
"in",
"translation",
"map"
] | 627013396cc42d12298b02d13aadef9706956081 | https://github.com/hycos/regex2smtlib/blob/627013396cc42d12298b02d13aadef9706956081/src/main/java/com/github/hycos/regex2smtlib/translator/TranslationMap.java#L82-L84 |
150,450 | netarchivesuite/heritrix3-wrapper | src/main/java/org/netarchivesuite/heritrix3wrapper/xmlutils/XslErrorListenerAbstract.java | XslErrorListenerAbstract.reset | public void reset() {
numberOfErrors = 0;
numberOfFatalErrors = 0;
numberOfWarnings = 0;
errors.clear();
fatalErrors.clear();
warnings.clear();
} | java | public void reset() {
numberOfErrors = 0;
numberOfFatalErrors = 0;
numberOfWarnings = 0;
errors.clear();
fatalErrors.clear();
warnings.clear();
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"numberOfErrors",
"=",
"0",
";",
"numberOfFatalErrors",
"=",
"0",
";",
"numberOfWarnings",
"=",
"0",
";",
"errors",
".",
"clear",
"(",
")",
";",
"fatalErrors",
".",
"clear",
"(",
")",
";",
"warnings",
".",
"cle... | Reset accumulated errors counters. | [
"Reset",
"accumulated",
"errors",
"counters",
"."
] | e53ec5736cbac0bdd3925b5331737dc905871629 | https://github.com/netarchivesuite/heritrix3-wrapper/blob/e53ec5736cbac0bdd3925b5331737dc905871629/src/main/java/org/netarchivesuite/heritrix3wrapper/xmlutils/XslErrorListenerAbstract.java#L34-L41 |
150,451 | GerdHolz/TOVAL | src/de/invation/code/toval/file/FileWriter.java | FileWriter.initialize | private synchronized void initialize(String fileName, String path) throws ParameterException {
if(!path.equals(this.path)){
checkPath(path);
this.path = path;
}
if(!fileName.equals(this.fileName)){
checkFileName(fileName);
this.fileName = fileName;
}
} | java | private synchronized void initialize(String fileName, String path) throws ParameterException {
if(!path.equals(this.path)){
checkPath(path);
this.path = path;
}
if(!fileName.equals(this.fileName)){
checkFileName(fileName);
this.fileName = fileName;
}
} | [
"private",
"synchronized",
"void",
"initialize",
"(",
"String",
"fileName",
",",
"String",
"path",
")",
"throws",
"ParameterException",
"{",
"if",
"(",
"!",
"path",
".",
"equals",
"(",
"this",
".",
"path",
")",
")",
"{",
"checkPath",
"(",
"path",
")",
";... | Initializes the file writer with the given file and path names.
@param fileName
@param path
@throws ParameterException if some parameters are <code>null</code>, <br>
the file path is not a directory or the file name is an empty string. | [
"Initializes",
"the",
"file",
"writer",
"with",
"the",
"given",
"file",
"and",
"path",
"names",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/file/FileWriter.java#L286-L295 |
150,452 | GerdHolz/TOVAL | src/de/invation/code/toval/file/FileWriter.java | FileWriter.checkPath | private synchronized void checkPath(String logPath) throws ParameterException {
Validate.notNull(path);
File cPath = new File(logPath);
if(!cPath.exists())
cPath.mkdirs();
if(!cPath.isDirectory())
throw new ParameterException(ErrorCode.INCOMPATIBILITY, logPath + " is not a valid path!");
} | java | private synchronized void checkPath(String logPath) throws ParameterException {
Validate.notNull(path);
File cPath = new File(logPath);
if(!cPath.exists())
cPath.mkdirs();
if(!cPath.isDirectory())
throw new ParameterException(ErrorCode.INCOMPATIBILITY, logPath + " is not a valid path!");
} | [
"private",
"synchronized",
"void",
"checkPath",
"(",
"String",
"logPath",
")",
"throws",
"ParameterException",
"{",
"Validate",
".",
"notNull",
"(",
"path",
")",
";",
"File",
"cPath",
"=",
"new",
"File",
"(",
"logPath",
")",
";",
"if",
"(",
"!",
"cPath",
... | Sets the path for the file writer where output files are put in.
@param logPath Desired log path.
@throws ParameterException if the given path is <code>null</null> or not a directory. | [
"Sets",
"the",
"path",
"for",
"the",
"file",
"writer",
"where",
"output",
"files",
"are",
"put",
"in",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/file/FileWriter.java#L302-L309 |
150,453 | GerdHolz/TOVAL | src/de/invation/code/toval/file/FileWriter.java | FileWriter.checkFileName | private synchronized void checkFileName(String fileName) throws ParameterException{
Validate.notNull(fileName);
File cFile = new File(fileName);
if(cFile.getName().length()==0)
throw new ParameterException(ErrorCode.INCOMPATIBILITY, fileName + " is not a valid file-name!");
} | java | private synchronized void checkFileName(String fileName) throws ParameterException{
Validate.notNull(fileName);
File cFile = new File(fileName);
if(cFile.getName().length()==0)
throw new ParameterException(ErrorCode.INCOMPATIBILITY, fileName + " is not a valid file-name!");
} | [
"private",
"synchronized",
"void",
"checkFileName",
"(",
"String",
"fileName",
")",
"throws",
"ParameterException",
"{",
"Validate",
".",
"notNull",
"(",
"fileName",
")",
";",
"File",
"cFile",
"=",
"new",
"File",
"(",
"fileName",
")",
";",
"if",
"(",
"cFile"... | Sets the name for the output file.
@param fileName Desired file name.
@throws IllegalArgumentException if the given file name is empty. | [
"Sets",
"the",
"name",
"for",
"the",
"output",
"file",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/file/FileWriter.java#L316-L321 |
150,454 | GerdHolz/TOVAL | src/de/invation/code/toval/file/FileWriter.java | FileWriter.prepareFile | private synchronized void prepareFile() throws IOException{
outputFile = new File(getFileName());
if(outputFile.exists())
outputFile.delete();
if(outputFile.isDirectory())
throw new IOException("I/O Error on creating file: File is a directory!");
outputFile.createNewFile();
if(!outputFile.canWrite())
... | java | private synchronized void prepareFile() throws IOException{
outputFile = new File(getFileName());
if(outputFile.exists())
outputFile.delete();
if(outputFile.isDirectory())
throw new IOException("I/O Error on creating file: File is a directory!");
outputFile.createNewFile();
if(!outputFile.canWrite())
... | [
"private",
"synchronized",
"void",
"prepareFile",
"(",
")",
"throws",
"IOException",
"{",
"outputFile",
"=",
"new",
"File",
"(",
"getFileName",
"(",
")",
")",
";",
"if",
"(",
"outputFile",
".",
"exists",
"(",
")",
")",
"outputFile",
".",
"delete",
"(",
"... | Creates the output file on the file system.
@throws IOException if the output file is a directory or not writable. | [
"Creates",
"the",
"output",
"file",
"on",
"the",
"file",
"system",
"."
] | 036922cdfd710fa53b18e5dbe1e07f226f731fde | https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/file/FileWriter.java#L327-L336 |
150,455 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getAllFields | public ArrayList<Field> getAllFields() {
final ArrayList<Field> r = new ArrayList<Field>();
final List<String> ids = new ArrayList<String>();
if (getFields() != null) {
for (Field field : getFields()) {
r.add(field);
ids.add(field.getId());
... | java | public ArrayList<Field> getAllFields() {
final ArrayList<Field> r = new ArrayList<Field>();
final List<String> ids = new ArrayList<String>();
if (getFields() != null) {
for (Field field : getFields()) {
r.add(field);
ids.add(field.getId());
... | [
"public",
"ArrayList",
"<",
"Field",
">",
"getAllFields",
"(",
")",
"{",
"final",
"ArrayList",
"<",
"Field",
">",
"r",
"=",
"new",
"ArrayList",
"<",
"Field",
">",
"(",
")",
";",
"final",
"List",
"<",
"String",
">",
"ids",
"=",
"new",
"ArrayList",
"<"... | Return the list of fields including inherited ones.
@return The list | [
"Return",
"the",
"list",
"of",
"fields",
"including",
"inherited",
"ones",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L118-L135 |
150,456 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getList | public List<?> getList(PMContext ctx, EntityFilter filter) throws PMException {
return getList(ctx, filter, null, null, null);
} | java | public List<?> getList(PMContext ctx, EntityFilter filter) throws PMException {
return getList(ctx, filter, null, null, null);
} | [
"public",
"List",
"<",
"?",
">",
"getList",
"(",
"PMContext",
"ctx",
",",
"EntityFilter",
"filter",
")",
"throws",
"PMException",
"{",
"return",
"getList",
"(",
"ctx",
",",
"filter",
",",
"null",
",",
"null",
",",
"null",
")",
";",
"}"
] | Returns a list of this entity instances with null from and count and with
the given filter
@param ctx The context
@param filter The filter
@return The list
@throws PMException | [
"Returns",
"a",
"list",
"of",
"this",
"entity",
"instances",
"with",
"null",
"from",
"and",
"count",
"and",
"with",
"the",
"given",
"filter"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L146-L148 |
150,457 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getList | public List<?> getList(PMContext ctx) throws PMException {
final EntityFilter filter = (ctx != null && this.equals(ctx.getEntity())) ? ctx.getEntityContainer().getFilter() : null;
return getList(ctx, filter, null, null, null);
} | java | public List<?> getList(PMContext ctx) throws PMException {
final EntityFilter filter = (ctx != null && this.equals(ctx.getEntity())) ? ctx.getEntityContainer().getFilter() : null;
return getList(ctx, filter, null, null, null);
} | [
"public",
"List",
"<",
"?",
">",
"getList",
"(",
"PMContext",
"ctx",
")",
"throws",
"PMException",
"{",
"final",
"EntityFilter",
"filter",
"=",
"(",
"ctx",
"!=",
"null",
"&&",
"this",
".",
"equals",
"(",
"ctx",
".",
"getEntity",
"(",
")",
")",
")",
"... | Return a list of this entity instances with null from and count and the
filter took from the entity container of the context
@param ctx The context
@return The list
@throws PMException | [
"Return",
"a",
"list",
"of",
"this",
"entity",
"instances",
"with",
"null",
"from",
"and",
"count",
"and",
"the",
"filter",
"took",
"from",
"the",
"entity",
"container",
"of",
"the",
"context"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L158-L161 |
150,458 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getList | public List<?> getList(PMContext ctx, EntityFilter filter, ListSort sort, Integer from, Integer count) throws PMException {
return getDataAccess().list(ctx, filter, null, sort, from, count);
} | java | public List<?> getList(PMContext ctx, EntityFilter filter, ListSort sort, Integer from, Integer count) throws PMException {
return getDataAccess().list(ctx, filter, null, sort, from, count);
} | [
"public",
"List",
"<",
"?",
">",
"getList",
"(",
"PMContext",
"ctx",
",",
"EntityFilter",
"filter",
",",
"ListSort",
"sort",
",",
"Integer",
"from",
",",
"Integer",
"count",
")",
"throws",
"PMException",
"{",
"return",
"getDataAccess",
"(",
")",
".",
"list... | Returns a list taken from data access with the given parameters.
@param ctx The context
@param filter A filter
@param from The index of the first element
@param count The maximun number of items retrieved
@return The list
@throws PMException | [
"Returns",
"a",
"list",
"taken",
"from",
"data",
"access",
"with",
"the",
"given",
"parameters",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L173-L175 |
150,459 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getFieldsbyid | private Map<String, Field> getFieldsbyid() {
if (fieldsbyid == null) {
fieldsbyid = new HashMap<String, Field>();
for (Field f : getAllFields()) {
fieldsbyid.put(f.getId(), f);
}
}
return fieldsbyid;
} | java | private Map<String, Field> getFieldsbyid() {
if (fieldsbyid == null) {
fieldsbyid = new HashMap<String, Field>();
for (Field f : getAllFields()) {
fieldsbyid.put(f.getId(), f);
}
}
return fieldsbyid;
} | [
"private",
"Map",
"<",
"String",
",",
"Field",
">",
"getFieldsbyid",
"(",
")",
"{",
"if",
"(",
"fieldsbyid",
"==",
"null",
")",
"{",
"fieldsbyid",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Field",
">",
"(",
")",
";",
"for",
"(",
"Field",
"f",
":"... | Getter for fieldsbyid. If its null, this methods fill it
@return The mapped field list | [
"Getter",
"for",
"fieldsbyid",
".",
"If",
"its",
"null",
"this",
"methods",
"fill",
"it"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L207-L215 |
150,460 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getOrderedFields | public ArrayList<Field> getOrderedFields() {
try {
if (isOrdered()) {
ArrayList<Field> r = new ArrayList<Field>(getAllFields());
Collections.sort(r, new FieldComparator(getOrder()));
return r;
}
} catch (Exception e) {
g... | java | public ArrayList<Field> getOrderedFields() {
try {
if (isOrdered()) {
ArrayList<Field> r = new ArrayList<Field>(getAllFields());
Collections.sort(r, new FieldComparator(getOrder()));
return r;
}
} catch (Exception e) {
g... | [
"public",
"ArrayList",
"<",
"Field",
">",
"getOrderedFields",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"isOrdered",
"(",
")",
")",
"{",
"ArrayList",
"<",
"Field",
">",
"r",
"=",
"new",
"ArrayList",
"<",
"Field",
">",
"(",
"getAllFields",
"(",
")",
")",
... | This method sorts the fields and returns them
@return fields ordered | [
"This",
"method",
"sorts",
"the",
"fields",
"and",
"returns",
"them"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L223-L234 |
150,461 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.fillFields | @Deprecated
public void fillFields(Entity entity) {
for (Field field : entity.getAllFields()) {
if (!containsField(field.getId())) {
getFields().add(field);
}
}
} | java | @Deprecated
public void fillFields(Entity entity) {
for (Field field : entity.getAllFields()) {
if (!containsField(field.getId())) {
getFields().add(field);
}
}
} | [
"@",
"Deprecated",
"public",
"void",
"fillFields",
"(",
"Entity",
"entity",
")",
"{",
"for",
"(",
"Field",
"field",
":",
"entity",
".",
"getAllFields",
"(",
")",
")",
"{",
"if",
"(",
"!",
"containsField",
"(",
"field",
".",
"getId",
"(",
")",
")",
")... | This method fills the extendsFields variable with the parent Fields. If
some field is redefined, parent field is ignored
@param entity The parent entity given by PM engine | [
"This",
"method",
"fills",
"the",
"extendsFields",
"variable",
"with",
"the",
"parent",
"Fields",
".",
"If",
"some",
"field",
"is",
"redefined",
"parent",
"field",
"is",
"ignored"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L261-L268 |
150,462 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getWeak | public Entity getWeak(Field field) {
for (Entity entity : getWeaks()) {
if (entity.getOwner().getEntityProperty().equals(field.getProperty())) {
return entity;
}
}
return null;
} | java | public Entity getWeak(Field field) {
for (Entity entity : getWeaks()) {
if (entity.getOwner().getEntityProperty().equals(field.getProperty())) {
return entity;
}
}
return null;
} | [
"public",
"Entity",
"getWeak",
"(",
"Field",
"field",
")",
"{",
"for",
"(",
"Entity",
"entity",
":",
"getWeaks",
"(",
")",
")",
"{",
"if",
"(",
"entity",
".",
"getOwner",
"(",
")",
".",
"getEntityProperty",
"(",
")",
".",
"equals",
"(",
"field",
".",... | Looks for the weak entity corresponding to the given field in this string
entity
@param field
@return the weak entity | [
"Looks",
"for",
"the",
"weak",
"entity",
"corresponding",
"to",
"the",
"given",
"field",
"in",
"this",
"string",
"entity"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L483-L490 |
150,463 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getHighlight | public Highlight getHighlight(Field field, Object instance) {
if (getHighlights() == null) {
return null;
}
return getHighlights().getHighlight(this, field, instance);
} | java | public Highlight getHighlight(Field field, Object instance) {
if (getHighlights() == null) {
return null;
}
return getHighlights().getHighlight(this, field, instance);
} | [
"public",
"Highlight",
"getHighlight",
"(",
"Field",
"field",
",",
"Object",
"instance",
")",
"{",
"if",
"(",
"getHighlights",
"(",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"getHighlights",
"(",
")",
".",
"getHighlight",
"(",
"t... | Looks for an apropiate highlight for this field+instance
@param field
@param instance
@return the highlight | [
"Looks",
"for",
"an",
"apropiate",
"highlight",
"for",
"this",
"field",
"+",
"instance"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L556-L561 |
150,464 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getHighlights | public List<Highlight> getHighlights(Field field, Object instance) {
if (getHighlights() == null) {
return null;
}
return getHighlights().getHighlights(this, field, instance);
} | java | public List<Highlight> getHighlights(Field field, Object instance) {
if (getHighlights() == null) {
return null;
}
return getHighlights().getHighlights(this, field, instance);
} | [
"public",
"List",
"<",
"Highlight",
">",
"getHighlights",
"(",
"Field",
"field",
",",
"Object",
"instance",
")",
"{",
"if",
"(",
"getHighlights",
"(",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"getHighlights",
"(",
")",
".",
"g... | Looks for all the apropiate highlight for this field+instance
@param field
@param instance
@return the highlight | [
"Looks",
"for",
"all",
"the",
"apropiate",
"highlight",
"for",
"this",
"field",
"+",
"instance"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L570-L575 |
150,465 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java | Entity.getTitle | public String getTitle() {
final String key = String.format("pm.entity.%s", getId());
final String message = pm.message(key);
if (key.equals(message)) {
if (getExtendzEntity() != null) {
return getExtendzEntity().getTitle();
}
}
return mess... | java | public String getTitle() {
final String key = String.format("pm.entity.%s", getId());
final String message = pm.message(key);
if (key.equals(message)) {
if (getExtendzEntity() != null) {
return getExtendzEntity().getTitle();
}
}
return mess... | [
"public",
"String",
"getTitle",
"(",
")",
"{",
"final",
"String",
"key",
"=",
"String",
".",
"format",
"(",
"\"pm.entity.%s\"",
",",
"getId",
"(",
")",
")",
";",
"final",
"String",
"message",
"=",
"pm",
".",
"message",
"(",
"key",
")",
";",
"if",
"("... | Returns the internationalized entity title | [
"Returns",
"the",
"internationalized",
"entity",
"title"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/core/Entity.java#L596-L605 |
150,466 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/drives/DriveOperationsSequence.java | DriveOperationsSequence.add | public void add(Operation operation) {
synchronized (operations) {
operations.addLast(operation);
if (waiting)
sp.unblock();
}
if (autoStart && operations.size() == 1 && getStatus() == Task.STATUS_NOT_STARTED)
start();
} | java | public void add(Operation operation) {
synchronized (operations) {
operations.addLast(operation);
if (waiting)
sp.unblock();
}
if (autoStart && operations.size() == 1 && getStatus() == Task.STATUS_NOT_STARTED)
start();
} | [
"public",
"void",
"add",
"(",
"Operation",
"operation",
")",
"{",
"synchronized",
"(",
"operations",
")",
"{",
"operations",
".",
"addLast",
"(",
"operation",
")",
";",
"if",
"(",
"waiting",
")",
"sp",
".",
"unblock",
"(",
")",
";",
"}",
"if",
"(",
"... | Append an operation. | [
"Append",
"an",
"operation",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/drives/DriveOperationsSequence.java#L36-L44 |
150,467 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/menu/MenuItem.java | MenuItem.parseLocation | public void parseLocation(String location, String value) {
setLocationValue(value);
setLocation(PresentationManager.getPm().getLocation(location));
} | java | public void parseLocation(String location, String value) {
setLocationValue(value);
setLocation(PresentationManager.getPm().getLocation(location));
} | [
"public",
"void",
"parseLocation",
"(",
"String",
"location",
",",
"String",
"value",
")",
"{",
"setLocationValue",
"(",
"value",
")",
";",
"setLocation",
"(",
"PresentationManager",
".",
"getPm",
"(",
")",
".",
"getLocation",
"(",
"location",
")",
")",
";",... | Recover from the service the location object and set it and the value to
this item.
@param location The id to look into the conficuration file pm.locations.xml
@param value The location value | [
"Recover",
"from",
"the",
"service",
"the",
"location",
"object",
"and",
"set",
"it",
"and",
"the",
"value",
"to",
"this",
"item",
"."
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/menu/MenuItem.java#L60-L63 |
150,468 | xebia-france/xebia-management-extras | src/main/java/fr/xebia/management/jms/leak/LeakDetectorConnectionFactory.java | LeakDetectorConnectionFactory.dumpAllOpenedResources | public List<String> dumpAllOpenedResources() {
List<String> dumps = new ArrayList<String>();
for (LeakDetectorConnection connection : openConnections) {
dumps.add(connection.dumpCreationContext(""));
for (LeakDetectorSession session : connection.getOpenSessions()) {
... | java | public List<String> dumpAllOpenedResources() {
List<String> dumps = new ArrayList<String>();
for (LeakDetectorConnection connection : openConnections) {
dumps.add(connection.dumpCreationContext(""));
for (LeakDetectorSession session : connection.getOpenSessions()) {
... | [
"public",
"List",
"<",
"String",
">",
"dumpAllOpenedResources",
"(",
")",
"{",
"List",
"<",
"String",
">",
"dumps",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"LeakDetectorConnection",
"connection",
":",
"openConnections",
")",
... | List all the currently opened connection, session, message producer,
message consumer
@return | [
"List",
"all",
"the",
"currently",
"opened",
"connection",
"session",
"message",
"producer",
"message",
"consumer"
] | 09f52a0ddb898e402a04f0adfacda74a5d0556e8 | https://github.com/xebia-france/xebia-management-extras/blob/09f52a0ddb898e402a04f0adfacda74a5d0556e8/src/main/java/fr/xebia/management/jms/leak/LeakDetectorConnectionFactory.java#L81-L96 |
150,469 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java | AppClassLoader.add | public AbstractClassLoader add(File location, Collection<String> exportedJars) {
AbstractClassLoader cl;
if (location.isDirectory())
cl = new DirectoryClassLoader(this, location);
else
cl = new ZipClassLoader(this, new FileIOProvider(location));
if (exportedJars != null)
for (String jar : export... | java | public AbstractClassLoader add(File location, Collection<String> exportedJars) {
AbstractClassLoader cl;
if (location.isDirectory())
cl = new DirectoryClassLoader(this, location);
else
cl = new ZipClassLoader(this, new FileIOProvider(location));
if (exportedJars != null)
for (String jar : export... | [
"public",
"AbstractClassLoader",
"add",
"(",
"File",
"location",
",",
"Collection",
"<",
"String",
">",
"exportedJars",
")",
"{",
"AbstractClassLoader",
"cl",
";",
"if",
"(",
"location",
".",
"isDirectory",
"(",
")",
")",
"cl",
"=",
"new",
"DirectoryClassLoade... | Add a library. | [
"Add",
"a",
"library",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java#L47-L60 |
150,470 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java | AppClassLoader.getResourceURL | public URL getResourceURL(String name) {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
for (int i = 0; i < libs.size(); i++) {
AbstractClassLoader cl = libs.get(i);
URL url = cl.loadResourceURL(name);
if (url != null) return url;
}
... | java | public URL getResourceURL(String name) {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
for (int i = 0; i < libs.size(); i++) {
AbstractClassLoader cl = libs.get(i);
URL url = cl.loadResourceURL(name);
if (url != null) return url;
}
... | [
"public",
"URL",
"getResourceURL",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"name",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"name",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
"'",
")",
"name",
"=",
"name",
".... | Search a resource. | [
"Search",
"a",
"resource",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java#L146-L156 |
150,471 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java | AppClassLoader.getResourceAsStreamFrom | @SuppressWarnings("resource")
public InputStream getResourceAsStreamFrom(String name, AbstractClassLoader first) {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
IO.Readable io = null;
// try with the first one
if (first != null)
try { io = first.... | java | @SuppressWarnings("resource")
public InputStream getResourceAsStreamFrom(String name, AbstractClassLoader first) {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
IO.Readable io = null;
// try with the first one
if (first != null)
try { io = first.... | [
"@",
"SuppressWarnings",
"(",
"\"resource\"",
")",
"public",
"InputStream",
"getResourceAsStreamFrom",
"(",
"String",
"name",
",",
"AbstractClassLoader",
"first",
")",
"{",
"if",
"(",
"name",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"null",
";",
"i... | Load a resource, looking first into the given library. | [
"Load",
"a",
"resource",
"looking",
"first",
"into",
"the",
"given",
"library",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java#L159-L182 |
150,472 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java | AppClassLoader.getResourceFrom | public URL getResourceFrom(String name, AbstractClassLoader first) {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
URL url = null;
// try with the first one
if (first != null)
url = first.getResourceURL(name);
// then, try on other libraries
... | java | public URL getResourceFrom(String name, AbstractClassLoader first) {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
URL url = null;
// try with the first one
if (first != null)
url = first.getResourceURL(name);
// then, try on other libraries
... | [
"public",
"URL",
"getResourceFrom",
"(",
"String",
"name",
",",
"AbstractClassLoader",
"first",
")",
"{",
"if",
"(",
"name",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"name",
".",
"charAt",
"(",
"0",
")",
"==",
"'",
... | Search a resource, looking first into the given library. | [
"Search",
"a",
"resource",
"looking",
"first",
"into",
"the",
"given",
"library",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java#L185-L204 |
150,473 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java | AppClassLoader.getResources | public Enumeration<URL> getResources(String name) throws IOException {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
CompoundCollection<URL> list = new CompoundCollection<>();
for (int i = 0; i < libs.size(); i++) {
AbstractClassLoader cl = libs.get(i);
... | java | public Enumeration<URL> getResources(String name) throws IOException {
if (name.length() == 0) return null;
if (name.charAt(0) == '/') name = name.substring(1);
CompoundCollection<URL> list = new CompoundCollection<>();
for (int i = 0; i < libs.size(); i++) {
AbstractClassLoader cl = libs.get(i);
... | [
"public",
"Enumeration",
"<",
"URL",
">",
"getResources",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"if",
"(",
"name",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"name",
".",
"charAt",
"(",
"0",
")",
... | Search for resources. | [
"Search",
"for",
"resources",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java#L207-L218 |
150,474 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java | AppClassLoader.scanLibraries | public void scanLibraries(
String rootPackage, boolean includeSubPackages,
Filter<String> packageFilter, Filter<String> classFilter, Listener<Class<?>> classScanner
) {
for (AbstractClassLoader cl : libs)
cl.scan(rootPackage, includeSubPackages, packageFilter, classFilter, classScanner);
} | java | public void scanLibraries(
String rootPackage, boolean includeSubPackages,
Filter<String> packageFilter, Filter<String> classFilter, Listener<Class<?>> classScanner
) {
for (AbstractClassLoader cl : libs)
cl.scan(rootPackage, includeSubPackages, packageFilter, classFilter, classScanner);
} | [
"public",
"void",
"scanLibraries",
"(",
"String",
"rootPackage",
",",
"boolean",
"includeSubPackages",
",",
"Filter",
"<",
"String",
">",
"packageFilter",
",",
"Filter",
"<",
"String",
">",
"classFilter",
",",
"Listener",
"<",
"Class",
"<",
"?",
">",
">",
"c... | Scan libraries to find classes. | [
"Scan",
"libraries",
"to",
"find",
"classes",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/libraries/classloader/AppClassLoader.java#L259-L265 |
150,475 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java | Decoder.get | public static Decoder get(Charset charset) throws Exception {
Class<? extends Decoder> cl = decoders.get(charset.name());
if (cl == null) {
CharsetDecoder decoder = charset.newDecoder();
decoder.onMalformedInput(CodingErrorAction.REPLACE);
decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
return... | java | public static Decoder get(Charset charset) throws Exception {
Class<? extends Decoder> cl = decoders.get(charset.name());
if (cl == null) {
CharsetDecoder decoder = charset.newDecoder();
decoder.onMalformedInput(CodingErrorAction.REPLACE);
decoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
return... | [
"public",
"static",
"Decoder",
"get",
"(",
"Charset",
"charset",
")",
"throws",
"Exception",
"{",
"Class",
"<",
"?",
"extends",
"Decoder",
">",
"cl",
"=",
"decoders",
".",
"get",
"(",
"charset",
".",
"name",
"(",
")",
")",
";",
"if",
"(",
"cl",
"==",... | Get a decoder for the given charset. | [
"Get",
"a",
"decoder",
"for",
"the",
"given",
"charset",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java#L25-L34 |
150,476 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java | Decoder.register | public static void register(Charset charset, Class<? extends Decoder> decoder) {
decoders.put(charset.name(), decoder);
} | java | public static void register(Charset charset, Class<? extends Decoder> decoder) {
decoders.put(charset.name(), decoder);
} | [
"public",
"static",
"void",
"register",
"(",
"Charset",
"charset",
",",
"Class",
"<",
"?",
"extends",
"Decoder",
">",
"decoder",
")",
"{",
"decoders",
".",
"put",
"(",
"charset",
".",
"name",
"(",
")",
",",
"decoder",
")",
";",
"}"
] | Register a decoder implementation. | [
"Register",
"a",
"decoder",
"implementation",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java#L37-L39 |
150,477 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java | Decoder.setInput | public void setInput(IO.Readable.Buffered io) {
this.io = io;
this.nextBuffer = io.readNextBufferAsync();
} | java | public void setInput(IO.Readable.Buffered io) {
this.io = io;
this.nextBuffer = io.readNextBufferAsync();
} | [
"public",
"void",
"setInput",
"(",
"IO",
".",
"Readable",
".",
"Buffered",
"io",
")",
"{",
"this",
".",
"io",
"=",
"io",
";",
"this",
".",
"nextBuffer",
"=",
"io",
".",
"readNextBufferAsync",
"(",
")",
";",
"}"
] | Set readable IO to decode. | [
"Set",
"readable",
"IO",
"to",
"decode",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java#L58-L61 |
150,478 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java | Decoder.transferTo | public void transferTo(Decoder newDecoder) {
newDecoder.io = io;
newDecoder.nextBuffer = nextBuffer;
newDecoder.currentBuffer = currentBuffer;
} | java | public void transferTo(Decoder newDecoder) {
newDecoder.io = io;
newDecoder.nextBuffer = nextBuffer;
newDecoder.currentBuffer = currentBuffer;
} | [
"public",
"void",
"transferTo",
"(",
"Decoder",
"newDecoder",
")",
"{",
"newDecoder",
".",
"io",
"=",
"io",
";",
"newDecoder",
".",
"nextBuffer",
"=",
"nextBuffer",
";",
"newDecoder",
".",
"currentBuffer",
"=",
"currentBuffer",
";",
"}"
] | Change charset by transfering the current state of this decoder to the new one. | [
"Change",
"charset",
"by",
"transfering",
"the",
"current",
"state",
"of",
"this",
"decoder",
"to",
"the",
"new",
"one",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java#L64-L68 |
150,479 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java | Decoder.decode | public int decode(char[] chars, int pos, int len, MutableBoolean interrupt, int min) throws IOException, CancelException {
if (min > len) min = len;
int nb = 0;
do {
if (currentBuffer == null) {
if (nextBuffer.isUnblocked())
currentBuffer = nextBuffer.blockResult(0);
else
return nb > 0 ? nb :... | java | public int decode(char[] chars, int pos, int len, MutableBoolean interrupt, int min) throws IOException, CancelException {
if (min > len) min = len;
int nb = 0;
do {
if (currentBuffer == null) {
if (nextBuffer.isUnblocked())
currentBuffer = nextBuffer.blockResult(0);
else
return nb > 0 ? nb :... | [
"public",
"int",
"decode",
"(",
"char",
"[",
"]",
"chars",
",",
"int",
"pos",
",",
"int",
"len",
",",
"MutableBoolean",
"interrupt",
",",
"int",
"min",
")",
"throws",
"IOException",
",",
"CancelException",
"{",
"if",
"(",
"min",
">",
"len",
")",
"min",... | Decode characters from the IO.
@param chars array to fill
@param pos offset in the array to fill
@param len maximum number of characters to fill
@param interrupt when true, the decoding will stop as soon as possible
@param min minimum number of characters to fill, regardless of the interrupt value
@return number of dec... | [
"Decode",
"characters",
"from",
"the",
"IO",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java#L91-L114 |
150,480 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java | Decoder.decode | public int decode(ByteBuffer b, char[] chars, int pos, int len) {
if (io != null)
throw new IllegalStateException();
return decode(b, chars, pos, len, null, 1);
} | java | public int decode(ByteBuffer b, char[] chars, int pos, int len) {
if (io != null)
throw new IllegalStateException();
return decode(b, chars, pos, len, null, 1);
} | [
"public",
"int",
"decode",
"(",
"ByteBuffer",
"b",
",",
"char",
"[",
"]",
"chars",
",",
"int",
"pos",
",",
"int",
"len",
")",
"{",
"if",
"(",
"io",
"!=",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"return",
"decode",
"(",
... | Decode characters without IO. | [
"Decode",
"characters",
"without",
"IO",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/text/Decoder.java#L117-L121 |
150,481 | xfcjscn/sudoor-server-lib | src/main/java/net/gplatform/sudoor/server/cors/StringManager.java | StringManager.getString | public String getString(String key) {
if(key == null){
String msg = "key may not have a null value";
throw new IllegalArgumentException(msg);
}
String str = null;
try {
// Avoid NPE if bundle is null and treat it like an MRE
if (bundle != null) {
str = bundle.getString(key);
}... | java | public String getString(String key) {
if(key == null){
String msg = "key may not have a null value";
throw new IllegalArgumentException(msg);
}
String str = null;
try {
// Avoid NPE if bundle is null and treat it like an MRE
if (bundle != null) {
str = bundle.getString(key);
}... | [
"public",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"String",
"msg",
"=",
"\"key may not have a null value\"",
";",
"throw",
"new",
"IllegalArgumentException",
"(",
"msg",
")",
";",
"}",
"String",
"str",... | Get a string from the underlying resource bundle or return
null if the String is not found.
@param key to desired resource String
@return resource String matching <i>key</i> from underlying
bundle or null if not found.
@throws IllegalArgumentException if <i>key</i> is null. | [
"Get",
"a",
"string",
"from",
"the",
"underlying",
"resource",
"bundle",
"or",
"return",
"null",
"if",
"the",
"String",
"is",
"not",
"found",
"."
] | 37dc1996eaa9cad25c82abd1de315ba565e32097 | https://github.com/xfcjscn/sudoor-server-lib/blob/37dc1996eaa9cad25c82abd1de315ba565e32097/src/main/java/net/gplatform/sudoor/server/cors/StringManager.java#L138-L168 |
150,482 | xfcjscn/sudoor-server-lib | src/main/java/net/gplatform/sudoor/server/cors/StringManager.java | StringManager.getManager | public static StringManager getManager(String packageName,
Enumeration<Locale> requestedLocales) {
while (requestedLocales.hasMoreElements()) {
Locale locale = requestedLocales.nextElement();
StringManager result = getManager(packageName, locale);
if (result.getLo... | java | public static StringManager getManager(String packageName,
Enumeration<Locale> requestedLocales) {
while (requestedLocales.hasMoreElements()) {
Locale locale = requestedLocales.nextElement();
StringManager result = getManager(packageName, locale);
if (result.getLo... | [
"public",
"static",
"StringManager",
"getManager",
"(",
"String",
"packageName",
",",
"Enumeration",
"<",
"Locale",
">",
"requestedLocales",
")",
"{",
"while",
"(",
"requestedLocales",
".",
"hasMoreElements",
"(",
")",
")",
"{",
"Locale",
"locale",
"=",
"request... | Retrieve the StringManager for a list of Locales. The first StringManager
found will be returned.
@param requestedLocales the list of Locales
@return the found StringManager or the default StringManager | [
"Retrieve",
"the",
"StringManager",
"for",
"a",
"list",
"of",
"Locales",
".",
"The",
"first",
"StringManager",
"found",
"will",
"be",
"returned",
"."
] | 37dc1996eaa9cad25c82abd1de315ba565e32097 | https://github.com/xfcjscn/sudoor-server-lib/blob/37dc1996eaa9cad25c82abd1de315ba565e32097/src/main/java/net/gplatform/sudoor/server/cors/StringManager.java#L265-L276 |
150,483 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/IOWritePool.java | IOWritePool.write | public void write(ByteBuffer buffer) throws IOException {
synchronized (buffers) {
if (writing == null) {
writing = io.writeAsync(buffer);
writing.listenInline(listener);
return;
}
if (writing.hasError()) throw writing.getError();
buffers.add(buffer);
}
} | java | public void write(ByteBuffer buffer) throws IOException {
synchronized (buffers) {
if (writing == null) {
writing = io.writeAsync(buffer);
writing.listenInline(listener);
return;
}
if (writing.hasError()) throw writing.getError();
buffers.add(buffer);
}
} | [
"public",
"void",
"write",
"(",
"ByteBuffer",
"buffer",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"buffers",
")",
"{",
"if",
"(",
"writing",
"==",
"null",
")",
"{",
"writing",
"=",
"io",
".",
"writeAsync",
"(",
"buffer",
")",
";",
"writing"... | Write the given buffer. | [
"Write",
"the",
"given",
"buffer",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/IOWritePool.java#L36-L46 |
150,484 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/io/IOWritePool.java | IOWritePool.onDone | public SynchronizationPoint<IOException> onDone() {
synchronized (buffers) {
if (writing == null) return new SynchronizationPoint<>(true);
if (writing.hasError()) return new SynchronizationPoint<IOException>(writing.getError());
if (writing.isCancelled()) return new SynchronizationPoint<IOException>(writing.... | java | public SynchronizationPoint<IOException> onDone() {
synchronized (buffers) {
if (writing == null) return new SynchronizationPoint<>(true);
if (writing.hasError()) return new SynchronizationPoint<IOException>(writing.getError());
if (writing.isCancelled()) return new SynchronizationPoint<IOException>(writing.... | [
"public",
"SynchronizationPoint",
"<",
"IOException",
">",
"onDone",
"(",
")",
"{",
"synchronized",
"(",
"buffers",
")",
"{",
"if",
"(",
"writing",
"==",
"null",
")",
"return",
"new",
"SynchronizationPoint",
"<>",
"(",
"true",
")",
";",
"if",
"(",
"writing... | Must be called once all write operations have been done, and only one time. | [
"Must",
"be",
"called",
"once",
"all",
"write",
"operations",
"have",
"been",
"done",
"and",
"only",
"one",
"time",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/io/IOWritePool.java#L51-L59 |
150,485 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java | RangeHashFunction.sort | private void sort() {
RangeHashSorter sortMachine;
sortMachine = new RangeHashSorter(maxRangeValues, filenames);
sortMachine.quickSort();
generateBucketIds();
} | java | private void sort() {
RangeHashSorter sortMachine;
sortMachine = new RangeHashSorter(maxRangeValues, filenames);
sortMachine.quickSort();
generateBucketIds();
} | [
"private",
"void",
"sort",
"(",
")",
"{",
"RangeHashSorter",
"sortMachine",
";",
"sortMachine",
"=",
"new",
"RangeHashSorter",
"(",
"maxRangeValues",
",",
"filenames",
")",
";",
"sortMachine",
".",
"quickSort",
"(",
")",
";",
"generateBucketIds",
"(",
")",
";"... | Sorts the max range values corresponding to the file names and the bucket sizes. | [
"Sorts",
"the",
"max",
"range",
"values",
"corresponding",
"to",
"the",
"file",
"names",
"and",
"the",
"bucket",
"sizes",
"."
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java#L127-L132 |
150,486 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java | RangeHashFunction.generateBucketIds | private void generateBucketIds() {
// generate indexes for buckets, needed if two different ranges belong to the same file
this.buckets = 0;
bucketIds = new int[filenames.length];
HashMap<String, Integer> tmpSeenFilenames = new HashMap<String, Integer>();
for (int i = 0; i < fil... | java | private void generateBucketIds() {
// generate indexes for buckets, needed if two different ranges belong to the same file
this.buckets = 0;
bucketIds = new int[filenames.length];
HashMap<String, Integer> tmpSeenFilenames = new HashMap<String, Integer>();
for (int i = 0; i < fil... | [
"private",
"void",
"generateBucketIds",
"(",
")",
"{",
"// generate indexes for buckets, needed if two different ranges belong to the same file",
"this",
".",
"buckets",
"=",
"0",
";",
"bucketIds",
"=",
"new",
"int",
"[",
"filenames",
".",
"length",
"]",
";",
"HashMap",... | generates the correct index structure, namely the bucketIds to the already initialized filenames and
maxRangeValues | [
"generates",
"the",
"correct",
"index",
"structure",
"namely",
"the",
"bucketIds",
"to",
"the",
"already",
"initialized",
"filenames",
"and",
"maxRangeValues"
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java#L161-L174 |
150,487 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java | RangeHashFunction.makeOneLine | private String makeOneLine(byte[] value, String filename) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < value.length; i++) {
sb.append(value[i]).append('\t');
}
sb.append(filename);
return sb.toString();
} | java | private String makeOneLine(byte[] value, String filename) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < value.length; i++) {
sb.append(value[i]).append('\t');
}
sb.append(filename);
return sb.toString();
} | [
"private",
"String",
"makeOneLine",
"(",
"byte",
"[",
"]",
"value",
",",
"String",
"filename",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"value",
".",
"length",
";",
... | Concatenates the given range value and the file name to one string. It is used to write the hash function file. | [
"Concatenates",
"the",
"given",
"range",
"value",
"and",
"the",
"file",
"name",
"to",
"one",
"string",
".",
"It",
"is",
"used",
"to",
"write",
"the",
"hash",
"function",
"file",
"."
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java#L237-L244 |
150,488 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java | RangeHashFunction.generateFileName | protected String generateFileName(int subBucket, String oldName) {
int dotPos = oldName.lastIndexOf(".");
int slashPos = Math.max(oldName.lastIndexOf("/"), oldName.lastIndexOf("\\"));
String prefix;
String suffix;
if (dotPos > slashPos) {
prefix = oldName.substring(0... | java | protected String generateFileName(int subBucket, String oldName) {
int dotPos = oldName.lastIndexOf(".");
int slashPos = Math.max(oldName.lastIndexOf("/"), oldName.lastIndexOf("\\"));
String prefix;
String suffix;
if (dotPos > slashPos) {
prefix = oldName.substring(0... | [
"protected",
"String",
"generateFileName",
"(",
"int",
"subBucket",
",",
"String",
"oldName",
")",
"{",
"int",
"dotPos",
"=",
"oldName",
".",
"lastIndexOf",
"(",
"\".\"",
")",
";",
"int",
"slashPos",
"=",
"Math",
".",
"max",
"(",
"oldName",
".",
"lastIndex... | generates a new filename for a subbucket from the given oldName
@param subBucket
@param oldName
@return | [
"generates",
"a",
"new",
"filename",
"for",
"a",
"subbucket",
"from",
"the",
"given",
"oldName"
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java#L307-L321 |
150,489 | mgledi/DRUMS | src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java | RangeHashFunction.stringToByteCount | public static int stringToByteCount(String code) {
@SuppressWarnings("serial")
HashMap<String, Integer> codingMap = new HashMap<String, Integer>() {
{
put("b", 1);
put("byte", 1);
put("bool", 1);
put("boolean", 1);
... | java | public static int stringToByteCount(String code) {
@SuppressWarnings("serial")
HashMap<String, Integer> codingMap = new HashMap<String, Integer>() {
{
put("b", 1);
put("byte", 1);
put("bool", 1);
put("boolean", 1);
... | [
"public",
"static",
"int",
"stringToByteCount",
"(",
"String",
"code",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"serial\"",
")",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"codingMap",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Integer",
">",
"(",
")... | The header of could contain characters which are not numbers. Some of them can be translated into bytes. E.g.
char would be two byte.
@param code
the code to look for
@return the size of the given code | [
"The",
"header",
"of",
"could",
"contain",
"characters",
"which",
"are",
"not",
"numbers",
".",
"Some",
"of",
"them",
"can",
"be",
"translated",
"into",
"bytes",
".",
"E",
".",
"g",
".",
"char",
"would",
"be",
"two",
"byte",
"."
] | a670f17a2186c9a15725f26617d77ce8e444e072 | https://github.com/mgledi/DRUMS/blob/a670f17a2186c9a15725f26617d77ce8e444e072/src/main/java/com/unister/semweb/drums/bucket/hashfunction/RangeHashFunction.java#L342-L377 |
150,490 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/validator/ValidatorSupport.java | ValidatorSupport.get | public String get (String name, String def) {
if (properties != null) {
Object obj = properties.get (name);
if (obj instanceof String)
return obj.toString();
}
return def;
} | java | public String get (String name, String def) {
if (properties != null) {
Object obj = properties.get (name);
if (obj instanceof String)
return obj.toString();
}
return def;
} | [
"public",
"String",
"get",
"(",
"String",
"name",
",",
"String",
"def",
")",
"{",
"if",
"(",
"properties",
"!=",
"null",
")",
"{",
"Object",
"obj",
"=",
"properties",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"obj",
"instanceof",
"String",
")",
... | Helper for a property
@param name Property name
@param def Default value
@return Property value | [
"Helper",
"for",
"a",
"property"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/validator/ValidatorSupport.java#L30-L37 |
150,491 | jpaoletti/java-presentation-manager | modules/jpm-core/src/main/java/jpaoletti/jpm/validator/ValidatorSupport.java | ValidatorSupport.getInt | public Integer getInt (String name) {
try {
return Integer.parseInt(get(name, "").trim());
} catch (Exception e) {
return null;
}
} | java | public Integer getInt (String name) {
try {
return Integer.parseInt(get(name, "").trim());
} catch (Exception e) {
return null;
}
} | [
"public",
"Integer",
"getInt",
"(",
"String",
"name",
")",
"{",
"try",
"{",
"return",
"Integer",
".",
"parseInt",
"(",
"get",
"(",
"name",
",",
"\"\"",
")",
".",
"trim",
"(",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
... | Helper for an int property
@param name Property name
@return Property value as int | [
"Helper",
"for",
"an",
"int",
"property"
] | d5aab55638383695db244744b4bfe27c5200e04f | https://github.com/jpaoletti/java-presentation-manager/blob/d5aab55638383695db244744b4bfe27c5200e04f/modules/jpm-core/src/main/java/jpaoletti/jpm/validator/ValidatorSupport.java#L42-L48 |
150,492 | jtrfp/javamod | src/main/java/de/quippy/ogg/jorbis/StaticCodeBook.java | StaticCodeBook.unquantize | float[] unquantize(){
if(maptype==1||maptype==2){
int quantvals;
float mindel=float32_unpack(q_min);
float delta=float32_unpack(q_delta);
float[] r=new float[entries*dim];
// maptype 1 and 2 both use a quantized value vector, but
// different sizes
switch(maptype){
... | java | float[] unquantize(){
if(maptype==1||maptype==2){
int quantvals;
float mindel=float32_unpack(q_min);
float delta=float32_unpack(q_delta);
float[] r=new float[entries*dim];
// maptype 1 and 2 both use a quantized value vector, but
// different sizes
switch(maptype){
... | [
"float",
"[",
"]",
"unquantize",
"(",
")",
"{",
"if",
"(",
"maptype",
"==",
"1",
"||",
"maptype",
"==",
"2",
")",
"{",
"int",
"quantvals",
";",
"float",
"mindel",
"=",
"float32_unpack",
"(",
"q_min",
")",
";",
"float",
"delta",
"=",
"float32_unpack",
... | in in an explicit list. Both value lists must be unpacked | [
"in",
"in",
"an",
"explicit",
"list",
".",
"Both",
"value",
"lists",
"must",
"be",
"unpacked"
] | cda4fe943a589dc49415f4413453e2eece72076a | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/ogg/jorbis/StaticCodeBook.java#L356-L407 |
150,493 | mytechia/mytechia_commons | mytechia-commons-modelaction/src/main/java/com/mytechia/commons/framework/modelaction/action/changeaction/ChangeModelAction.java | ChangeModelAction.execute | @Override
public Object execute() throws Exception
{
Object ret = executeChange();
if (changesManager != null)
changesManager.modelChanged();
return ret;
} | java | @Override
public Object execute() throws Exception
{
Object ret = executeChange();
if (changesManager != null)
changesManager.modelChanged();
return ret;
} | [
"@",
"Override",
"public",
"Object",
"execute",
"(",
")",
"throws",
"Exception",
"{",
"Object",
"ret",
"=",
"executeChange",
"(",
")",
";",
"if",
"(",
"changesManager",
"!=",
"null",
")",
"changesManager",
".",
"modelChanged",
"(",
")",
";",
"return",
"ret... | Template method to factorize the execution of the change model
notification.
@return
@throws java.lang.Exception | [
"Template",
"method",
"to",
"factorize",
"the",
"execution",
"of",
"the",
"change",
"model",
"notification",
"."
] | 02251879085f271a1fb51663a1c8eddc8be78ae7 | https://github.com/mytechia/mytechia_commons/blob/02251879085f271a1fb51663a1c8eddc8be78ae7/mytechia-commons-modelaction/src/main/java/com/mytechia/commons/framework/modelaction/action/changeaction/ChangeModelAction.java#L68-L75 |
150,494 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/LoadPropertiesFileTask.java | LoadPropertiesFileTask.loadPropertiesFile | public static AsyncWork<Properties, Exception> loadPropertiesFile(
IO.Readable input, Charset charset, byte priority, IO.OperationType closeInputAtEnd, Listener<Properties> onDone
) {
if (!(input instanceof IO.Readable.Buffered))
input = new PreBufferedReadable(input, 512, priority, 1024, priority, 16);
... | java | public static AsyncWork<Properties, Exception> loadPropertiesFile(
IO.Readable input, Charset charset, byte priority, IO.OperationType closeInputAtEnd, Listener<Properties> onDone
) {
if (!(input instanceof IO.Readable.Buffered))
input = new PreBufferedReadable(input, 512, priority, 1024, priority, 16);
... | [
"public",
"static",
"AsyncWork",
"<",
"Properties",
",",
"Exception",
">",
"loadPropertiesFile",
"(",
"IO",
".",
"Readable",
"input",
",",
"Charset",
"charset",
",",
"byte",
"priority",
",",
"IO",
".",
"OperationType",
"closeInputAtEnd",
",",
"Listener",
"<",
... | Load properties from a Readable IO. | [
"Load",
"properties",
"from",
"a",
"Readable",
"IO",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/LoadPropertiesFileTask.java#L34-L40 |
150,495 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/LoadPropertiesFileTask.java | LoadPropertiesFileTask.loadPropertiesFile | @SuppressWarnings("resource")
public static AsyncWork<Properties, Exception> loadPropertiesFile(
IO.Readable.Buffered input, Charset charset, byte priority, IO.OperationType closeInputAtEnd, Listener<Properties> onDone
) {
BufferedReadableCharacterStream cs = new BufferedReadableCharacterStream(input, charset... | java | @SuppressWarnings("resource")
public static AsyncWork<Properties, Exception> loadPropertiesFile(
IO.Readable.Buffered input, Charset charset, byte priority, IO.OperationType closeInputAtEnd, Listener<Properties> onDone
) {
BufferedReadableCharacterStream cs = new BufferedReadableCharacterStream(input, charset... | [
"@",
"SuppressWarnings",
"(",
"\"resource\"",
")",
"public",
"static",
"AsyncWork",
"<",
"Properties",
",",
"Exception",
">",
"loadPropertiesFile",
"(",
"IO",
".",
"Readable",
".",
"Buffered",
"input",
",",
"Charset",
"charset",
",",
"byte",
"priority",
",",
"... | Load properties from a Buffered IO. | [
"Load",
"properties",
"from",
"a",
"Buffered",
"IO",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/LoadPropertiesFileTask.java#L43-L49 |
150,496 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/LoadPropertiesFileTask.java | LoadPropertiesFileTask.loadPropertiesFile | public static AsyncWork<Properties, Exception> loadPropertiesFile(
BufferedReadableCharacterStream stream, byte priority, IO.OperationType closeStreamAtEnd, Listener<Properties> onDone
) {
LoadPropertiesFileTask task = new LoadPropertiesFileTask(stream, priority, closeStreamAtEnd, onDone);
return task.start(... | java | public static AsyncWork<Properties, Exception> loadPropertiesFile(
BufferedReadableCharacterStream stream, byte priority, IO.OperationType closeStreamAtEnd, Listener<Properties> onDone
) {
LoadPropertiesFileTask task = new LoadPropertiesFileTask(stream, priority, closeStreamAtEnd, onDone);
return task.start(... | [
"public",
"static",
"AsyncWork",
"<",
"Properties",
",",
"Exception",
">",
"loadPropertiesFile",
"(",
"BufferedReadableCharacterStream",
"stream",
",",
"byte",
"priority",
",",
"IO",
".",
"OperationType",
"closeStreamAtEnd",
",",
"Listener",
"<",
"Properties",
">",
... | Load properties from a character stream. | [
"Load",
"properties",
"from",
"a",
"character",
"stream",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/LoadPropertiesFileTask.java#L52-L57 |
150,497 | diegossilveira/jcors | src/main/java/org/jcors/web/PreflightRequestHandler.java | PreflightRequestHandler.checkRequestMethod | private String checkRequestMethod(HttpServletRequest request, JCorsConfig config) {
String requestMethod = request.getHeader(CorsHeaders.ACCESS_CONTROL_REQUEST_METHOD_HEADER);
Constraint.ensureNotEmpty(requestMethod, "Request Method Header must be supplied");
Constraint.ensureTrue(config.isMethodAllowed(request... | java | private String checkRequestMethod(HttpServletRequest request, JCorsConfig config) {
String requestMethod = request.getHeader(CorsHeaders.ACCESS_CONTROL_REQUEST_METHOD_HEADER);
Constraint.ensureNotEmpty(requestMethod, "Request Method Header must be supplied");
Constraint.ensureTrue(config.isMethodAllowed(request... | [
"private",
"String",
"checkRequestMethod",
"(",
"HttpServletRequest",
"request",
",",
"JCorsConfig",
"config",
")",
"{",
"String",
"requestMethod",
"=",
"request",
".",
"getHeader",
"(",
"CorsHeaders",
".",
"ACCESS_CONTROL_REQUEST_METHOD_HEADER",
")",
";",
"Constraint",... | Checks if the requested method is allowed
@param request
@param config | [
"Checks",
"if",
"the",
"requested",
"method",
"is",
"allowed"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/web/PreflightRequestHandler.java#L80-L89 |
150,498 | diegossilveira/jcors | src/main/java/org/jcors/util/Constraint.java | Constraint.ensureNotEmpty | public static void ensureNotEmpty(String string, String errorMessage) {
ensureNotNull(string, errorMessage);
ensure(string.trim().length() > 0, errorMessage);
} | java | public static void ensureNotEmpty(String string, String errorMessage) {
ensureNotNull(string, errorMessage);
ensure(string.trim().length() > 0, errorMessage);
} | [
"public",
"static",
"void",
"ensureNotEmpty",
"(",
"String",
"string",
",",
"String",
"errorMessage",
")",
"{",
"ensureNotNull",
"(",
"string",
",",
"errorMessage",
")",
";",
"ensure",
"(",
"string",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
">",
"... | Ensures that a String is not empty
@param string
@param errorMessage | [
"Ensures",
"that",
"a",
"String",
"is",
"not",
"empty"
] | cd56a9e2055d629baa42f93b27dd5615ced9632f | https://github.com/diegossilveira/jcors/blob/cd56a9e2055d629baa42f93b27dd5615ced9632f/src/main/java/org/jcors/util/Constraint.java#L30-L34 |
150,499 | lecousin/java-framework-core | net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/drives/RenameFileTask.java | RenameFileTask.rename | public static ISynchronizationPoint<IOException> rename(File source, File destination, byte priority) {
// TODO we should use the roots instead of drive
TaskManager t1 = Threading.getDrivesTaskManager().getTaskManager(source);
TaskManager t2 = Threading.getDrivesTaskManager().getTaskManager(destination);
if (t1... | java | public static ISynchronizationPoint<IOException> rename(File source, File destination, byte priority) {
// TODO we should use the roots instead of drive
TaskManager t1 = Threading.getDrivesTaskManager().getTaskManager(source);
TaskManager t2 = Threading.getDrivesTaskManager().getTaskManager(destination);
if (t1... | [
"public",
"static",
"ISynchronizationPoint",
"<",
"IOException",
">",
"rename",
"(",
"File",
"source",
",",
"File",
"destination",
",",
"byte",
"priority",
")",
"{",
"// TODO we should use the roots instead of drive",
"TaskManager",
"t1",
"=",
"Threading",
".",
"getDr... | Rename a file.
It may do a copy then a delete, or a simple rename, depending if the source and destination are
on the same drive or not. | [
"Rename",
"a",
"file",
".",
"It",
"may",
"do",
"a",
"copy",
"then",
"a",
"delete",
"or",
"a",
"simple",
"rename",
"depending",
"if",
"the",
"source",
"and",
"destination",
"are",
"on",
"the",
"same",
"drive",
"or",
"not",
"."
] | b0c893b44bfde2c03f90ea846a49ef5749d598f3 | https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/concurrent/tasks/drives/RenameFileTask.java#L23-L35 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.