text stringlengths 14 410k | label int32 0 9 |
|---|---|
public static String formatNode(final Node node) {
final StringBuilder text = new StringBuilder();
text.append('[').append(node.getNodeName());
String value = "";
if (node.isType(NodeType.RULE)) {
value = node.getAttribute(RuleNode.Attributes.NAME);
} else if (node.i... | 6 |
Markers findClosestMarkers(Marker queryMarker, Markers markers, int maxDistance) {
Markers closest = new Markers();
HashSet<String> done = new HashSet<String>();
for (Marker m : markers) {
// We don't care about these
if ((m instanceof Chromosome) || (m instanceof Intergenic) || (m instanceof Gene) || (m i... | 8 |
final AnimatableToolkit method614(byte i, int i_4_, boolean bool) {
anInt5615++;
Class64_Sub3 class64_sub3_5_;
Class64_Sub3 class64_sub3_6_;
if (i == 1) {
class64_sub3_6_ = ((OpenGlToolkit) aHa_Sub2_5598).aClass64_Sub3_7864;
class64_sub3_5_ = ((OpenGlToolkit) aHa_Sub2_5598).aClass64_Sub3_7780;
} else if ... | 5 |
public static int kToLast(NodeList list, int k) {
if(list.isEmpty() || list == null) {
System.out.println("Error: Empty list! exiting...");
System.exit(0);
}
if(k < 0) {
System.out.println("Error: k < 0! exiting...");
System.exit(0);
}
Node current = list.getHead();
Node runner = list.getHead();... | 7 |
private JSONArray readArray() throws JSONException {
JSONArray result = new JSONArray();
/* to cover input that ends with ",]". */
boolean hasTrailingSeparator = false;
while (true) {
switch (nextCleanInternal()) {
case -1:
throw syntaxEr... | 9 |
private boolean isAddressAdded(Address address)
{
for(int i=0; i<addedAddressCount; i++)
{
Address addedAddress = addresses[i];
if(addedAddress.getCountry().equalsIgnoreCase(address.getCountry()))
{
if(addedAddress.getCity().equalsIgnoreCase(address.getCity()))
{
if(addedAddress.getStreet... | 7 |
final synchronized void method87(byte i) {
if (i > -11)
aClass262_5185 = null;
anInt5173++;
if (Class93.loaderApplet != null && Class305.canvas == null
&& !((Signlink) Class348_Sub23_Sub1.signlink).aBoolean3794) {
try {
Class var_class = Class93.loaderApplet.getClass();
Field field = var_class.get... | 6 |
public String getShortDateUK(){
this.shortDateUK = (new Integer(this.getDayOfTheMonth())).toString();
if(this.shortDateUK.length()<2)this.shortDateUK = "0" + this.shortDateUK;
int monthI = this.getMonthAsInteger();
if(monthI<10){
this.shortDateUK += ".0" + monthI;
}
... | 2 |
private void addCadenaToggle(JToggleButton button) {
if (INICIO) {
if (maxCaracteres()) {
if (ordenSecuencia()) {
if (button.isSelected()) {
String string = button.getText();
if (!string.isEmpty()) {
... | 6 |
public boolean playing() {
if (channel == null || channel.attachedSource != this)
return false;
else if (paused() || stopped())
return false;
else
return channel.playing();
} | 4 |
public static Card loadCard(final InputStream cardStream) throws IOException {
Card card;
BufferedReader reader = new BufferedReader(new InputStreamReader(cardStream));
ArrayList<String> lines = readAllLines(reader);
switch (findCardType(lines)) {
case "Character": card = new Chara();
break;
case "Clim... | 6 |
public static Solucao Vizinhos(Solucao solucao, int x){
if(x==1){
Solucao novasolucao = VizinhoRedundancia(solucao);
if(!novasolucao.equals(solucao)){
return novasolucao;
}
}
else if(x==0){
Solucao novasolucao = V... | 6 |
public ArrayList<Positie> getBaanClean(){ //returnt baan tot op botsing, minus 1ste positie
if(!isIetsGeraakt()) return baan;
ArrayList<Positie> baanClean = new ArrayList<Positie>();
for(int i = 1; i < baan.size(); i++){
baanClean.add(baan.get(i));
if(baan.get(i).equals(... | 3 |
public static boolean addPartDialog() {
JPanel addPart = new JPanel();
JPanel input = new JPanel(new SpringLayout());
JLabel nameLabel = new JLabel("Name*");
JTextField name = new JTextField();
JLabel quantLabel = new JLabel("Quantity");
SpinnerNumberModel quantMod = new SpinnerNumberModel(1,0,10000,1);
J... | 4 |
private boolean grabWavBlock8LE (AudioInputStream audioStream) {
byte inBlock[]=new byte[CHUNK_SIZE];
int a,countLoad;
try {
countLoad=audioStream.read(inBlock);
for (a=0;a<countLoad;a++) {
outPipe.writeInt(LEconv8(inBlock[a]));
fileCounter++;
sampleCounter++;
}
}
catch (Exception e) {
... | 3 |
@Override
public void intersect(Vector vector, VectorVectorMapper callback) {
int size = Math.min(size(), vector.size());
for(int i=0; i<size; i++) {
float v1 = get(i);
float v2 = vector.get(i);
if (v1 != 0 && v2!= 0) {
if (!callback.map(i, v1, v2)... | 4 |
public static FeatureVector intersection(FeatureVector v1, FeatureVector v2) {
FeatureVector result = new FeatureVector();
v1.idSort();
v2.idSort();
Iterator<Feature> it1 = v1.iterator();
Iterator<Feature> it2 = v2.iterator();
Feature f1 = null;
Feature f2 = null;
if (it1.hasNext... | 9 |
public static void main(String args[]) {
// Print each token with line number
Token tok;
try {
Lexer lex = new Lexer(args[0]);
while (true) {
tok = lex.nextToken();
String p = "";
if ((tok.getKind() == Tokens.Identifier) ||
... | 8 |
@Override
public Object execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
Contexto oContexto = (Contexto) request.getAttribute("contexto");
oContexto.setVista("jsp/hilo/list.jsp");
try {
HiloDao oHiloDao = new HiloDao(oContexto.getEnumTipoConex... | 3 |
void mapOut(String out, Object comp, String comp_out) {
if (comp == ca.getComponent()) {
throw new ComponentException(
"cannot connect 'Out' with itself for " + out);
}
ComponentAccess ac_dest = lookup(comp);
FieldAccess destAccess = (FieldAccess) ac_dest.output(comp_out);
FieldAccess srcAccess = (Fie... | 2 |
public void setNovCedula(Integer novCedula) {
this.novCedula = novCedula;
} | 0 |
public void start() throws InterruptedException {
boolean test = false;
if (test || m_test) {
System.out.println("ConnectFour::Start() BEGIN");
}
setWindow(new GameWindow(this));
getPlayer1().isYourMove();
getWindow().displayPlayerTurn(Game.PlayerTurn.PLAYER1);
if ((getPlayer1() instanceof ConnectFour... | 5 |
private int readCommand (boolean charstring) {
while (true) {
int t = readNext (charstring);
if (t == CMD) {
/*
System.out.print("CMD= "+num+", args=");
for (int i=0; i<stackptr; i++) {
System.out.print(" "+stack[i]);
... | 3 |
public void detectVision(Entity players[], Entity enemies[]) {
for (int i = 0; i < enemies.length; i++) {
enemies[i].visible = false;
}
for (int p = 0; p < players.length; p++) {
for (int i = 0; i < enemies.length; i++) {
if(players[p].sightRadius.intersects(enemies[i].rec)) {
//System.out.print... | 4 |
protected int alphabetaScore(GameState state, Color faction)
{
state = state.getCounter().score(state, false);
int playerScore = 0;
Color maxPlayer = null;
int maxScore = Integer.MIN_VALUE;
for(Player p : state.getPlayerList())
{
//determine the player's score
if(p.getFaction().equals(faction))
... | 8 |
public Controleur(Modele _plateau) {
plateau = _plateau;
} | 0 |
@Test
public void PelaajanAlkusijaintiKunEiKerrottu() {
assertTrue("Pelaajan alkusijainti oli väärä",
t.getPelaajanAlkusijainti().getX() == 0
&& t.getPelaajanAlkusijainti().getY() == 0);
} | 1 |
private String extractAnnotationNameFromUserInput(String antFromUser) {
int endOfAnnotationName = antFromUser.toString().indexOf("(");
return antFromUser.substring(1,endOfAnnotationName);
} | 0 |
@Override
public Parameter getParameter(final int parameterIndex) {
Parameter parameter;
switch (parameterIndex) {
case 0:
case 1:
parameter = super.getParameter(parameterIndex);
break;
case 2:
parameter = size;
... | 9 |
@Override
public JSONObject addUserActivity(String userId, Long qId, String answer,
Long time) throws JSONException{
List<User> result = null;
boolean hasAttempted = false;
JSONObject mainojb=new JSONObject();
try {
pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(User.class, ":p.con... | 9 |
private void insertNew() {
DB db = DB.connect();
for (IDomainObject domainObject : newObjects) {
if (domainObject instanceof Contact) {
db.getContacts().add((Contact) domainObject);
} else {
db.getAddresses().add((Address) domainObject);
}
}
} | 2 |
public void leftClick() {
if (super.state.equals("revealed") || super.state.equals("flag")
|| super.state.equals("question")) {
return;
} else {
super.state = "revealed";
this.setEnabled(false);
// if no mines surrounding a tile, calls leftClick on surrounding
// tiles
if (this.numMinesSurroun... | 7 |
@Override
public void rotateX(int angle) {
base = DimensionalTrasform.rotateX(angle, base);
setColoredExes();
} | 0 |
@Override
public void buildSettlement(IPresenter presenter, VertexLocation vertLoc) {
MoveResponse response = presenter.getProxy().buildSettlement(presenter.getPlayerInfo().getIndex(), vertLoc, false, presenter.getCookie());
if(response != null && response.isSuccessful()) {
presenter.updateServerModel(respon... | 2 |
@Override
public void interact(Command c) {
if (c == Command.OPEN) {
controller.command(c);
}
} | 1 |
public void putValue(String word, boolean palindrome) {
if ( word != null ) {
logger.info("Adding [{}]:[{}] to InMemory datastore", word, palindrome);
values.put(word, palindrome);
// dataStoreUpdatedEvent.select(new AnnotationLiteral<Updated>(){}).fire(word);
dataStoreUpdatedEvent.fire(word);
}
} | 1 |
public String getRankColor(Client client) {
if (client.isAdministrator()) {
return administrator;
}
if (client.isModerator()) {
return moderator;
}
return foreground;
} | 2 |
public void SetTexture(int textureNum)
{
if (textureNum == -1){
currentPaint = startTile;
}
else if (textureNum == -3) {
currentPaint = enemyTile;
}
else if (textureNum == -999) {
currentPaint = defaultPaint;
}
else {
currentPaint = textureList[textureNum];... | 3 |
@Override
public boolean equals( Object o )
{
if ( this == o )
{
return true;
}
if ( o == null )
{
return false;
}
if ( !(o instanceof Student) )
{
return false;
}
final Student other = (Studen... | 3 |
private static void showResults(List<File> results) {
for (File archivo : results) {
System.out.println(archivo.getAbsolutePath());
}
} | 1 |
Object[] parameterForType(String typeName, String value, Widget widget) {
if (value.equals("")) return new Object[] {new TabItem[0]};
if (typeName.equals("org.eclipse.swt.widgets.TabItem")) {
TabItem item = findItem(value, ((TabFolder) widget).getItems());
if (item != null) return new Object[] {item};
}
i... | 5 |
public Container findContainerByUUID(final String uuid){
try{
return (Container) em.createNamedQuery(Container.FIND_CONTAINER_BY_UUID).
setParameter("uuid",uuid ).getSingleResult();
} catch (NoResultException e){
return null;
}
} | 1 |
public boolean equals(Object var1) {
if(!(var1 instanceof ChunkCoordinates)) {
return false;
} else {
ChunkCoordinates var2 = (ChunkCoordinates)var1;
return this.posX == var2.posX && this.posY == var2.posY && this.posZ == var2.posZ;
}
} | 3 |
public OGLRenderer(Window _window) {
this.window = _window;
} | 0 |
public Object getPropertyValue(TOObject obj, TOProperty prop) {
TOObjectProperty objprop = getObjectProperty(obj, prop);
if (objprop != null) {
Object ret = null;
switch (objprop.getPropType()) {
case TOPropertyType.TYPE_STR: {
ret = objprop.ge... | 7 |
@Override
public void update(Observable o, Object arg) {
switch ((String) (arg)) {
case "start":
startGame();
break;
case "your turn":
JOptionPane.showMessageDialog(this, "It's your turn, you can play", "Info", JOptionPane.INFORMATION_M... | 9 |
@Override
public String toString() {
return "rlog:" + name();
} | 0 |
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 |
static int nextPalindrome(int a) {
int tmp = a;
int i;
for (i = 0; tmp > 0; i++) {
status[i] = tmp % 10;
tmp /= 10;
}
i--;
int middle = i / 2;
int carry = 1;
if (i % 2 == 0) {
// odd number
if (status[middle] < 9) {
if (middle == 0) {
status[middle] += 2;
} else {
status[mi... | 9 |
public void amountIncremented(int ID)
{
switch (ID)
{
case 0:
case 1:
case 2:
case 3:
bonusStats--;
characterStr.updateMaxStats(characterStr.count + bonusStats, 18);
characterInt.updateMaxStats(characterInt.count + bonusStats, 18);
characterDex.updateMaxStats(characterDex.count + bonusStats, 18... | 6 |
public static void updateService( int idservice,int identreprise, String libelle) throws SQLException {
String query = "";
try {
query = "UPDATE SERVICE SET ID_ENTREPRISE=?,SERLIBELLE=? where ID_SERVICE=? ";
PreparedStatement pStatement = ConnectionBDD.getInstance()... | 1 |
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 |
public static Class<?> kettleToJavaType(int t) {
switch (t) {
case ValueMetaInterface.TYPE_STRING:
return String.class;
case ValueMetaInterface.TYPE_INTEGER:
return long.class;
case ValueMetaInterface.TYPE_NUMBER:
return double.class;
case ValueMetaInterface.TYPE_BIGNUMBER:
return BigDecimal.class... | 8 |
public String getExchangeRate(String key, String exchange)
{
if (this.exchangeRates != null && this.exchangeRates.containsKey(key))
{
Map<String,String> exchanges = this.exchangeRates.get(key);
if (exchanges.containsKey(exchange))
{
return exchanges.get(exchange);
}
}
r... | 3 |
public void cal(Users user,HttpServletRequest request){
int no =0 , chk=0;
if(!user.getFile2().isEmpty())
{
no++;
chk=1;
}
if(!user.getFile1().isEmpty())
{
no++;
chk=2;
}
if(no==2)
{
... | 7 |
void star() {
int x = 9;
int y = 5;
int center = 4;
for(int i = 0; i < y; i++){
for(int c = 0; c < x; c++){
if((c >= (center - i)) && (c <= (center + i))){
System.out.print("*");
}else{
System.out.print(... | 4 |
public Game getGame() {
boolean test = false;
if (test || m_test) {
System.out.println("FileManager :: getGame() BEGIN");
}
if (test || m_test) {
System.out.println("FileManager :: getGame() END");
}
return m_game;
} | 4 |
public void removeBan(String banmask) {
String[] bans = new String[banlist.size()];
banlist.toArray(bans);
for (int i = 0; i < bans.length; i++)
if (bans[i].startsWith(banmask))
banlist.remove(bans[i]);
} | 2 |
private void setUDPOptionsEnabled(boolean enabled)
{
lb_udpBufferSize.setEnabled(enabled);
udpBufferSize.setEnabled(enabled && lb_udpBufferSize.isSelected());
udpBufferSizeUnit.setEnabled(enabled && lb_udpBufferSize.isSelected());
lb_udpPacketSize.setEnabled(enabled);
udpPacketSize.setEnabled(enabled && lb_... | 9 |
public void permuteUniqueDFS(int [] num, Stack<Integer> stk, int level){
if(level == num.length){
res.add(new ArrayList<Integer>(stk));
return;
}
for(int i = 0; i < num.length; ++i){
if(!visited.get(i)){
// if(i > level && num[i] == num[i-1]) co... | 5 |
public boolean crawlRecipesByUser(int userID) {
String recipesURL = baseURL + userID + recipeURL;
Document doc = null;
try {
doc = Jsoup.connect(recipesURL).userAgent(USER_AGENTS.get((int) Math.random() * USER_AGENTS.size())).timeout(100000).get();
} catch (IOException e) {
... | 8 |
public void login(String username, String password) {
// Get instance of ConfigManager from file
ConfigManager cm = new ConfigManager();
try {
// Try to connect to RMI through port 1099
Registry registry = LocateRegistry.getRegistry(cm.getServerIp(),
1099);
Rmi rmi = (Rmi) registry.lookup("pcs");
... | 2 |
public void onNeighborChange(Level var1, int var2, int var3, int var4, int var5) {
if(var5 != 0) {
LiquidType var6 = Block.blocks[var5].getLiquidType();
if(this.type == LiquidType.WATER && var6 == LiquidType.LAVA || var6 == LiquidType.WATER && this.type == LiquidType.LAVA) {
var1.set... | 5 |
public void unlockBothSides(){
int i = getRoomCoords(getArea())[0];
int j = getRoomCoords(getArea())[1];
if(getFace()==Face.NORTHERN)i--;
else if(getFace()==Face.EASTERN)j++;
else if(getFace()==Face.SOUTHERN)i++;
else if(getFace()==Face.WESTERN)j--;
if(i==-1||j==-1){
i = adjacentGrid[0];
j = adjac... | 9 |
private void deleteObject(Object changedObject){
String table = changedObject.getClass().getSimpleName();
switch(table){
case "User":
User user = (User) changedObject;
dataStorage.users().removeUser(user);
break;
case "Group":
... | 8 |
private void restoreScreen() {
if (graphicsDevice != null) {
Window window = graphicsDevice.getFullScreenWindow();
if (window != null) {
window.dispose();
}
graphicsDevice.setFullScreenWindow(null);
}
} | 2 |
public int getTipCount() {
int count = 0;
Stack<JadeNode> nodes = new Stack<JadeNode>();
nodes.push(this);
while (nodes.isEmpty() == false) {
JadeNode jt = nodes.pop();
for (int i = 0; i < jt.getChildCount(); i++) {
nodes.push(jt.getChild(i));
}
if (jt.isExternal()) {
count += 1;
}
}
... | 3 |
@Override
public boolean equals(Object object) {
if (!(object instanceof RoleSchool)) {
return false;
}
RoleSchool other = (RoleSchool) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
... | 5 |
@Override
public void run() {
super.run();
int i = 0, iTmp = new Random().nextInt(20)+1;
firtsFase();
while (health > 0) {
time = (1000 / start.FPS) - (System.currentTimeMillis() - time);
if (time > 0) {
try {
move();
if (y > player.getY()-70) {
lookUp();
} else {
... | 5 |
public int getPreferredWidth(Outline outline) {
int preferredWidth = getPreferredHeaderWidth();
OutlineModel model = outline.getModel();
for (Row row : model.getRows()) {
int width = getRowCell(row).getPreferredWidth(row, this) + model.getIndentWidth(row, this);
if (width > preferredWidth) {
preferredWi... | 2 |
public void runBadgeTest(int localSwitch){ //TODO Placeholder
String demoStretchAdult = "Demonstrating Stretch~Stretch~!";
String demoStretchBaby = "Demonshtwating Stwetch~Stwetch~ eajy!";
switch (localSwitch){
case 1:
localCounter++;
stay(50);
if (localCounter > 60 && localStep ==0)
{
//Determ... | 9 |
@Override
public String toString() {
String result = "";
for (int i = 0; i < this.state.length; i++) {
if (i < 9 || i > 35) {
if (i % 3 == 0) {
result += " " + this.state[i];
} else if (i % 3 == 2) {
result += this.state[i] + "\n";
} else {
result += this.state[i];
}
} else ... | 6 |
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException
{
if(req.getParameter("logout")!= null)
{
HttpSession session = req.getSession();
User loggedInUser = User.getLoggedInUser(session);
loggedInUser.logout();
resp.sendRedirect("/");
}
else if (User.getLoggedInUs... | 3 |
private DropTarget createTableDropTarget(final Table table){
DropTarget dropTarget = new DropTarget(table, DND.DROP_MOVE | DND.DROP_COPY);
dropTarget.setTransfer(new Transfer[] { FileTransfer.getInstance() });
dropTarget.addDropListener(new DropTargetAdapter() {
public void dragEnter(DropTargetEvent event) {
... | 3 |
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
if (zzReader != null)
zzReader.close();
} | 1 |
public boolean handleChangedFile(Set<String> filePath, long revision) {
Logger.println("==FindBugs begin to logchanged");
boolean result = true;
//1.从svn中拷贝修改的文件
for (String path : filePath) {
if (path.endsWith(".java")) {
// copyChangedFilesFromLocal(path);
SVNUtil.exportSingleFile(path, mFindbugsSrc... | 7 |
@Override
protected Transferable createTransferable(JComponent c) {
Transferable t = null;
if (c instanceof JList) {
@SuppressWarnings("unchecked")
JList<River> list = (JList<River>) c;
Object value = list.getSelectedValue();
if (value instanceof RiverComponent... | 2 |
public static void removeCols(JTable paymentTable) {
TableColumnModel tcm = paymentTable.getColumnModel();
System.out.println("getColumnCount:" + tcm.getColumnCount());
if (tcm.getColumnCount() == 10) {
paymentTable.removeColumn(tcm.getColumn(9));
}
if (tcm.getColumn... | 3 |
private void update_frame_animation(){
switch(pacman_direction){
case UP:
current_animation_index = tmp_animation_index++ % up_animation_length;
if(tmp_animation_index % up_animation_length == 0)tmp_animation_index = 0;
break;
case DOWN:
... | 9 |
@Override
public String notation() {
return this.from.toString() + "x" + this.to.toString();
} | 0 |
private static MethodDoc findSuperMethod(MethodDoc md) {
MethodDoc overrides = md.overriddenMethod();
if (overrides != null)
return overrides;
ClassDoc cls = md.containingClass();
/* search the method in implemented interfaces */
for (ClassDoc intf : cls.interfaces()) {
for (MethodDoc intfmethod : intf... | 4 |
@Override
public void mouseDragged(MouseEvent e) {
int h = x - e.getX();
int v = y - e.getY();
if (ecran.getAffichage() == 2) {
int points = 0;
for (Model3D m : ecran.getModels()) {
points += m.getPoints().size();
}
if (points > Parametre.nbLimitePoint) {
ecran.setAffichage(0);
}
reaff... | 9 |
public String getFirstName() {
return _firstName;
} | 0 |
public Expression negate() {
if ((getType() != Type.tFloat && getType() != Type.tDouble)
|| getOperatorIndex() <= NOTEQUALS_OP) {
setOperatorIndex(getOperatorIndex() ^ 1);
return this;
}
return super.negate();
} | 3 |
@Override
public int hashCode() {
/*
* See On Quaternions and Ocontions John H. Conway, Derek A. Smith page 42
* [-l,-r] = [l,r] and [-l,r]=[l,-r]=-[l,r]
*/
double firstValUnequalZero = left.re;
if (Quaternion.isAlmostZero(firstValUnequalZero)) {
firstValUnequalZero = left.i;
if... | 8 |
public List findPage(int page,int size) {
log.debug("finding all Record instances");
try {
String queryString = "from Record";
Query queryObject = getSession().createQuery(queryString);
queryObject.setFirstResult(page);
queryObject.setMaxResults(size);
return queryObject.list();
} catch (RuntimeExc... | 1 |
private void checkCollisions() {
// Collision between ball and left paddle
if (leftPaddle.collide(ball)) {
if (ball.getXSpeed() < 0) {
changeBallTrajectory(true);
}
}
// Collision between ball and right paddle
if (rightPaddle.collide(ball)) {
if (ball.getXSpeed() > 0) {
changeBallTrajector... | 6 |
@Test
public void runTestActivityLifecycle3() throws IOException {
InfoflowResults res = analyzeAPKFile("Lifecycle_ActivityLifecycle3.apk");
Assert.assertEquals(1, res.size());
} | 0 |
public boolean equals(Object o){
if (this == o)
return true;
if(o==null)
return false;
if (atributo.getClass()!=o.getClass() || atributo!=o){
return false;
}
return true;
} | 4 |
private void initComponents() {
jDialogJanelaPrincipal = new javax.swing.JDialog();
jPanelPrincipal = new javax.swing.JPanel();
jLabel15 = new javax.swing.JLabel();
jButtonInserirNovo = new javax.swing.JButton();
jButtonConsultar = new javax.swing.JButton();
jPanelMenus ... | 7 |
public boolean isInitial() {
final ReentrantLock l = lock;
l.lock();
try {
return initial;
}
finally {
l.unlock();
}
} | 0 |
public static String upcase(String s) {
return s.toUpperCase();
} | 0 |
@XmlTransient
public Collection<Usuario> getUsuarioCollection() {
return usuarioCollection;
} | 0 |
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 |
public static String cleanPath(String path) {
if (path == null) {
return null;
}
String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR);
// Strip prefix from path to analyze, to not treat it as part of the
// first path element. This is necessary to correctly parse paths like
// "f... | 9 |
private void handleRequiredEmptyChecks(Field field, Object container, SwingWorkerInterface swingworker) throws IllegalAccessException {
Required reqAnno = field.getAnnotation(Required.class);
ShouldBeEmpty empty = field.getAnnotation(ShouldBeEmpty.class);
if (reqAnno != null || empty != null) {... | 5 |
public static void main(String[] args) {
//Parameters
double minTurkerProb = .7;
double maxTurkerProb = .95;
int numTurkers = 500;
int numQuestions = 20000;
int numPossibleAnswers = 4;
int numDuplications = 5;
double desiredConfidence = .95;
int loops = 100;
boolean reachConfidence = false;
//P... | 9 |
public String toString() {
String toString = null;
if (face == 1) {
toString = "One";
}
if (face == 2) {
toString = "Two";
}
if (face == 3) {
toString = "Three";
}
if (face == 4) {
toString = "Four";
}
if (face == 5) {
toString = "Five";
... | 6 |
public boolean isPointInMap(int x, int y) {
for (int yMap = 0; yMap < getMap().length; ++yMap) {
for (int xMap = 0; xMap < getMap()[yMap].length; ++xMap) {
if (getMap()[yMap][xMap] < 22) {
if (x >= xPos + (xMap - 1) * 64 && xPos + (xMap) * 64 < x
&& y >= (yMap - 1) * 64 && (yMap) * 64 < y) {
... | 7 |
public void visit_i2b(final Instruction inst) {
stackHeight -= 1;
if (stackHeight < minStackHeight) {
minStackHeight = stackHeight;
}
stackHeight += 1;
} | 1 |
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.