text stringlengths 14 410k | label int32 0 9 |
|---|---|
@Override
public void dragg(Excel start, Excel finish)
{
} | 0 |
public ConfigurationSerializable deserialize(Map<String, Object> args) {
ConfigurationSerializable result = null;
Method method = null;
if (result == null) {
method = getMethod("deserialize", true);
if (method != null) {
result = deserializeViaMethod(me... | 7 |
public void WriteOut ( CostAndRangeRanking CARR, int Term ) {
File file = new File ( ".\\recycle\\WriteOut\\WritedOut" + Term + "_data.txt" ); //ރt@C
ReadFile RR = CARR.getRF();
PrintWriter pw;
try {
pw = new PrintWriter (new BufferedWriter ( new FileWriter ( file ) ) );
pw.println( "=============" + Term... | 6 |
@Override
public void execute() {
ManPageUtil util = new ManPageUtil(plugin.getConfig().getString("locale", "en"));
Player receiver = getReceiver();
// display the help to the console
if (receiver == null) {
String manPageText = util.getMan(getManPage());
Ter... | 1 |
@FXML
private void handleMenuReportDetail(ActionEvent event) {
FXMLLoader fxmlLoader = new FXMLLoader(PosApplication.class.getResource("ReportDetail.fxml"));
final Region reportDetail;
try {
reportDetail = (Region) fxmlLoader.load();
} catch (IOException e) {
... | 5 |
@Test
public void KuoloEste() {
assertTrue("Este oli väärän tyyppinen",
t.onkoPisteessaEste(new Piste(250, 250)) == EsteenTyyppi.KUOLO);
} | 0 |
@Override
public Object load(){
Object model=null;
Statement stmt=null;
XStream xStream = new XStream(new DomDriver());
try {
stmt = db.getConnection().createStatement();
ResultSet rs = stmt.executeQuery("SELECT users FROM Users");
db.getConnection().commit();
while (rs.next()) {
// byte[] st... | 2 |
public int minDepth(TreeNode root) {
Stack<TreeNode> nextNode = new Stack<TreeNode>();
Stack<Integer> nextNodeDepth = new Stack<Integer>();
int depth = 0;
int min = Integer.MAX_VALUE;
if(root == null) {
return 0;
}
nextNode.push(root);
nextNodeDep... | 7 |
public List<Planet> NeutralPlanets() {
List<Planet> r = new ArrayList<Planet>();
for (Planet p : planets) {
if (p.Owner() == 0) {
r.add(p);
}
}
return r;
} | 2 |
public static void exportBatch(SegmentedImage[] tracked, String out){
for(int i = 0; i < tracked.length; i++){
System.out.println("Exporting image " + i);
String dirName = out + " t" + i;
File dir = new File(dirName);
dir.mkdir();
ImageExporter.saveTiff(tracked[i], dirName + "\\");
}
System.out.... | 1 |
@Override
public void update(Observable o, Object arg) {
if(state == GameState.DURING && arg instanceof Piece) {
// A piece was placed.
switchPlayer();
if(board.getValidMoves(currentPlayer.getColor()).size() == 0) {
// The other player can't play, switch back.
switc... | 4 |
private void txtSearchEmpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSearchEmpActionPerformed
try{
int key=jComboBox1.getSelectedIndex();
String search=txtSearchEmp.getText();
String query2="";
switch(key){
ca... | 7 |
void addItem(TableTreeItem item, int index) {
if (item == null)
SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (index < 0 || index > items.length)
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
/* Now that item has a sub-node it must indicate that it can be expanded */
if (items.length == 0 && index == 0) {
if (table... | 8 |
public byte[] getAsBytes() {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.write(postHash);
dos.write(parentHash);
dos.writeUTF(new Gson().toJson(this.postInfo));
... | 2 |
@DELETE
@Produces(MediaType.APPLICATION_JSON)
public void deleteTask(@PathParam("id") int id) throws SQLException {
if (daoHelper.isIdExist(id)) {
daoHelper.deleteTask(id);
}
} | 1 |
public void turn(int x, int y)//翻開
{
buttons[x][y].setBackground(Color.LIGHT_GRAY);
if(aroundBombNum[x][y]>0)
buttons[x][y].setText(Integer.toString(aroundBombNum[x][y]));
isTurned[x][y] = true;
isPressed[x][y] = true;
} | 1 |
private void processRemove(WriteBatch batch, DataFile df, LogFile lf) {
if (df != null && lf != null) {
df.decrement(batch.removeOPCount);
this.enqueueLock.lock();
try {
if (df.getLength() >= JournalStore.FILE_SIZE && df.isUnUsed()) {
if (... | 7 |
public static void runArbi() {
if(arbiThread != null) {
arbiThread.interrupt();
}
arbiThread = new Thread(new Runnable() {
@Override
public void run() {
p1Type= ui.getP1();
p2Type = ui.getP2();
p1 = getPlayer(p1Type);
p2 = getPlayer(p2Type);
arbi = new Arbiter(p1, p2, 700, 700... | 1 |
public void init() {
calls = new HashMap<String, CallWindow>();
JFrame f = new JFrame("Chat Client Window");
f.setLayout(null);
f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
f.addWindowListener(new WindowListener() {
public void windowActivated(WindowEvent arg0) {
// Do nothing
}
public... | 5 |
@Override
public boolean damage(int damage){
Random rand = new Random(System.currentTimeMillis());
if (rand.nextInt(PlayerInfo.JUKECHANCE) == 0){
setHealth(this.health - damage);
if (health <= 0) {
kill();
}
return true;
}
return true;
} | 2 |
private INode findReducable(ISubModel model) {
boolean flag;
// Parcours de tous les nœuds
for (INode node : model.getNodes()) {
flag = true;
// Parcours des conditions de réduction
for (ICondition cond : this.conditions) {
if (!cond.isVerify(node)) {
flag = false; break;
}
}
if (fla... | 8 |
@Override
public AlgorithmOutput start() {
//Give students a random order
if(!labs.isEmpty()){
Collections.shuffle(students);
//Sort students into labs
for(Student s: students){
s.combineLabs();
if(s.getCombinedLabs().isEmpty()){
s.setFlaggedForLabs(true);
s.setReasonForFlagging("Student... | 9 |
public Recording find(String id, int type){
Recording recording = new Recording();
try {
Statement st = conn.createStatement();
String query = "SELECT * FROM recordings WHERE id = '" + id + "' AND filetype = '" + type + "'";
ResultSet res = st.executeQuery(query);
if(res.next()){
/... | 3 |
@Test
public void testGetLastErrors() throws Exception {
//last errors
ArrayList<String> lastErrors;
String assertString1, assertString2, assertString3;
//we have to know future
this.terminal.isReadyForGetTotal();
//last errors
lastErrors = this.terminal.getLastErrors();
assertString1 = "[P-1P ? : ... | 0 |
private int count1_bitcount(int [] ix, EChannel cod_info) {
int p, i, k;
int signbits;
int sum0 = 0, sum1 = 0;
int count1End = bigvalues_region + count1_region;
for(i = bigvalues_region, k=0; k < count1End; i+=4, k++) {
v = Math.abs(ix[i]);
w = Math.abs(ix[i+1]);
x = Math.abs(ix[i+2]);
y = Math.a... | 6 |
@Override
public long longValue()
{
final int fractionalFactor = DPU.toFractionalFactor(factor);
if (fractionalFactor > 0)
{
return 0;
}
else
{
return base / DPU.getScale(factor);
}
} | 1 |
public void loadUser(String id) {
if (!StringUtil.isBlank(id)) {
PreparedStatement st = null;
ResultSet rs = null;
try {
conn = dbconn.getConnection();
st = conn.prepareStatement("SELECT * FROM users WHERE id = " + id + " limit 1");
... | 4 |
protected void resolveEntity(StringBuffer buf)
throws IOException
{
char ch = '\0';
StringBuffer keyBuf = new StringBuffer();
for (;;) {
ch = this.readChar();
if (ch == ';') {
break;
}
keyBuf.append(ch);
}
... | 6 |
public void setDeathSpawnLocation(Location deathspawn) {
this.deathspawn = deathspawn;
} | 0 |
public String getKeyProfileId() {
return keyProfileId;
} | 0 |
private static PDFDecrypter createStandardDecrypter(
PDFObject encryptDict,
PDFObject documentId,
PDFPassword password,
Integer keyLength,
boolean encryptMetadata,
StandardDecrypter.EncryptionAlgorithm encryptionAlgorithm)
throws
... | 9 |
public Renter getRenterByName(String token, String renterName) throws AccessException{
if(token != "abcd1234") throw new AccessException("Access denied");
try{
boolean notFound = true;
Iterator<Renter> I = this.renters.iterator();
while(I.hasNext()){
Renter temp = (Renter)I.next();
if(renterName.... | 5 |
@Override
public boolean execute(Mob usr) {
Container loc = usr.getLoc();
//Search the player's loc for the item's container, if we need to.
if(getTargetContainer() != null){
Obj container = search(getTargetContainer(), loc);
if (container != null && container.isConta... | 7 |
protected static FastVector pruneCadidates(FastVector allCandidates, FastVector kMinusOneSequences) {
FastVector prunedCandidates = new FastVector();
boolean isFrequent;
//for each candidate
for (int i = 0; i < allCandidates.size(); i++) {
Sequence candidate = (Sequence) allCandidates.elementAt(i)... | 9 |
protected void exportDone(JComponent c, Transferable data, int action) {
if (action != MOVE) {
return;
}
if ((p0 != null) && (p1 != null) &&
(p0.getOffset() != p1.getOffset())) {
try {
JTextComponent tc = (JTextComponent)c;
tc.g... | 5 |
@Override
public boolean put( K key, V value )
{
if ( key == null )
{
throw new IllegalArgumentException( "key was null" );
}
if ( value == null )
{
throw new IllegalArgumentException( "value was null" );
}
int offset = offset( key ... | 7 |
public void resetItems()
{
int iconNum;
int borders;
images = new ImageTemplate[]{
new ImageTemplate(elem_electricPng, 206, (Height) * winZoom , 27 * winZoom, 30 * winZoom ),
new ImageTemplate(elem_setpropPng, 206 + 31 * winZoom, (Height) * winZoom, 54 * winZ... | 6 |
public boolean shortSearch(int v) {
p = root;
if (p == null)
return false;
while (p != null) {
int i;
for (i = 1; i <= p.numOfElements; i++) {
// ҵԪ
if (p.value[i] == v) {
// Message.EndSearch();
return true;
}
if (p.value[i] > v)
break;
}
// p½ʵλ
if (i <= p.num... | 6 |
public void player2move(){
if (WPressed)
{
if(!player2.offscreentop)
{
player2.setY(player2.getY() - player2Speed);
}
}
if (SPressed)
{
if(!player2.offscreenbottom)
... | 8 |
public boolean similar(Object other) {
try {
if (!(other instanceof JSONObject)) {
return false;
}
Set<String> set = this.keySet();
if (!set.equals(((JSONObject)other).keySet())) {
return false;
}
Iterator<St... | 9 |
public static boolean isPrime(long num) {
if(num==2){
return true;
}
for (int i = 2; i <= (num + 1) / 2; i++) {
if (num % i == 0) {
return false;
}
}
return true;
} | 3 |
public String nextToken() throws JSONException {
char c;
char q;
StringBuffer sb = new StringBuffer();
do {
c = next();
} while (Character.isWhitespace(c));
if (c == '"' || c == '\'') {
q = c;
for (;;) {
c = next();
... | 9 |
@Override
public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {
if (exception != null) {
Log.error(exception);
}
return FileVisitResult.CONTINUE;
} | 1 |
public void main(String [] Lista) {
Lista_meta= Lista;
/* 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.
... | 6 |
public void removeCard(Card card, Slot cardDestination) {
CardComponent component = card.getComponent();
int index = this.getSubComponentIndex(component);
if (index < 0) {
return;
}
component.trackTarget(cardDestination);
component.getTracker().setTempPath(n... | 2 |
final boolean method478(int i, int i_30_) {
if (i_30_ != -31076)
return false;
anInt901++;
if (anIntArrayArray907 == null)
return true;
synchronized (((ObjectLoader) ((ObjectDefinition) this).aClass263_933)
.aClass45_3345) {
for (int i_31_ = 0; aByteArray885.length > i_31_; i_31_++) {
if (a... | 6 |
final void method1716(boolean bool) {
if (((Class239) this).aClass348_Sub51_3136.method3422(674)
!= Class10.aClass230_186)
((Class239) this).anInt3138 = 1;
else if (((Class239) this).aClass348_Sub51_3136.method3425(-95))
((Class239) this).anInt3138 = 0;
anInt6090++;
if ((((Class239) this).anInt3138 ^... | 5 |
void interpret (Vector v)
{ if (v.size()<1) return; // empty datagram
String arg=((String)v.elementAt(0));
if (arg.equals("open"))
// a server opened, send him an openinfo datagram
{ try
{ open(
(String)v.elementAt(1),
(String)v.elementAt(2),
Integer.parseInt((String)v.elementAt(3)),
I... | 9 |
public void sucheDateiNamen(String name, File directory, FoundListener fnd)
{
if(directory.exists())
{
File[] files = directory.listFiles();
for(int i=0; i< files.length; i++)
{
if(files[i] != null && files[i].exists())
{
if(files[i].getName().equals(name))
{
findings.add(files[... | 7 |
public boolean isCanceled() {
return canceled;
} | 0 |
List submitSubL(String text) throws Exception {
ex = null;
Object result = null;
try {
worker = new DefaultSubLWorkerSynch("(multiple-value-list " + text + ")", cycAccess, timeoutMsecs);
result = worker.getWork();
} catch (IOException iOException) {
ex = iOException;
} catch (TimeO... | 9 |
public int GetPlrBlockAnim(int id)
{
if(id == 4755) // veracs flail
{
return 2063;
}
if(id == 4153) // maul
{
return 1666;
}
else
{
return 1834;
}
} | 2 |
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
int indx = groupList.getSelectedIndex() - 1;
transferChanges();
int n = 0;
//see if updated
if (!groupNameBox.getText().equals("")
&& (editing... | 4 |
public EntradasFacade() {
super(Entradas.class);
} | 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 |
int inverse2(Block vb, Object i, Object memo, float[] out){
LookFloor1 look=(LookFloor1)i;
InfoFloor1 info=look.vi;
int n=vb.vd.vi.blocksizes[vb.mode]/2;
if(memo!=null){
/* render the lines */
int[] fit_value=(int[])memo;
int hx=0;
int lx=0;
int ly=fit_value[0]*info.mult;
... | 5 |
private void applyMerging(List<Detection> detections) throws Exception {
PreparedStatement updateStatement = con.prepareStatement("UPDATE " + detectionTable + " SET groupID = ? WHERE detectionId = ? ");
long startTime = System.nanoTime();
long numUpdates = 0;
for (Detection det : detecti... | 3 |
static final void method243(int i) {
anInt8620++;
FileOnDisk class234 = null;
try {
SignlinkRequest class144
= Class348_Sub23_Sub1.signlink.method2233((byte) -46, "",
true);
while (class144.state == 0)
Class286_Sub5.method2161((byte) -122, 1L);
if ((class144.state ^ 0xffffffff) == -2) {
... | 7 |
private void addEmptyThings(){
SortedSet<String> keys = new TreeSet<String>(data.keySet());
for (String path : keys) {
while(true){
path = deleteLastLevel(path);
if(path == null || path.equals("")) {
break;
}
if(data.get(path) == null){
data.put(path, " ");
}
}
}
} | 5 |
@Override
public T evaluate(Tuple5<?, ?, ?, ?, T> x) {
if (x != null) {
return x.getItem5();
} else {
return null;
}
} | 5 |
public static Properties processArgs(String args[]) {
Properties startupArgs = new Properties();
if (args == null) return startupArgs;
String _name = null;
String _value = null;
for (int i = 0; i < args.length; i++) {
//Get Name or Value
if (args[i].sta... | 8 |
public TreeNode(int x){
val = x;
} | 0 |
public boolean equals(Object _other)
{
if (_other == null) {
return false;
}
if (_other == this) {
return true;
}
if (!(_other instanceof Debt)) {
return false;
}
final Debt _cast = (Debt) _other;
if (id != _cast.id) {
return false;
}
if (idModified != _cast.idModified) {
... | 9 |
private boolean prefixexp1Starters()
{
if((currentToken.kind == Token.COLON) || (currentToken.kind == Token.COMMA) || (currentToken.kind == Token.LPAREN) || (currentToken.kind == Token.LCURLY) || (currentToken.kind == Token.NORMALSTRING) || (currentToken.kind == Token.CHARSTRING) || (currentToken.kind == Token.LON... | 9 |
@Override
public void invoke(IEvent event) {
/*
* With the invoke(event) method, we need to not only invoke the Event the EventBus wants, but
* every Superclass Event that Event may have. We have to use some Reflection trickery to do this.
*/
//Firstly, synchronize the listenerMap. We don't want an Event... | 7 |
private Map<Integer, Question> generateQuizQuestionsFromFile() {
Map<Integer, Question> questions = new HashMap<Integer, Question>();
String question;
BufferedReader br = null;
int lineCount = 0;
try {
String sCurrentLine;
br = new BufferedReader(new File... | 6 |
public static boolean saveFlatFile(FlatFile flatfile)
{
File flatfilefile = new File("plugins/Favor-Disfavor" + "/Database.fd");
new File("plugins/Favor-Disfavor").mkdirs();
//Our Writer Object.
Writer output = null;
try
{
//Create our Writer object.
output = new BufferedWriter(new FileWriter(flatfil... | 3 |
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// PIZZALISTAN TULOSTAMINEN
// Luodaan lista, johon haetaan kannasta tuotteet
List<Tuote> tuotteet;
List<Pizza> pizzat;
// Yhdistetään kantaan ja täytetään lista
try {
Tu... | 2 |
protected static boolean buscarcod(String cod){
try{
//metodo usado en dar de baja y modificar stock, se utiliza para comprovar si el cod esixte en el fichero
//si no esta, no se podra ni dar de baja ni modificar el stock.
BufferedReader stdin=Files.newBufferedReader(path,
java.nio.charset.StandardChars... | 3 |
public boolean torrentSet(TSetRequestArgs tsr){
if(tsr != null){
JsonObject req = new JsonObject();
//String req = new Gson().toJson(tsr, TSetRequestArgs.class);
req.addProperty("method", "torrent-set");
req.add("arguments", new Gson().toJsonTree(tsr, TSetRequestA... | 3 |
private void jBEntrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEntrarActionPerformed
String user = jTextLogin.getText().toLowerCase();
String strpass = jSenha.getText();
try {
Class.forName("org.postgresql.Driver");
} catch ... | 5 |
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
MOB target=mob;
if((auto)&&(givenTarget!=null)&&(givenTarget instanceof MOB))
target=(MOB)givenTarget;
if(target.fetchEffect(this.ID())!=null)
{
mob.tell(target,null,null,L("<S-NAME> <S-IS... | 8 |
private void updateRoster() {
fixTextLength(); // only allow 8 characters (breaks gridbaglayout otherwise)
if (UpDown.getNumPlayers()==6 && sizeswitched) { // 5 man --> 6
if (UpDown.getNumPlayers() != UpDown.getRosterSize())
UpDown.addPlayer(new Player()); // add new player
UpDown.resetPlayers... | 7 |
public Map<String, List<String>> getDictionary() {
return dictionary;
} | 0 |
public Insets getInsets() {
if (myInsets == null) {
Insets appInsets = super.getInsets();
// /#endif
myInsets = new Insets(appInsets.top + BORDER, appInsets.left
+ BORDER, appInsets.bottom + BORDER, appInsets.right
+ BORDER);
}
return myInsets;
} | 1 |
public void disable() throws IOException {
// This has to be synchronized or it can collide with the check in the task.
synchronized (optOutLock) {
// Check if the server owner has already set opt-out, if not, set it.
if (!isOptOut()) {
configuration.set("opt-out", tru... | 2 |
public String getPassword() {
return password;
} | 0 |
public void testRemoveInstantConverterSecurity() {
if (OLD_JDK) {
return;
}
try {
Policy.setPolicy(RESTRICT);
System.setSecurityManager(new SecurityManager());
ConverterManager.getInstance().removeInstantConverter(StringConverter.INSTANCE);
... | 2 |
@Override
public void addChoices(Player player, List<Choice> choices) {
super.addChoices(player, choices);
if (player.isOn(MarkType.city, MarkType.start)
&& player.isNextTo(ConnectionType.flight)
&& player.hasAtLeast(FLIGHT_PRICE))
choices.add(new FlightChoice());
} | 3 |
private void confirm() {
if (rbBead1.isSelected())
typeOfAtom = Element.ID_NT;
else if (rbBead2.isSelected())
typeOfAtom = Element.ID_PL;
else if (rbBead3.isSelected())
typeOfAtom = Element.ID_WS;
else if (rbBead4.isSelected())
typeOfAtom = Element.ID_CK;
if (rbGrow1.isSelected())
growMode = ... | 7 |
public ListNode detectCycle(ListNode head) {
if(head == null) return null;
ListNode twoStep = head;
ListNode oneStep = head;
ListNode result = head;
boolean loop = false;
while(twoStep.next != null && twoStep.next.next != null){
twoStep = twoStep.next... | 6 |
public int getSize() {
return size;
} | 0 |
private String defineDay(int day) {
String dayOfWeek;
switch (day) {
case 0:
dayOfWeek = "Mon";
break;
case 1:
dayOfWeek = "Tue";
break;
case 2:
dayOfWeek = "Wed";
break;... | 7 |
public ArrayList<Double> getStringAsDoubleList(String name)
{
List<String> value_list = strings_map.get(name);
ArrayList<Double> result = new ArrayList<Double>();
if(value_list == null)
{
return result;
}
for(String val:value_list)
{
try
{
result.add(Double.v... | 3 |
public static boolean copyFile(File from, File to, byte[] buf) {
if (buf == null) buf = new byte[BUFFER_SIZE];
FileInputStream from_s = null;
FileOutputStream to_s = null;
try {
from_s = new FileInputStream(from);
to_s = new FileOutputStream(to);
for(int bytesRea... | 7 |
public void update(){
getNextPosition();
checkTileMapCollision();
setPosition(xtemp, ytemp);
if(flinching){
long elapsed = (System.nanoTime() - flinchTimer) / 1000000;
if(elapsed > 400){
flinching = false;
}
}
if(right && dx == 0){
right = false;
left = true;
facingRight = false;... | 6 |
public final void method44(int i, AbstractToolkit var_ha) {
anInt10121++;
Object object = null;
r var_r;
if (aR10128 == null && aBoolean10137) {
Class2 class2 = method2491((byte) -51, true, 262144, var_ha);
var_r = class2 == null ? null : ((Class2) class2).aR118;
} else {
var_r = aR10128;
aR101... | 5 |
public Emulator getComandsFromXML(File file){
Emulator emulator = new Emulator();
try {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
// Document doc = (Document)... | 6 |
public Holywater(TextGame _game) {
super("Holywater", "");
this.game = _game;
this.addAction(new ActionInitial("get") {
@Override
public Result execute(Actor actor) {
if (((Player) actor).getLocation().hasOne("holywater")) {
return new ResultPartial(true, " -- In what? ", (ActionContinued)... | 8 |
public Reference (String name, T data) {
if (name == null || data == null)
throw new RuntimeException("Invalid argument(s).");
this.strName = name;
this.data = data;
} | 2 |
public AnnotationMetadata getNamedAnnotation(final Class<? extends Annotation> clzAnnotation) {
if (clzAnnotation == null) return null;
String annotationQualifiedName = clzAnnotation.getCanonicalName();
for (AnnotationMetadata annotation : annotations) {
if (annotation.getQualifiedName().equals(annotationQu... | 4 |
protected void printSolutionModifiers(PrintContext context, SPINModuleRegistry registry) {
List<RDFNode> orderBy = getList(SP.orderBy);
if(!orderBy.isEmpty()) {
context.println();
context.printIndentation(context.getIndentation());
context.printKeyword("ORDER BY");
for(RDFNode node : orderBy) {
if(n... | 7 |
public void mergeContinueStack(VariableStack stack) {
if (continueStack == null)
continueStack = stack;
else
continueStack.merge(stack);
} | 1 |
public int compare(Object one, Object two)
{
int oneY = 0;
int twoY = 0;
//firsts objects y axis coordinate
if(one instanceof Setpiece)
{
oneY = (int) ((Setpiece) one).getBox().getY();
}
else if(one instanceof Actor)
{
oneY = (int) ((Actor) one).getUpBox().ypo... | 6 |
public HTSMsg rcv() throws IOException{
byte[] lenBytes = new byte[4];
while (is.available() < 4) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
}
}
is.read(lenBytes, 0, 4);
long len = HTSMsg.deserializeS64(lenBytes, 4);
byte[] msg = new byte[(int)len];
while (is.avail... | 4 |
public int[][] getActualState()
{
int[][] gridState = new int[sudokuSize][sudokuSize];
for (int i = 0; i < sudokuSize; i++) {
for (int j = 0; j < sudokuSize; j++) {
gridState[i][j] = cells[i][j].valueState;
}
}
return gridState;
} | 2 |
private boolean canMoveToPosition(Player player, Grid grid, Position pos) {
if (pos.getxCoordinate() < 0 || pos.getyCoordinate() < 0 ||
pos.getxCoordinate() >= grid.getHorLength() || pos.getyCoordinate() >= grid.getVerLength())
return false;
List<Element> elements = grid.getElementsOnPosition(pos);
f... | 8 |
@Before
public void setUp() {
} | 0 |
public Lista SelectionSort(Lista list) throws IOException{
Node I= list.getHead();
Node J= I.getNext();
Node Min;
try{
int Vmin;
int Vj;
for (int i=0; i<cuentaLista(list)-1; i++){
Min=I;
Vmin=((int)(Min.get_data()));
... | 7 |
@Override
public GameFont getObject(String name, Map<String, String> data) {
// Check our cache first if we have already created the object. As
// always.
if (cache.containsKey(name)) {
return cache.get(name);
}
// Check if the font is valid, IE contains all of our
// REQUIRED_XML_FIELDS
if (!isValid... | 3 |
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.