text stringlengths 14 410k | label int32 0 9 |
|---|---|
public void continueInference(InferenceParameters queryProperties) {
String command = createInferenceContinuationCommand(queryProperties);
DefaultSubLWorker newWorker = new DefaultSubLWorker(command, getCycServer(), true, getTimeoutMsecs());
/*newWorker.addListener(new SubLWorkerListener() {
public void... | 1 |
String encode(String value)
{
StringBuffer sb = new StringBuffer();
int len = value.length();
for (int i = 0; i < len; i++)
{
char c = value.charAt(i);
switch (c)
{
case '<':
sb.append("<");
break;
case '>':
sb.append(">");
break;
case '\'':
sb.append("'... | 9 |
private boolean checkInput(String input) {
try {
input = input.toLowerCase();
input = input.replace("$", "");
input = input.trim();
// Get the command, then strip it from the other data
String command = input.substring(0,1);
input = input.replaceFirst(command, "");
input = input.trim();
i... | 7 |
public NameNode(Library l, Hashtable h) {
super(l, h);
Object o = library.getObject(entries, "Kids");
if (o != null && o instanceof Vector) {
Vector v = (Vector) o;
kidsReferences = v;
int sz = kidsReferences.size();
if (sz > 0) {
k... | 8 |
public String getAccessToken() {
return accessToken;
} | 0 |
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("------------ RunningStatus ------------\n");
sb.append("[taskId] " + taskId + "\n");
sb.append("[RunningPhase] " + runningPhase + "\n");
sb.append("[isInMemMergeRunning] " + isInMemMergeRunning + "\n\n");
sb.append("---... | 4 |
public double ai(int x, int y, int vx, int vy, int l) {
double[] e = new double[5];
double d = Math.atan2(-(cy - y), (cx - x)) + Math.PI; // Calculate the
// distance
// The arc-distance values range from 0 to 2 PI. To solve border-cases
// in the from 1.5 PI to 0.5 PI, checking is needed.
i... | 9 |
public static void calculateDistanceToOpponentBorder(BotState state) {
List<Region> guessedOpponentSpots = HeuristicMapModel.getGuessedOpponentRegions();
// Give all guessed opponent spots a distance of 0
for (Region opponentSpot : guessedOpponentSpots) {
opponentSpot.setDistanceToOpponentBorder(0);
}
// G... | 7 |
@Override
public void checkCollision(){
for(int i = 0; i < collisionThreads.length; ++i)
pool.execute(collisionThreads[i]);
//Give the collision threads as much time as we can, but this may cull them prematurely
try {
pool.awaitTermination(COLLISION_TIME, TimeUnit.MI... | 2 |
public static <T extends Number> ArrayList<ArrayList<T>> mulScalarWithMatrix(T scalar, ArrayList<ArrayList<T>> a, Class<T> type) {
ArrayList<ArrayList<T>> result = new ArrayList<ArrayList<T>>();
try {
if (a == null) {
throw new NullPointerException();
}
int rows = a.size();
int columns = a.get(0... | 5 |
protected void finalize() throws Throwable {
super.finalize();
socket.close();
} | 0 |
private static boolean evaluatePairing ()
{
int toprank = 0;
int botrank = 0;
int topind = 0;
int botind = 0;
// gather the rank count data
for (int i=Rank.NUM_RANK-1; i>=0; i--)
{
//int rankhashi = _rankhash[i];
int rankhashi = (int)((_rankhash>>(4*i)) & 0xF);
if (rankhashi > topr... | 8 |
public static ByteBuffer toBuffer(String value)
{
if (value == null || value.length() == 0) {
return EMPTY;
}
ByteBuffer buffer = factory.allocate(value.length());
char[] chars = value.toCharArray();
// Convert from chars to bytes
for (int i = 0; i < chars.length; i++) {
buffer.put((byte)chars[... | 3 |
@Override
public String toString() {
switch (this) {
case TOP_LEFT:
return "TL";
case TOP:
return "T";
case TOP_RIGHT:
return "TR";
case BOT_RIGHT:
return "BR";
case BOT:
... | 7 |
private void parseName() throws IOException {
int c = in.peek();
while (Character.isLetterOrDigit(c) || c == '_' || c == ':' || c == '.') {
out.append((char) in.read());
c = in.peek();
}
} | 4 |
public ArrayList ResultSetToString(ResultSet rs) {
String temp = "";
ArrayList<String> resultat = new ArrayList<>();
try {
ResultSetMetaData rsMetaData = rs.getMetaData();
for (int i = 1; i <= rsMetaData.getColumnCount(); i++) {
if (i == 1) {
... | 6 |
private int get_next_page(Page page, long boundary) {
if (boundary > 0) {
boundary += offset;
}
while (true) {
int more;
if (boundary > 0 && offset >= boundary) {
return OV_FALSE;
}
more = oy.pageseek(page);
... | 9 |
public void action(OutStream outStream) throws IOException {
outStream.writeSymbol('\n');
for (int j = 0; j < Format.indentLevel - 1; j++) {
outStream.writeString(Format.indentString);
}
outStream.writeSymbol('}');
outStream.writeSymbol('\n');
Format.indent =... | 1 |
private void orderTrackList() {
for (int i = 0; i < calendarTracksListModel.getSize(); i++) {
String pistaname = calendarTracksListModel.get(i).toString();
for (Iterator<Track> it = calendarTracks.iterator(); it.hasNext();) {
Track pista = it.next();
... | 4 |
public static Comparator printComparator() {
if (Type.printComparator != null) {
return (Type.printComparator);
}
Type.comparator = new Comparator() {
public int compare(final Object o1, final Object o2) {
// o1 < o2 : -1
// o1 == o2 : 0
// o1 > o2 : 1
if (!(o1 instanceof Type)) {
thr... | 4 |
@Override
public String execute(SessionRequestContent request) throws ServletLogicException {
String page = ConfigurationManager.getProperty("path.page.users");
String prevPage = (String) request.getSessionAttribute(JSP_PAGE);
formUserList(request);
if(page == null ? prevPage == null... | 2 |
private void notifyListeners()
{
for (TimeListener listener : listeners)
listener.onTimeChanged(time);
} | 1 |
public static void main(String[] args) throws Exception
{
HashSet<Integer> placeboSet = getPlaceboSet();
HashMap<String, List<Double>> sampleMap = getsampleToPCOAMap();
System.out.println(sampleMap);
BufferedWriter writer = new BufferedWriter(new FileWriter(new File(ConfigReader.getCrossoverExerciseDir() +... | 9 |
public void setRegion(int left, int top, int width, int height) {
if (top < 0 || left < 0) {
throw new IllegalArgumentException("Left and top must be nonnegative");
}
if (height < 1 || width < 1) {
throw new IllegalArgumentException("Height and width must be at least 1");
}
int right = l... | 8 |
public byte markTokensImpl(byte token, Segment line, int lineIndex)
{
if(line.count == 0)
return Token.NULL;
switch(line.array[line.offset])
{
case '+': case '>':
addToken(line.count,Token.KEYWORD1);
break;
case '-': case '<':
addToken(line.count,Token.KEYWORD2);
break;
case '@': case '*':
... | 7 |
public boolean IsOpt(char c)
{
if (c == '+' || c == '-' || c == '*' || c == '/' || c == '(' || c == ')')
return true;
else
return false;
} | 6 |
public void offsetMove(Coord offset) {
if(!isActual()) return;
if(UI.instance.mapview != null) {
Coord sz = UI.instance.mapview.sz;
Coord sc = new Coord((int) Math.round(Math.random() * 200 + sz.x / 2 - 100),
(int) Math.round(Math.random() * 200 + sz.y / 2 - 100));
Coord oc = position().add(offset);
... | 2 |
public void switchTo(String newFolder) {
try {
long start = System.currentTimeMillis();
if (songFolderLoc != null && songFolderLoc.equals(newFolder)) {
Util.errorMessage(
"Please don't try to load your entire osu! Songs Folder here.\n"
+ "It'll probably take forever and lag your computer.",
this)... | 7 |
public void traineval(Vector vector)
{
for(int i = 0; i < maxRound; i++)
{
training = true;
BHypothesis.training = true;
BHypothesis.MARGIN_RATE = 48D;
for(int j = 0; j < sample.size(); j++)
{
System.err.println((new StringB... | 9 |
public static void evaluate(File fingerFile, Song song) throws FileNotFoundException
{
FileReader fr = new FileReader(fingerFile);
BufferedReader br = new BufferedReader(fr);
// Loop through the fingerfile
String content = new Scanner(fingerFile).useDelimiter("\\Z").next();
//System.out.println(content);
... | 1 |
@Override
public void executaExercicio30() {
String nome;
int idade;
Character sexo;
double salario;
double abono;
nome = JOptionPane.showInputDialog("Digite o nome: ");
idade = Integer.parseInt(JOptionPane.showInputDialog("Digite a idade: "));
sexo = JOptionPane.showInputDialog("Digite o sexo: ").charAt(0);... | 8 |
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
PieceCoordinate other = (PieceCoordinate) obj;
if (x != other.x) {
return false;
}
if (y != other.y) {
return false;
... | 5 |
void reduce(String s, int a, int b) {
for (int i = 0; i < validSet.length; i++) {
if (!validSet[i]) {
continue;
}
if ((getA(s, answerSet[i]) != a) || (getB(s, answerSet[i]) != b)) {
validSet[i] = false;
}
}
} | 4 |
public Models.DatabaseModel.Patient findPatient(int id){
String query = "SELECT * FROM `patients` WHERE `id` = %d LIMIT 1;";
Utils.DBA dba = Helper.getDBA();
Patient p = new Patient();
try {
ResultSet rs = dba.executeQuery(String.format(query, id));
rs.next();
... | 1 |
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
ListNode sum = new ListNode(-1);
int carry = 0;
ListNode head = sum;
sum.next = head;
while (l1 != null && l2 != null) {
int s = l1.val + l2.val + carry;
carry = s / 10;
s = s % 10;
head.next = new ListNode(s);
head = head.next;
l1 =... | 5 |
public Boisson rechercheBoisson(String boisson){
for(Categorie cat : Categorie.values()){
ArrayList<Boisson> listes = new ArrayList<Boisson>();
if(cat.equals(Categorie.Bieres)){
listes = listeBoissons.getListeBieres();
}
else if(cat.equals(Categorie.Cocktails))
{
listes = listeBoissons.getL... | 6 |
private int retrieveEndingPositionAfterOpeningParenthesis(int sourceStart, int sourceEnd, int numberOfParen) {
if (this.referenceContext == null) return sourceEnd;
CompilationResult compilationResult = this.referenceContext.compilationResult();
if (compilationResult == null) return sourceEnd;
ICompilationUnit compi... | 8 |
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
LinkedHashMap<String, Integer> votes = new LinkedHashMap<String, Integer>();
int invalid = 0;
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
if (line.startsWith("... | 6 |
@Override
public void mouseEntered( MouseEvent e ) {
for( MouseListener listener : listeners( MouseListener.class )){
listener.mouseEntered( e );
}
} | 1 |
public static int findPath(Node node, boolean existed) {
if(node.visited) {
return -1;
}
if(!node.inGrouped) {
return 0;
}
node.visited = true;
if(existed) {
for(Node nextNode : node.neigh) {
int result = findPath(nextNode, !existed);
if(result != -1) {
nextNode.inGrouped = true;
... | 7 |
public void removerUsuario(){
if ( this.num_usuarios == 0 ) System.out.println("\nNão existem "
+ "usuários.");
else{
System.out.println("\nQual dos usuários você gostaria de remover? "
+ "[ 1 - " + this.num_usuarios + " ]" );
int i = 1;
... | 9 |
public String loadProperty(String key) {
if (properties != null) {
return properties.getString(key);
}
return null;
} | 1 |
public void run() {
// Put a spiffy message in the console
try {
// Loop while we are active
while(active) {
MazewarPacket headQueuePacket;
headQueuePa... | 9 |
private int sumOfSquares(int start, int end) {
int sum=0;
for(int i=start;i<=end;i++){
sum+=i*i;
}
return sum;
} | 1 |
@SuppressWarnings("unused")
public void connect() throws IOException {
if (regLevel != 0) // otherwise disconnected or connect
throw new SocketException("Socket closed or already open ("+ regLevel +")");
IOException exception = null;
Socket s = null;
try {
s = new Socket(host, port);
exception = null;... | 4 |
protected PathNode findNavalTarget(final int maxTurns) {
if (!getUnit().isOffensiveUnit()) {
throw new IllegalStateException("A target can only be found for offensive units. You tried with: "
+ getUnit().toString());
}
if (!getUnit().isNava... | 8 |
public List<Problem> findPage(int page,int size) {
log.debug("finding page Problem instances");
try {
String queryString = "from Problem";
Query queryObject = getSession().createQuery(queryString);
queryObject.setFirstResult(page);
queryObject.setMaxResults(size);
List<Problem> list = queryObje... | 1 |
@Override
public <T extends AggregateRoot<?>> Collection<T> loadBy(Class<T> type,
Specification<T> specification) {
final List<T> satisfied = new ArrayList<T>();
for (final Object aggregate : aggregates.values()) {
if (aggregate.getClass().isAssignableFrom(type)) {
if ... | 4 |
BrandingVO(Path small, Path medium, Path large) {
if ((small == null) || (medium == null) || (large == null)) {
IllegalArgumentException iae = new IllegalArgumentException("One or more bitmaps are null!");
Main.handleUnhandableProblem(iae);
}
this.imgSmall = small;
... | 3 |
public Point getCorner() {
System.out.print("Finding corner");
Color edge = new Color(0xbbada0);
int total = 500;
int current = 0;
for (int x = 228; x < GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); x++) {
for (int y = 0; y < G... | 6 |
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... | 6 |
private Map unmarshal(InputStream in) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document doc;
try {
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
factory.setExpandEntityRef... | 1 |
public void addFieldListener(Identifier ident) {
if (ident == null)
throw new NullPointerException();
if (fieldListeners == null)
fieldListeners = new HashSet();
if (!fieldListeners.contains(ident))
fieldListeners.add(ident);
} | 3 |
@Override
public void restoreTemporaryToDefault() {tmp = def;} | 0 |
public static void save(String filename) {
File file = new File(filename);
String suffix = filename.substring(filename.lastIndexOf('.') + 1);
// png files
if (suffix.toLowerCase().equals("png")) {
try {
ImageIO.write(onscreenImage, suffix, file);
... | 4 |
@Override
public void valueChanged(ListSelectionEvent e)
{
if(e.getSource() == listeClassePersonnage)
{
afficheStatClasse();
}
if(e.getSource() == listeArme) // Si l'objet est une JList Equipement
{
afficheStatArme();
}
if(e.get... | 4 |
public void setFixedFee(String fixedFee) {
FixedFee = fixedFee;
} | 0 |
@Override
public Field move() {
if (getTime() > Game.getInstance().getTime()) return null;
super.move();
if (isDrinking()) {
returnTimer--;
return null;
}
List<Comprised> items = getItems();
if (items.isEmpty()) {
HoboPathSearcher... | 5 |
public boolean has_edges(String point_A, String point_B)
{
String []split_str;
if(point_A.charAt(0) == 'r')
{
split_str = point_A.split("\\.", 2);
point_A = split_str[0];
}
if(point_B.charAt(0) == 'r')
{
split_str = point_B.split("\\.", 2);
point_B = split_str[0];
}
String edge_one = this.p... | 6 |
public Student(ResultSet rs) throws Exception{
rs.beforeFirst();
if(rs.next()){
setPersonID(rs.getInt("personid"));
setLastName(rs.getString("lastname"));
setFirstName(rs.getString("firstname"));
setEmail(rs.getString("email"));
setPersonType(r... | 2 |
public boolean isOptOut() {
synchronized (optOutLock) {
try {
// Reload the metrics file
configuration.load(getConfigFile());
} catch (IOException ex) {
if (debug) {
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.g... | 4 |
public Genre analyzeBook(Book book) {
// This is a fake genre analyzer, do not take the following serious
Genre genre = Genre.NA;
String details = book.getDetails();
if (details != null) {
if (containsKeyword(details, romanceKeyWord)) {
genre = Genre.ROMANCE;
... | 6 |
private Geometry createFace(Direction dir){
Geometry geo = new Geometry(dir.name(), quad);
geo.setMaterial(blockType.getMaterial());
if(isTransparent()){
geo.setQueueBucket(Bucket.Transparent);
}
geometries[dir.ordinal()] = geo;
switch (dir) {
case NORTH:
geo.setLocalTranslation(centerX+SIZE, cen... | 7 |
public Map<String, Object> toConfigurationNode() {
Map<String, Object> output = new HashMap<String, Object>();
if (subgroups != null && subgroups.size() != 0) {
output.put("subgroups", subgroups);
}
if (permissions != null && permissions.size() != 0) {
Map<String, List<String>> tmp = new LinkedHashMap<Str... | 9 |
public void setup(Object comp) {
if (obs == null || sim == null) {
throw new ComponentException("obs/sim variable not set.");
}
if (comp instanceof Compound) {
Compound c = (Compound) comp;
c.addListener(new Listener() {
@Override
... | 8 |
public void render(Bitmap bitmap, int xOffset, int yOffset) {
int yPixPos, xPixPos;
int src;
for (int y = 0; y < bitmap.getHeight(); y ++) {
yPixPos = y + yOffset;
if (yPixPos < 0 || yPixPos > width) continue;
for (int x = 0; x < bitmap.getWidth(); x++) {
... | 7 |
private void login() throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException {
Cliente c;
Funcionario f;
String cpf;
int tam;
cpf = jTextField1.getText();
cpf = cpf.replaceAll("[^0-9]", "");
//System.out.println(cpf);
tam = cpf.length();
if ((tam != 11 && !cpf.mat... | 7 |
public void setFullScreen(DisplayMode displayMode) {
final JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setUndecorated(true);
frame.setIgnoreRepaint(true);
frame.setResizable(false);
device.setFullScreenWindow(frame);
... | 5 |
public String getGeraGMP2() throws SQLException, ClassNotFoundException {
String sts = new String();
Connection conPol = conMgr.getConnection("PD");
if (conPol == null) {
throw new SQLException("Numero Maximo de Conexoes Atingida!");
}
try {
Statement stmt... | 3 |
private void processProjectsForTraining(List<Position> positions) {
Iterator<Position> iterator = positions.iterator();
while (iterator.hasNext()) {
Position position = iterator.next();
String managerId = position.getCreatedBy();
List<SkillRating> projectSkillRatings = position
.getRequiredSkillRating... | 3 |
private void convertInstanceNumeric(Instance instance) {
double [] vals = new double [outputFormatPeek().numAttributes()];
int attSoFar = 0;
for(int j = 0; j < getInputFormat().numAttributes(); j++) {
Attribute att = getInputFormat().attribute(j);
if ((!att.isNominal()) || (j == getInputFormat... | 8 |
public void map(LongWritable lineid, Text nodetxt,
OutputCollector<Text, Text> output, Reporter reporter)
throws IOException
{
Node node = new Node();
node.fromNodeMsg(nodetxt.toString());
int fdegree = node.degree("f");
int rdegree = node.degree("r");
... | 9 |
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
{
String str1=request.getParameter("q1");
int i1=Integer.parseInt(str1);
String st1=request.getParameter("a1");
Connection conn;
Statement stmt;
PrintWriter out=response.getWriter();
response.setContentT... | 2 |
public boolean firstName(String firstName) {
if (firstName == null || firstName.isEmpty()) {
return false;
}
if ((int) firstName.charAt(0) < 65 || (int) firstName.charAt(0) > 90) {
return false;
}
for (int i = 1; i < firstName.length(); i++) {
... | 7 |
public String reconstructString() {
StringBuilder reconstructedString = new StringBuilder();
List<String> listWithAllOutgoingStrings = getListWithAllOutgoingStrings();
List<String> listWithAllIncomingStrings = getListWithAllIncomingStrings();
String start = findStart(listWithAllOutgoing... | 3 |
public Race load() {
String toLoad = "";
switch( raceName ) {
case PROTOSS:
toLoad = PROTOSSFILE;
break;
case TERRAN:
toLoad = TERRANFILE;
break;
case ZERG:
toLoad = ZERGFILE;
... | 4 |
private static void appendJSONPair(StringBuilder json, String key, String value) throws UnsupportedEncodingException {
boolean isValueNumeric = false;
try {
if (value.equals("0") || !value.endsWith("0")) {
Double.parseDouble(value);
isValueNumeric = true;
... | 5 |
public void testConstructor_ObjectStringEx1() throws Throwable {
try {
new LocalDate("1970-04-06T+14:00");
fail();
} catch (IllegalArgumentException ex) {}
} | 1 |
public CreateNetworkGame(Window owner, GeneralAttribute ga, StartWindows sw) {
super(owner, ModalityType.APPLICATION_MODAL);
this.generalAttribute = ga;
this.startWindow = sw;
generalAttribute.addObserver(this);
getContentPane().setBackground(new Color(102, 102, 102));
getContentPane().setCursor(
Cursor... | 8 |
private static int guessFontStyle(String name) {
name = name.toLowerCase();
int decorations = 0;
if ((name.indexOf("boldital") > 0) || (name.indexOf("demiital") > 0)) {
decorations |= BOLD_ITALIC;
} else if (name.indexOf("bold") > 0 || name.indexOf("black") > 0
... | 7 |
/* */ public void paintGUI(Graphics g)
/* */ {
/* 548 */ int offY = 280;
/* 549 */ g.setColor(Color.WHITE);
/* 550 */ g.setFont(this.font);
/* 551 */ g.drawImage(guiUnits.getTileImage(0), 12, 12 + offY, this);
/* */
/* 553 */ if (units.contains(commander)) {
/* 554 */ g.setCol... | 4 |
public static void main(String[] args){
Set<Integer> amicable = new HashSet<Integer>();
int[] div = new int[10000];
for (int i=1;i<10000;i++){
div[i] = sumOfDivs(i);
}
for (int i=1;i<10000;i++){
for (int j=1;j<10000;j++){
if (i==j) continue;
if (div[i]==j && div[j]==i){
amicable.add(i... | 7 |
public void scrollCellToView(JTable table, int rowIndex, int vColIndex) {
if (!(table.getParent() instanceof JViewport)) {
return;
}
JViewport viewport = (JViewport) table.getParent();
Rectangle rect = table.getCellRect(rowIndex, vColIndex, true);
Rectangle viewRect =... | 9 |
@Override
public void deserialize(Buffer buf) {
fightId = buf.readInt();
fightType = buf.readByte();
if (fightType < 0)
throw new RuntimeException("Forbidden value on fightType = " + fightType + ", it doesn't respect the following condition : fightType < 0");
fightStart =... | 4 |
private static String escapeJSON(String text) {
StringBuilder builder = new StringBuilder();
builder.append('"');
for (int index = 0; index < text.length(); index++) {
char chr = text.charAt(index);
switch (chr) {
case '"':
case '\\':
... | 8 |
@Test
public void testSanitizeHtmlLongLengthMax() throws Exception {
String test = "";
for(int i = 0; i < 2001; ++i) {
test += 'c';
}
try {
Sanitizer.sanitizeLongText(test).getCleanHTML();
} catch (org.owasp.validator.html.ScanException e) {
... | 2 |
public static Image crop(int height, int width, int x, int y, Image original) {
Image image = new RgbImage(width, height);
for (int i = 0; i < height; i++) {
for (int j = 0; j < height; j++) {
image.setPixel(i, j, RED, original.getPixel(i + x, j + y, RED));
image.setPixel(i, j, GREEN,
original.getP... | 2 |
public Void visitDeclarationStatements(DeclarationStatementsContext ctx) {
if (ctx.children == null) return null;
int loc = 1;
for (ParseTree child : ctx.children) {
if (child instanceof DeclarationStatementContext) {
visitDeclarationStatement((DeclarationStatementContext) child);
if ... | 8 |
@SuppressForbidden(reason = "Needs access to private APIs in DirectBuffer and sun.misc.Cleaner to enable hack")
private static Object unmapHackImpl() {
final Lookup lookup = lookup();
try {
final Class<?> directBufferClass = Class.forName("java.nio.DirectByteBuffer");
final Method m = direc... | 9 |
public static Logger getInstance(){
if(Logger.logger == null)
Logger.logger = new Logger();
return Logger.logger;
} | 1 |
static final boolean method2797(String string, byte i) {
anInt4763++;
if (string == null)
return false;
for (int i_1_ = 0; ((Class348_Sub40_Sub30.friendListLength ^ 0xffffffff)
< (i_1_ ^ 0xffffffff)); i_1_++) {
if (string.equalsIgnoreCase(Class83.friendListUsernames[i_1_]))
return true;
}
if (st... | 5 |
public boolean hasAxe() {
if(playerHasItem2(6739) || playerHasItem2(1351) || playerHasItem2(1349) || playerHasItem2(1353) || playerHasItem2(1355) || playerHasItem2(1357) || playerHasItem2(1359) || playerHasItem2(1361))
{
return true;
}
return false;
} | 8 |
public FenetreConnexion(final Portail p1) {
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setBounds(100, 100, 401, 348);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
textField = new JTextField();
t... | 5 |
private void checkCollisions() {
for (Ball ball : balls) {
if (ball.getBoundsInParent().intersects(leftPaddle.getBoundsInParent())) {
ball.collision();
ball.move();
rightPaddle.computeOptimalPoint(balls);
leftPaddle.computeOptimalPoint(balls);
continue;
}
if (ball.getBoundsInParent().inte... | 5 |
public void loadProperties(String fileName) throws FileNotFoundException {
InputStream in = null;
try {
in = PropertiesReader.class.getClassLoader().getResourceAsStream(fileName);
if(in == null ){
in = new FileInputStream(System.getProperty("user.dir")+ File.separ... | 4 |
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
public static void main(String[] args) throws Exception {
// 先使用hexedit 编辑package
FileInputStream is = new FileInputStream("/tmp/AndroidManifest.xml");
byte[] data = IOUtils.toByteArray(is);
Map<String, String> map = new HashMap<String, Str... | 9 |
private final void method550(byte[] bs, int[] is, int i, int i_0_, int i_1_, int i_2_, int i_3_, int i_4_, int i_5_, int i_6_, int i_7_, int i_8_, aa var_aa, int i_9_, int i_10_) {
aa_Sub1 var_aa_Sub1 = (aa_Sub1) var_aa;
int[] is_11_ = var_aa_Sub1.anIntArray5487;
int[] is_12_ = var_aa_Sub1.anIntArray5488;
int i... | 9 |
public void transformBlockInitializer(StructuredBlock block) {
StructuredBlock start = null;
StructuredBlock tail = null;
int lastField = -1;
while (block instanceof SequentialBlock) {
StructuredBlock ib = block.getSubBlocks()[0];
int field = transformOneField(lastField, ib);
if (field < 0)
clazzAn... | 3 |
private int nextState(char c, int state)
{
int start = SCANNER_TABLE_INDEXES[state];
int end = SCANNER_TABLE_INDEXES[state+1]-1;
while (start <= end)
{
int half = (start+end)/2;
if (SCANNER_TABLE[half][0] == c)
return SCANNER_TABLE[half][1]... | 3 |
private boolean jj_3R_52() {
if (jj_3R_92()) return true;
Token xsp;
xsp = jj_scanpos;
if (jj_3R_93()) jj_scanpos = xsp;
if (jj_scan_token(K_IN)) return true;
if (jj_scan_token(91)) return true;
xsp = jj_scanpos;
if (jj_3R_94()) {
jj_scanpos = xsp;
if (jj_3R_95()) return true;
... | 7 |
Subsets and Splits
SQL Console for giganticode/java-cmpx-v1
The query retrieves a limited number of text entries within a specific length range, providing basic filtering but minimal analytical insight.