Datasets:

diff
stringlengths
262
553k
is_single_chunk
bool
2 classes
is_single_function
bool
1 class
buggy_function
stringlengths
20
391k
fixed_function
stringlengths
0
392k
diff --git a/src/org/openstreetmap/josm/gui/SplashScreen.java b/src/org/openstreetmap/josm/gui/SplashScreen.java index 12b86740..61b5fb41 100644 --- a/src/org/openstreetmap/josm/gui/SplashScreen.java +++ b/src/org/openstreetmap/josm/gui/SplashScreen.java @@ -1,144 +1,144 @@ // License: GPL. For details, see LICENSE fi...
true
true
public SplashScreen() { super(); // Add a nice border to the main splash screen JPanel contentPane = (JPanel)this.getContentPane(); Border margin = new EtchedBorder(1, Color.white, Color.gray); contentPane.setBorder(margin); // Add a margin from the border to the content JPanel innerContentPane = new J...
public SplashScreen() { super(); // Add a nice border to the main splash screen JPanel contentPane = (JPanel)this.getContentPane(); Border margin = new EtchedBorder(1, Color.white, Color.gray); contentPane.setBorder(margin); // Add a margin from the border to the content JPanel innerContentPane = new J...
diff --git a/src/backends/gdx-cpp-backend-android/android_support/src/com/aevumlab/gdxcpp/ApplicationManager.java b/src/backends/gdx-cpp-backend-android/android_support/src/com/aevumlab/gdxcpp/ApplicationManager.java index c3a65f2..3d42381 100644 --- a/src/backends/gdx-cpp-backend-android/android_support/src/com/aevuml...
false
true
public static void onTouchEvent(MotionEvent evt) { final int action = evt.getAction() & MotionEvent.ACTION_MASK; int pointerIndex = (evt.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT; synchronized (pointerIdToButton) { switch (action) { case MotionEvent.ACTION_...
public static void onTouchEvent(MotionEvent evt) { final int action = evt.getAction() & MotionEvent.ACTION_MASK; int pointerIndex = (evt.getAction() & MotionEvent.ACTION_POINTER_ID_MASK) >> MotionEvent.ACTION_POINTER_ID_SHIFT; synchronized (pointerIdToButton) { switch (action) { case MotionEvent.ACTION_...
diff --git a/signserver/modules/SignServer-ejb/src/java/org/signserver/ejb/WorkerSessionBean.java b/signserver/modules/SignServer-ejb/src/java/org/signserver/ejb/WorkerSessionBean.java index f8fc71f2d..6b71f50a8 100644 --- a/signserver/modules/SignServer-ejb/src/java/org/signserver/ejb/WorkerSessionBean.java +++ b/sign...
true
true
public ProcessResponse process(final int workerId, final ProcessRequest request, final RequestContext requestContext) throws IllegalRequestException, CryptoTokenOfflineException, SignServerException { if (LOG.isDebugEnabled()) { LOG.debug(">process: " + worke...
public ProcessResponse process(final int workerId, final ProcessRequest request, final RequestContext requestContext) throws IllegalRequestException, CryptoTokenOfflineException, SignServerException { if (LOG.isDebugEnabled()) { LOG.debug(">process: " + worke...
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java index d58dddb93..655d8ad26 100644 --- a/src/com/android/settings/CryptKeeper.java +++ b/src/com/android/settings/CryptKeeper.java @@ -1,598 +1,594 @@ /* * Copyright (C) 2011 The Android Open Source Project * * Lice...
false
true
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // If we are not encrypted or encrypting, get out quickly. String state = SystemProperties.get("vold.decrypt"); if (!isDebugView() && ("".equals(state) || DECRYPT_STATE.equals(state))) { ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // If we are not encrypted or encrypting, get out quickly. String state = SystemProperties.get("vold.decrypt"); if (!isDebugView() && ("".equals(state) || DECRYPT_STATE.equals(state))) { ...
diff --git a/saiku-bi-platform-plugin-p5/src/main/java/org/saiku/plugin/PentahoDatasourceManager.java b/saiku-bi-platform-plugin-p5/src/main/java/org/saiku/plugin/PentahoDatasourceManager.java index 0827d27f..61be99e2 100644 --- a/saiku-bi-platform-plugin-p5/src/main/java/org/saiku/plugin/PentahoDatasourceManager.java ...
true
true
private Map<String, SaikuDatasource> loadDatasources() { try { this.session = PentahoSessionHolder.getSession(); ClassLoader cl = this.getClass().getClassLoader(); ClassLoader cl2 = this.getClass().getClassLoader().getParent(); Thread.currentThread().setContextClassLoader(cl2); this.catalogSer...
private Map<String, SaikuDatasource> loadDatasources() { try { this.session = PentahoSessionHolder.getSession(); ClassLoader cl = this.getClass().getClassLoader(); ClassLoader cl2 = this.getClass().getClassLoader().getParent(); Thread.currentThread().setContextClassLoader(cl2); this.catalogSer...
diff --git a/src/hamhamdash/PlayerCharacter.java b/src/hamhamdash/PlayerCharacter.java index bd4ff5d..4fc8ce7 100755 --- a/src/hamhamdash/PlayerCharacter.java +++ b/src/hamhamdash/PlayerCharacter.java @@ -1,114 +1,114 @@ package hamhamdash; import jgame.*; import jgame.platform.*; /** * * @author Cornel Ald...
true
true
public void move() { xspeed = 0; yspeed = 0; xdir = 0; ydir = 0; if (eng.getKey(eng.KeyUp) && !(eng.getKey(eng.KeyLeft) || eng.getKey(eng.KeyRight))) { if (y < game.pfHeight() - 230) { setGraphic("hrunup"); yspeed = 0; ydir = 0; System.out.println(x); System.out.println(y); S...
public void move() { xspeed = 0; yspeed = 0; xdir = 0; ydir = 0; if (eng.getKey(eng.KeyUp) && !(eng.getKey(eng.KeyLeft) || eng.getKey(eng.KeyRight))) { if (y < game.pfHeight() - 230) { setGraphic("hrunup"); yspeed = 0; ydir = 0; System.out.println(x); System.out.println(y); S...
diff --git a/src/java/com/rapleaf/jack/BaseDatabaseConnection.java b/src/java/com/rapleaf/jack/BaseDatabaseConnection.java index 25db775d..dcfb9fda 100644 --- a/src/java/com/rapleaf/jack/BaseDatabaseConnection.java +++ b/src/java/com/rapleaf/jack/BaseDatabaseConnection.java @@ -1,129 +1,129 @@ package com.rapleaf.jack...
true
true
public Connection resetConnection() { if (conn != null) { try { if (getAutoCommit()) { conn.commit(); } conn.close(); } catch (Exception e) { // do nothing } } conn = null; return getConnection(); }
public Connection resetConnection() { if (conn != null) { try { if (!getAutoCommit()) { conn.commit(); } conn.close(); } catch (Exception e) { // do nothing } } conn = null; return getConnection(); }
diff --git a/src/uk/co/sticksoft/adce/cpu/CPU_1_7.java b/src/uk/co/sticksoft/adce/cpu/CPU_1_7.java index bb1ceab..1549f4d 100644 --- a/src/uk/co/sticksoft/adce/cpu/CPU_1_7.java +++ b/src/uk/co/sticksoft/adce/cpu/CPU_1_7.java @@ -1,566 +1,566 @@ package uk.co.sticksoft.adce.cpu; import java.util.LinkedList; import ...
true
true
public synchronized void execute() { cycleCount++; tSP = SP; // Cache SP tPC = (char)(PC+1); // Pre-increment tPC boolean error = false; // Not sure what to do with this yet (maybe set on fire?) // Fetch char instr = RAM[PC]; if (instr == 0) // Invalid instruction; stop. { notifyObserver...
public synchronized void execute() { cycleCount++; tSP = SP; // Cache SP tPC = (char)(PC+1); // Pre-increment tPC boolean error = false; // Not sure what to do with this yet (maybe set on fire?) // Fetch char instr = RAM[PC]; if (instr == 0) // Invalid instruction; stop. { notifyObserver...
diff --git a/fuj1n/modjam2_src/block/BlockSecureCore.java b/fuj1n/modjam2_src/block/BlockSecureCore.java index bf49fa1..89d847a 100644 --- a/fuj1n/modjam2_src/block/BlockSecureCore.java +++ b/fuj1n/modjam2_src/block/BlockSecureCore.java @@ -1,184 +1,184 @@ package fuj1n.modjam2_src.block; import java.util.Random; ...
false
true
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { TileEntitySecurityCore te = (TileEntitySecurityCore) par1World.getBlockTileEntity(par2, par3, par4); switch (te.inputMode) { case 1: par5EntityPlayer.o...
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { TileEntitySecurityCore te = (TileEntitySecurityCore) par1World.getBlockTileEntity(par2, par3, par4); switch (te.inputMode) { case 1: par5EntityPlayer.o...
diff --git a/imap2/src/com/android/imap2/Imap2SyncService.java b/imap2/src/com/android/imap2/Imap2SyncService.java index 8f069d9c2..82a5ffa95 100644 --- a/imap2/src/com/android/imap2/Imap2SyncService.java +++ b/imap2/src/com/android/imap2/Imap2SyncService.java @@ -1,2469 +1,2469 @@ /* Copyright (C) 2012 The Android Op...
false
true
void readFolderList () throws IOException { String tag = writeCommand(mWriter, "list \"\" *"); String line; char dchar = '/'; userLog("Loading folder list..."); ArrayList<String> parentList = new ArrayList<String>(); ArrayList<Mailbox> mailboxList = new ArrayList<Ma...
void readFolderList () throws IOException { String tag = writeCommand(mWriter, "list \"\" *"); String line; char dchar = '/'; userLog("Loading folder list..."); ArrayList<String> parentList = new ArrayList<String>(); ArrayList<Mailbox> mailboxList = new ArrayList<Ma...
diff --git a/MODSRC/vazkii/tinkerer/common/block/tile/TileEnchanter.java b/MODSRC/vazkii/tinkerer/common/block/tile/TileEnchanter.java index 409fac33..6b3ab7e5 100644 --- a/MODSRC/vazkii/tinkerer/common/block/tile/TileEnchanter.java +++ b/MODSRC/vazkii/tinkerer/common/block/tile/TileEnchanter.java @@ -1,330 +1,330 @@ ...
true
true
public void updateEntity() { if(working) { ItemStack tool = getStackInSlot(0); if(tool == null) { working = false; return; } enchantItem : { for(Aspect aspect : LibFeatures.PRIMAL_ASPECTS) { int currentAmount = currentAspects.getAmount(aspect); int totalAmount = totalAspects....
public void updateEntity() { if(working) { ItemStack tool = getStackInSlot(0); if(tool == null) { working = false; return; } enchantItem : { for(Aspect aspect : LibFeatures.PRIMAL_ASPECTS) { int currentAmount = currentAspects.getAmount(aspect); int totalAmount = totalAspects....
diff --git a/marytts-redstart/src/main/java/marytts/tools/redstart/Redstart.java b/marytts-redstart/src/main/java/marytts/tools/redstart/Redstart.java index 8158c2a58..25d664c7e 100644 --- a/marytts-redstart/src/main/java/marytts/tools/redstart/Redstart.java +++ b/marytts-redstart/src/main/java/marytts/tools/redstart/R...
false
true
public static void main(String[] args) { // Determine the voice building directory in the following order: // 1. System property "user.dir" // 2. First command line argument // 3. current directory // 4. Prompt user via gui. // Do a sanity check -- do they exist, do t...
public static void main(String[] args) { // Determine the voice building directory in the following order: // 1. System property "user.dir" // 2. First command line argument // 3. current directory // 4. Prompt user via gui. // Do a sanity check -- do they exist, do t...
diff --git a/src/java/org/astrogrid/samp/test/CalcStorm.java b/src/java/org/astrogrid/samp/test/CalcStorm.java index 4fb2ae0..0a98e0b 100644 --- a/src/java/org/astrogrid/samp/test/CalcStorm.java +++ b/src/java/org/astrogrid/samp/test/CalcStorm.java @@ -1,327 +1,328 @@ package org.astrogrid.samp.test; import java.io...
true
true
public static int runMain( String[] args ) throws IOException { // Set up usage message. String usage = new StringBuffer() .append( "\n Usage:" ) .append( "\n " ) .append( CalcStorm.class.getName() ) .append( "\n " ) .appe...
public static int runMain( String[] args ) throws IOException { // Set up usage message. String usage = new StringBuffer() .append( "\n Usage:" ) .append( "\n " ) .append( CalcStorm.class.getName() ) .append( "\n " ) .appe...
diff --git a/mcu/src/org/smbarbour/mcu/AppletLauncherThread.java b/mcu/src/org/smbarbour/mcu/AppletLauncherThread.java index b96d2a3..ec217c5 100644 --- a/mcu/src/org/smbarbour/mcu/AppletLauncherThread.java +++ b/mcu/src/org/smbarbour/mcu/AppletLauncherThread.java @@ -1,236 +1,238 @@ package org.smbarbour.mcu; impo...
true
true
public void run() { String javaBin = "java"; File binDir = (new File(jrePath)).toPath().resolve("bin").toFile(); if( binDir.exists() ) { javaBin = binDir.toPath().resolve("java").toString(); } List<String> args = new ArrayList<String>(); args.add(javaBin); args.add("-XX:+UseConcMarkSweepGC"); args.a...
public void run() { String javaBin = "java"; File binDir = (new File(jrePath)).toPath().resolve("bin").toFile(); if( binDir.exists() ) { javaBin = binDir.toPath().resolve("java").toString(); } List<String> args = new ArrayList<String>(); args.add(javaBin); args.add("-XX:+UseConcMarkSweepGC"); args.a...
diff --git a/cascading-core/src/main/java/cascading/pipe/Splice.java b/cascading-core/src/main/java/cascading/pipe/Splice.java index bc6fe3a6..b3e21ad3 100644 --- a/cascading-core/src/main/java/cascading/pipe/Splice.java +++ b/cascading-core/src/main/java/cascading/pipe/Splice.java @@ -1,1416 +1,1416 @@ /* * Copyrig...
true
true
Fields resolveDeclared( Set<Scope> incomingScopes ) { try { Fields declaredFields = getDeclaredFields(); if( declaredFields != null ) // null for GroupBy { if( incomingScopes.size() != pipes.size() && isSelfJoin() ) throw new OperatorException( this, "self joins wi...
Fields resolveDeclared( Set<Scope> incomingScopes ) { try { Fields declaredFields = getDeclaredFields(); if( declaredFields != null ) // null for GroupBy { if( incomingScopes.size() != pipes.size() && isSelfJoin() ) throw new OperatorException( this, "self joins wi...
diff --git a/src/main/java/org/dynmap/ClientUpdateComponent.java b/src/main/java/org/dynmap/ClientUpdateComponent.java index 97fa8210..14173101 100644 --- a/src/main/java/org/dynmap/ClientUpdateComponent.java +++ b/src/main/java/org/dynmap/ClientUpdateComponent.java @@ -1,75 +1,77 @@ package org.dynmap; import stat...
true
true
protected void buildClientUpdate(ClientUpdateEvent e) { World world = e.world.world; JSONObject u = e.update; long since = e.timestamp; String worldName = world.getName(); s(u, "servertime", world.getTime() % 24000); s(u, "hasStorm", world.hasStorm()); ...
protected void buildClientUpdate(ClientUpdateEvent e) { World world = e.world.world; JSONObject u = e.update; long since = e.timestamp; String worldName = world.getName(); s(u, "servertime", world.getTime() % 24000); s(u, "hasStorm", world.hasStorm()); ...
diff --git a/src/dao/PostDAO.java b/src/dao/PostDAO.java index 138e735..5e9f04e 100644 --- a/src/dao/PostDAO.java +++ b/src/dao/PostDAO.java @@ -1,210 +1,210 @@ package dao; import java.sql.*; import java.util.ArrayList; import java.util.Arrays; import javax.naming.*; import javax.sql.*; import org.apache....
true
true
public static ArrayList<Post> getPage(int page) throws SQLException, NamingException { Connection conn = null; Statement stmt = null; ResultSet rs = null; ArrayList<Comment> comment = new ArrayList<Comment>(); if (page <= 0) { page = 1; } DataSource ds = getDataSource(); ArrayList<Post> resu...
public static ArrayList<Post> getPage(int page) throws SQLException, NamingException { Connection conn = null; Statement stmt = null; ResultSet rs = null; ArrayList<Comment> comment = new ArrayList<Comment>(); if (page <= 0) { page = 1; } DataSource ds = getDataSource(); ArrayList<Post> resu...
diff --git a/src/cat/mobilejazz/database/content/DataProvider.java b/src/cat/mobilejazz/database/content/DataProvider.java index 8729924..25b434f 100644 --- a/src/cat/mobilejazz/database/content/DataProvider.java +++ b/src/cat/mobilejazz/database/content/DataProvider.java @@ -1,707 +1,707 @@ package cat.mobilejazz.dat...
true
true
protected ContentValues getChanges(SQLiteDatabase db, int action, String table, long id, ContentValues values, String customChangeValue, String additionalData) { try { String json = customChangeValue; if (json == null) { JSONObject obj = getDataAdapter().renderValues(values, table, Storage.REMOTE); ...
protected ContentValues getChanges(SQLiteDatabase db, int action, String table, long id, ContentValues values, String customChangeValue, String additionalData) { try { String json = customChangeValue; if (json == null) { JSONObject obj = getDataAdapter().renderValues(values, table, Storage.REMOTE); ...
diff --git a/selenium_testing/test/Test_03_W0100_Search_for_a_data_set.java b/selenium_testing/test/Test_03_W0100_Search_for_a_data_set.java index 90b4fd5..85a2e59 100644 --- a/selenium_testing/test/Test_03_W0100_Search_for_a_data_set.java +++ b/selenium_testing/test/Test_03_W0100_Search_for_a_data_set.java @@ -1,95 +1...
false
true
public void test_03_W0100_Search_for_a_data_set() throws Exception { selenium.open("/ooici-pres-0.1/"); selenium.click("login_button"); selenium.waitForPageToLoad("30000"); selenium.click("wayflogonbutton"); selenium.waitForPageToLoad("30000"); for (int second = 0;; second++) { if (second >= 60) fail("t...
public void test_03_W0100_Search_for_a_data_set() throws Exception { selenium.open("/ooici-pres-0.1/"); selenium.click("login_button"); selenium.waitForPageToLoad("30000"); selenium.click("wayflogonbutton"); selenium.waitForPageToLoad("30000"); for (int second = 0;; second++) { if (second >= 60) fail("t...
diff --git a/SoftwareProjectDay/src/edu/se/se441/threads/Employee.java b/SoftwareProjectDay/src/edu/se/se441/threads/Employee.java index 0c8d4ad..3983342 100644 --- a/SoftwareProjectDay/src/edu/se/se441/threads/Employee.java +++ b/SoftwareProjectDay/src/edu/se/se441/threads/Employee.java @@ -1,212 +1,212 @@ package ed...
true
true
public void run(){ this.setName(getEmployeeName()); Random r = new Random(); try { // Starting all threads at the same time (clock == 0 / "8:00AM"). startSignal.await(); // Arrive sometime between 8:00 and 8:30 Thread.sleep(10 * r.nextInt(30)); System.out.println(office.getStringTime() + ...
public void run(){ this.setName(getEmployeeName()); Random r = new Random(); try { // Starting all threads at the same time (clock == 0 / "8:00AM"). startSignal.await(); // Arrive sometime between 8:00 and 8:30 Thread.sleep(10 * r.nextInt(30)); System.out.println(office.getStringTime() + ...
diff --git a/src/me/hunterboerner/war/Commands.java b/src/me/hunterboerner/war/Commands.java index 8564a31..e4d90d8 100644 --- a/src/me/hunterboerner/war/Commands.java +++ b/src/me/hunterboerner/war/Commands.java @@ -1,97 +1,103 @@ package me.hunterboerner.war; import org.bukkit.ChatColor; import org.bukkit.comm...
false
true
public boolean onCommand(CommandSender sender, Command cmd, String label,String[] args) { if(cmd.getName().equalsIgnoreCase("war")){ if(!(sender instanceof Player)){ plugin.logMessage("Only a player may use the war command."); }else{ Player player = (Player) sender; if(player.hasPermission("war.co...
public boolean onCommand(CommandSender sender, Command cmd, String label,String[] args) { if(cmd.getName().equalsIgnoreCase("war")){ if(!(sender instanceof Player)){ plugin.logMessage("Only a player may use the war command."); }else{ Player player = (Player) sender; if(player.hasPermission("war.co...
diff --git a/LaTeXDraw/src/net/sf/latexdraw/actions/ScaleShapes.java b/LaTeXDraw/src/net/sf/latexdraw/actions/ScaleShapes.java index e30ff984..2ab30542 100644 --- a/LaTeXDraw/src/net/sf/latexdraw/actions/ScaleShapes.java +++ b/LaTeXDraw/src/net/sf/latexdraw/actions/ScaleShapes.java @@ -1,193 +1,193 @@ package net.sf.l...
false
true
private boolean isValidScales() { switch(refPosition) { case EAST: case WEST: return isValidScale(newX) && getScaledWidth()>0.; case NORTH: case SOUTH: return isValidScale(newY) && getScaledHeight()>0.; default: return isValidScale(newX) && isValidScale(newY) && getScaledHeight()>1. && getScaled...
private boolean isValidScales() { switch(refPosition) { case EAST: case WEST: return isValidScale(newX) && getScaledWidth()>1.; case NORTH: case SOUTH: return isValidScale(newY) && getScaledHeight()>1.; default: return isValidScale(newX) && isValidScale(newY) && getScaledHeight()>1. && getScaled...
diff --git a/src/rajawali/primitives/Plane.java b/src/rajawali/primitives/Plane.java index 69a7016e..ea349317 100644 --- a/src/rajawali/primitives/Plane.java +++ b/src/rajawali/primitives/Plane.java @@ -1,84 +1,84 @@ package rajawali.primitives; import rajawali.BaseObject3D; public class Plane extends BaseObject...
true
true
private void init() { int i, j; int numVertices = (mSegmentsW + 1) * (mSegmentsH + 1); float[] vertices = new float[numVertices * 3]; float[] textureCoords = new float[numVertices * 2]; float[] normals = new float[numVertices * 3]; float[] colors = new float[numVertices * 4]; int[] indices = new int[mSeg...
private void init() { int i, j; int numVertices = (mSegmentsW + 1) * (mSegmentsH + 1); float[] vertices = new float[numVertices * 3]; float[] textureCoords = new float[numVertices * 2]; float[] normals = new float[numVertices * 3]; float[] colors = new float[numVertices * 4]; int[] indices = new int[mSeg...
diff --git a/src/main/java/net/croxis/plugins/civilmineation/Civilmineation.java b/src/main/java/net/croxis/plugins/civilmineation/Civilmineation.java index 4fadebd..8feb060 100644 --- a/src/main/java/net/croxis/plugins/civilmineation/Civilmineation.java +++ b/src/main/java/net/croxis/plugins/civilmineation/Civilmineat...
true
true
public void onSignChangeEvent(SignChangeEvent event){ ResidentComponent resident = CivAPI.getResident(event.getPlayer().getName()); PlotComponent plot = CivAPI.getPlot(event.getBlock().getChunk()); // Void plots are ok, if fact required for this set if (event.getLine(0).equalsIgnoreCase("[New Civ]")){...
public void onSignChangeEvent(SignChangeEvent event){ ResidentComponent resident = CivAPI.getResident(event.getPlayer().getName()); PlotComponent plot = CivAPI.getPlot(event.getBlock().getChunk()); // Void plots are ok, if fact required for this set if (event.getLine(0).equalsIgnoreCase("[New Civ]")){...
diff --git a/src/net/sf/freecol/server/model/ServerColony.java b/src/net/sf/freecol/server/model/ServerColony.java index 96282393c..0309b0706 100644 --- a/src/net/sf/freecol/server/model/ServerColony.java +++ b/src/net/sf/freecol/server/model/ServerColony.java @@ -1,573 +1,573 @@ /** * Copyright (C) 2002-2011 The ...
true
true
public void csNewTurn(Random random, ChangeSet cs) { logger.finest("ServerColony.csNewTurn, for " + toString()); ServerPlayer owner = (ServerPlayer) getOwner(); Specification spec = getSpecification(); boolean tileDirty = false; boolean colonyDirty = false; List<Free...
public void csNewTurn(Random random, ChangeSet cs) { logger.finest("ServerColony.csNewTurn, for " + toString()); ServerPlayer owner = (ServerPlayer) getOwner(); Specification spec = getSpecification(); boolean tileDirty = false; boolean colonyDirty = false; List<Free...
diff --git a/src/ui/shared/java/com/flexive/war/servlet/ExportServlet.java b/src/ui/shared/java/com/flexive/war/servlet/ExportServlet.java index e9fb24a5..1bf0f7df 100644 --- a/src/ui/shared/java/com/flexive/war/servlet/ExportServlet.java +++ b/src/ui/shared/java/com/flexive/war/servlet/ExportServlet.java @@ -1,142 +1,...
false
true
private void exportType(HttpServletRequest request, HttpServletResponse response, String type) throws IOException { final UserTicket ticket = FxContext.get().getTicket(); if (!ticket.isInRole(Role.StructureManagement)) { LOG.warn("Tried to export type [" + type + "] without being in role...
private void exportType(HttpServletRequest request, HttpServletResponse response, String type) throws IOException { final UserTicket ticket = FxContext.get().getTicket(); if (!ticket.isInRole(Role.StructureManagement)) { LOG.warn("Tried to export type [" + type + "] without being in role...
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java index 56c6d6585..4582e98d9 100644 --- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java +++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFil...
false
true
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if( abortErrorMessage != null ) { ((HttpServletResponse)response).sendError( 500, abortErrorMessage ); return; } if (this.cores == null) { ((HttpServletRe...
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if( abortErrorMessage != null ) { ((HttpServletResponse)response).sendError( 500, abortErrorMessage ); return; } if (this.cores == null) { ((HttpServletRe...
diff --git a/src/org/geworkbench/engine/WelcomeScreen.java b/src/org/geworkbench/engine/WelcomeScreen.java index ee71c76b..a9a5abab 100644 --- a/src/org/geworkbench/engine/WelcomeScreen.java +++ b/src/org/geworkbench/engine/WelcomeScreen.java @@ -1,109 +1,110 @@ package org.geworkbench.engine; import java.awt.Borde...
true
true
public WelcomeScreen() { textFieldPanel = new JPanel(); textFieldPanel.setLayout(new BorderLayout()); String filename = WELCOMETEXT_FILENAME; try { /* Try load the welcome file */ textField = new JEditorPane(); textField.setContentType("text/html"); textField.read(new BufferedReader(new FileReader(...
public WelcomeScreen() { textFieldPanel = new JPanel(); textFieldPanel.setLayout(new BorderLayout()); String filename = WELCOMETEXT_FILENAME; try { /* Try load the welcome file */ textField = new JEditorPane(); textField.setContentType("text/html"); textField.read(new BufferedReader(new FileReader(...
diff --git a/src/com/mpl/altimeter/BackgroundView.java b/src/com/mpl/altimeter/BackgroundView.java index 03bb8e8..5b1c36d 100644 --- a/src/com/mpl/altimeter/BackgroundView.java +++ b/src/com/mpl/altimeter/BackgroundView.java @@ -1,74 +1,74 @@ package com.mpl.altimeter; import android.content.Context; import androi...
true
true
public void onDraw(Canvas canvas) { super.onDraw(canvas); // Get the real displayed image size int realHeight = getHeight(); int realWidth = getWidth(); boolean higher = getHeight() / getWidth() > 1280 / 800; if (higher) realWidth = 800 * getHeight() / 1280; else realHeight = 1280 * getWidth() /...
public void onDraw(Canvas canvas) { super.onDraw(canvas); // Get the real displayed image size int realHeight = getHeight(); int realWidth = getWidth(); boolean higher = (float)getHeight() / getWidth() > (float)1280 / 800; if (higher) realWidth = 800 * getHeight() / 1280; else realHeight = 1280 ...
diff --git a/applications/rainbow/src/net/sf/okapi/applications/rainbow/utilities/textrewriting/Utility.java b/applications/rainbow/src/net/sf/okapi/applications/rainbow/utilities/textrewriting/Utility.java index 04d53dbe1..dc219851f 100644 --- a/applications/rainbow/src/net/sf/okapi/applications/rainbow/utilities/text...
true
true
private void processTextUnit (TextUnit tu) { // Skip non-translatable if ( !tu.isTranslatable() ) return; // Skip if already translate (only if required) if ( !params.applyToExistingTarget && tu.hasTarget(trgLang) ) return; // Apply the segmentation and/or segment marks if requested if ( params.segment ...
private void processTextUnit (TextUnit tu) { // Skip non-translatable if ( !tu.isTranslatable() ) return; // Skip if already translate (only if required) if ( !params.applyToExistingTarget && tu.hasTarget(trgLang) ) return; // Apply the segmentation and/or segment marks if requested if ( params.segment ...
diff --git a/org.eclipse.emf.emfstore.client.test/src/org/eclipse/emf/emfstore/client/test/api/ModelElementTest.java b/org.eclipse.emf.emfstore.client.test/src/org/eclipse/emf/emfstore/client/test/api/ModelElementTest.java index c587746a1..0f67b68a9 100644 --- a/org.eclipse.emf.emfstore.client.test/src/org/eclipse/emf/...
true
true
public void testUndoMoveOperation() { final ESLocalProject localProject = ESWorkspaceProvider.INSTANCE.getWorkspace().createLocalProject( "SimpleEmptyProject", ""); final Tournament tournamentA = ProjectChangeUtil.createTournament(true); final Tournament tournamentB = ProjectChangeUtil.createTournament(true)...
public void testUndoMoveOperation() { final ESLocalProject localProject = ESWorkspaceProvider.INSTANCE.getWorkspace().createLocalProject( "SimpleEmptyProject"); final Tournament tournamentA = ProjectChangeUtil.createTournament(true); final Tournament tournamentB = ProjectChangeUtil.createTournament(true); ...
diff --git a/src/main/java/com/dumptruckman/chunky/module/ChunkyCommand.java b/src/main/java/com/dumptruckman/chunky/module/ChunkyCommand.java index 54846fd..a44df5d 100644 --- a/src/main/java/com/dumptruckman/chunky/module/ChunkyCommand.java +++ b/src/main/java/com/dumptruckman/chunky/module/ChunkyCommand.java @@ -1,1...
true
true
public ChunkyCommand(String name, List<String> aliases, String description, List<String> helpLines, ChunkyCommandExecutor executor, ChunkyCommand parentCommand) { this.name = name.toLowerCase(); if (aliases != null) { for (int i = 0; i < aliases.size(); i++) { aliases.set...
public ChunkyCommand(String name, List<String> aliases, String description, List<String> helpLines, ChunkyCommandExecutor executor, ChunkyCommand parentCommand) { this.name = name.toLowerCase(); if (aliases != null) { for (int i = 0; i < aliases.size(); i++) { aliases.set...
diff --git a/com.mobilesorcery.sdk.core/src/com/mobilesorcery/sdk/core/CoreMoSyncPlugin.java b/com.mobilesorcery.sdk.core/src/com/mobilesorcery/sdk/core/CoreMoSyncPlugin.java index 474de62b..2ea74477 100644 --- a/com.mobilesorcery.sdk.core/src/com/mobilesorcery/sdk/core/CoreMoSyncPlugin.java +++ b/com.mobilesorcery.sdk...
true
true
public void resourceChanged(IResourceChangeEvent event) { if (event.getType() == IResourceChangeEvent.PRE_DELETE) { IResource resource = event.getResource(); IProject project = (resource != null && resource.getType() == IResource.PROJECT) ? (IProject) resource : null; MoSyncProject mosyncProj...
public void resourceChanged(IResourceChangeEvent event) { if (event.getType() == IResourceChangeEvent.PRE_DELETE) { IResource resource = event.getResource(); IProject project = (resource != null && resource.getType() == IResource.PROJECT) ? (IProject) resource : null; MoSyncProject mosyncProj...
diff --git a/src/com/allplayers/android/PhotoPager.java b/src/com/allplayers/android/PhotoPager.java index c45d44c..fdf9cfd 100644 --- a/src/com/allplayers/android/PhotoPager.java +++ b/src/com/allplayers/android/PhotoPager.java @@ -1,225 +1,225 @@ package com.allplayers.android; import java.lang.ref.WeakReference;...
true
true
public PhotoPagerAdapter(Context context, PhotoData item) { mContext = context; final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); final int cacheSize = maxMemory / 8; mImageCache = new LruCache<String, Bitmap>(cacheSize) { @Override ...
public PhotoPagerAdapter(Context context, PhotoData item) { mContext = context; final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); final int cacheSize = maxMemory / 8; mImageCache = new LruCache<String, Bitmap>(cacheSize) { @Override ...
diff --git a/framework/freedomotic/src/it/freedomotic/bus/AbstractBusConnector.java b/framework/freedomotic/src/it/freedomotic/bus/AbstractBusConnector.java index 8e581954..fa417746 100644 --- a/framework/freedomotic/src/it/freedomotic/bus/AbstractBusConnector.java +++ b/framework/freedomotic/src/it/freedomotic/bus/Abs...
true
true
private void connect(String brokerString, String username, String password) { //create a connection if (emptySharedWriter == null) { //not already connected to the bus try { //create an embedded messaging broker BROKER.setBrokerName("freedomotic"); ...
private void connect(String brokerString, String username, String password) { //create a connection if (emptySharedWriter == null) { //not already connected to the bus try { //create an embedded messaging broker BROKER.setBrokerName("freedomotic"); ...
diff --git a/src/edu/kit/asa/alloy2key/key/TermUnary.java b/src/edu/kit/asa/alloy2key/key/TermUnary.java index 9bca586..fa919dd 100644 --- a/src/edu/kit/asa/alloy2key/key/TermUnary.java +++ b/src/edu/kit/asa/alloy2key/key/TermUnary.java @@ -1,86 +1,86 @@ /** * Created on 13.02.2011 */ package edu.kit.asa.alloy2ke...
true
true
public String toString() { switch (operator) { case NOT: return comment == null ? "" : "; " + this.comment + "\n" + "(not "+sub.toString()+")"; // smt ok default: return ""; } }
public String toString() { switch (operator) { case NOT: return (comment == null ? "" : "; " + this.comment + "\n") + "(not "+sub.toString()+")"; // smt ok default: return ""; } }
diff --git a/app/external/InstagramParser.java b/app/external/InstagramParser.java index 1b22a28..e60b282 100644 --- a/app/external/InstagramParser.java +++ b/app/external/InstagramParser.java @@ -1,374 +1,374 @@ package external; import static play.libs.Json.toJson; import java.io.UnsupportedEncodingException; ...
true
true
private static Feature instaToGeoJson(JsonNode jsonNode) { //String type = jsonNode.findValue("type").asText(); String id = jsonNode.get("id").asText(); JsonNode location = jsonNode.findValue("location"); Geometry geometry; //check if location node is not null if (!location.isNull()) { doub...
private static Feature instaToGeoJson(JsonNode jsonNode) { //String type = jsonNode.findValue("type").asText(); String id = jsonNode.get("id").asText(); JsonNode location = jsonNode.findValue("location"); Geometry geometry; //check if location node is not null if (!location.isNull()) { doub...
diff --git a/Main.java b/Main.java index a9012d0..d669e6e 100644 --- a/Main.java +++ b/Main.java @@ -1,43 +1,45 @@ import java.io.*; import java.util.*; class Main { Scanner sc; public Main() { sc = new Scanner(System.in); } void run() { // read 'find $C_i$ to $C...
true
true
void run() { // read 'find $C_i$ to $C_j$ clusters' // read '$n$ points' // read '$x$ $y$' for each point sc.next(); // find int ci = sc.nextInt(); sc.next(); // to int cj = sc.nextInt(); sc.next(); // clusters int n = sc.nextInt(); ...
void run() { // read 'find $C_i$ to $C_j$ clusters' // read '$n$ points' // read '$x$ $y$' for each point sc.next(); // find int ci = sc.nextInt(); int cj = ci; if (sc.next().equals("to")) { // otherwise, it is clusters cj = sc.nextInt(); ...
diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpoint.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpoint.java index 8435439974..1d7b3a7ee8 100644 --- a/spring-integration-...
false
true
private void popMessageAndSend() { Message<Object> message = null; byte[] value = null; try { value = this.boundListOperations.rightPop(this.receiveTimeout, TimeUnit.MILLISECONDS); } catch (Exception e) { logger.error("Failed to execute listening task. Will attempt to resubmit in " + this.recoveryInte...
private void popMessageAndSend() { Message<Object> message = null; byte[] value = null; try { value = this.boundListOperations.rightPop(this.receiveTimeout, TimeUnit.MILLISECONDS); } catch (Exception e) { this.listening = false; if (this.active) { logger.error("Failed to execute listening task....
diff --git a/src/main/java/org/asciidoc/maven/AsciidoctorMojo.java b/src/main/java/org/asciidoc/maven/AsciidoctorMojo.java index 7f2ab63..25c4599 100644 --- a/src/main/java/org/asciidoc/maven/AsciidoctorMojo.java +++ b/src/main/java/org/asciidoc/maven/AsciidoctorMojo.java @@ -1,89 +1,89 @@ /* * Licensed under the Ap...
true
true
public void execute() throws MojoExecutionException, MojoFailureException { final ScriptEngineManager engineManager = new ScriptEngineManager(); final ScriptEngine rubyEngine = engineManager.getEngineByName("jruby"); final Bindings bindings = new SimpleBindings(); bindings.put("srcD...
public void execute() throws MojoExecutionException, MojoFailureException { final ScriptEngineManager engineManager = new ScriptEngineManager(); final ScriptEngine rubyEngine = engineManager.getEngineByName("jruby"); final Bindings bindings = new SimpleBindings(); bindings.put("srcD...
diff --git a/WorldWindRad/src/panels/other/ExaggerationPanel.java b/WorldWindRad/src/panels/other/ExaggerationPanel.java index bc44bdd3..e658edc5 100644 --- a/WorldWindRad/src/panels/other/ExaggerationPanel.java +++ b/WorldWindRad/src/panels/other/ExaggerationPanel.java @@ -1,157 +1,158 @@ package panels.other; imp...
false
true
public ExaggerationPanel(final WorldWindow wwd) { super(new GridBagLayout()); GridBagConstraints c; final JSlider slider = new JSlider(0, 200, exaggerationToSlider(Settings.get().getVerticalExaggeration())); Dimension size = slider.getPreferredSize(); size.width = 50; slider.setPreferredSize(size); ...
public ExaggerationPanel(final WorldWindow wwd) { super(new GridBagLayout()); GridBagConstraints c; double settingsExaggeration = Settings.get().getVerticalExaggeration(); final JSlider slider = new JSlider(0, 200, exaggerationToSlider(settingsExaggeration)); Dimension size = slider.getPreferredSize()...
diff --git a/src/Parser.java b/src/Parser.java index 2cf1de7..c92bc0b 100644 --- a/src/Parser.java +++ b/src/Parser.java @@ -1,58 +1,58 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import Token.Type; public class Parser { private InputSource _i...
true
true
public Token nextToken() { if (_line.length() == 0) _line = _in.readLine(); if (_line.length() == 0) return null; Iterator<Entry<String, Token.Type>> it = _tokens.entrySet().iterator(); while (it.hasNext()) { Entry<String, Token.Type> entry = it.next(); if (_line.startsWith(entry.getKey())) ...
public Token nextToken() { if (_line.length() == 0) _line = _in.readLine(); if (_line.length() == 0) return null; Iterator<Entry<String, Token.Type>> it = _tokens.entrySet().iterator(); while (it.hasNext()) { Entry<String, Token.Type> entry = it.next(); if (_line.startsWith(entry.getKey())) ...
diff --git a/src/java/com/cantstopthesignals/PicasaRelayServlet.java b/src/java/com/cantstopthesignals/PicasaRelayServlet.java index 469004c..4af657a 100644 --- a/src/java/com/cantstopthesignals/PicasaRelayServlet.java +++ b/src/java/com/cantstopthesignals/PicasaRelayServlet.java @@ -1,51 +1,52 @@ package com.cantstop...
true
true
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String urlParam = req.getParameter("url"); URL url = new URL(urlParam); if (!ALLOWED_URLS.matcher(url.toString()).matches()) { throw new RuntimeException("Url not in whitelist"); } HttpURLConnect...
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String urlParam = req.getParameter("url"); URL url = new URL(urlParam); if (!ALLOWED_URLS.matcher(url.toString()).matches()) { throw new RuntimeException("Url not in whitelist"); } HttpURLConnect...
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index 7b53cd70..d76e0260 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -1,1186 +1,1187 @@ /* * Copyright (C) 2008 The Android Open Source Project ...
true
true
static boolean shortcutExists(Context context, String title, Intent intent) { final ContentResolver cr = context.getContentResolver(); Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI, new String[] { "title", "intent" }, "title=? and intent=?", new String[] { title,...
static boolean shortcutExists(Context context, String title, Intent intent) { final ContentResolver cr = context.getContentResolver(); Cursor c = cr.query(LauncherSettings.Favorites.CONTENT_URI, new String[] { "title", "intent" }, "title=? and intent=?", new String[] { title,...
diff --git a/calendar-createcomponent/src/main/java/org/exoplatform/cs/event/UICreateEvent.java b/calendar-createcomponent/src/main/java/org/exoplatform/cs/event/UICreateEvent.java index 3fadb238..ccc318af 100644 --- a/calendar-createcomponent/src/main/java/org/exoplatform/cs/event/UICreateEvent.java +++ b/calendar-cre...
true
true
public void execute(Event<UICreateEvent> event) throws Exception { UICreateEvent uiForm = event.getSource(); String summary = uiForm.getEventSummary(); if (summary == null || summary.trim().length() <= 0) { event.getRequestContext().getUIApplication().addMessage(new ApplicationMess...
public void execute(Event<UICreateEvent> event) throws Exception { UICreateEvent uiForm = event.getSource(); String summary = uiForm.getEventSummary(); if (summary == null || summary.trim().length() <= 0) { event.getRequestContext().getUIApplication().addMessage(new ApplicationMess...
diff --git a/com/buglabs/bug/module/camera/CameraModlet.java b/com/buglabs/bug/module/camera/CameraModlet.java index 21855e3..b1b5774 100644 --- a/com/buglabs/bug/module/camera/CameraModlet.java +++ b/com/buglabs/bug/module/camera/CameraModlet.java @@ -1,316 +1,311 @@ /* Copyright (c) 2007, 2008 Bug Labs, Inc. * All...
true
true
public void start() throws Exception { modProps = new ArrayList(); camera = new Camera(); //TODO: Change this when we move to linux 2.6.22 or greater since //BMI agent should listen to UDEV ACTION=="online" before starting modlets try { CharDeviceUtils.openDeviceWithRetry(camera, CAMERA_DEVICE_NODE, 2); ...
public void start() throws Exception { modProps = new ArrayList(); camera = new Camera(); //TODO: Change this when we move to linux 2.6.22 or greater since //BMI agent should listen to UDEV ACTION=="online" before starting modlets try { CharDeviceUtils.openDeviceWithRetry(camera, CAMERA_DEVICE_NODE, 2); ...
diff --git a/rultor-conveyer/src/main/java/com/rultor/conveyer/XemblyReportingWallet.java b/rultor-conveyer/src/main/java/com/rultor/conveyer/XemblyReportingWallet.java index 343690c2f..4afdde10c 100644 --- a/rultor-conveyer/src/main/java/com/rultor/conveyer/XemblyReportingWallet.java +++ b/rultor-conveyer/src/main/jav...
true
true
public void charge(final String details, final Dollars amount) { this.wallet.charge(details, amount); new XemblyLine( new Directives() .xpath("/snapshot") .add("cost") .xset(String.format(". + %d", amount.points())) ).log(); }
public void charge(final String details, final Dollars amount) { this.wallet.charge(details, amount); new XemblyLine( new Directives() .xpath("/snapshot") .addIf("cost") .xset(String.format(". + %d", amount.points())) ).log(); }...
diff --git a/src/net/contra/obfuscator/util/misc/Misc.java b/src/net/contra/obfuscator/util/misc/Misc.java index 210f07d..9239af1 100644 --- a/src/net/contra/obfuscator/util/misc/Misc.java +++ b/src/net/contra/obfuscator/util/misc/Misc.java @@ -1,62 +1,62 @@ package net.contra.obfuscator.util.misc; import net.contr...
false
true
private static String getRandomString(int length, boolean simple) { if (!simple) { Random rand = new Random(System.currentTimeMillis()); StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; i++) { sb.append(new char[rand.nextInt(255)]); ...
private static String getRandomString(int length, boolean simple) { if (!simple) { Random rand = new Random(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; i++) { sb.append(new char[rand.nextInt(255)]); } return...
diff --git a/support/src/main/java/org/fourthline/cling/support/model/RecordMediumWriteStatus.java b/support/src/main/java/org/fourthline/cling/support/model/RecordMediumWriteStatus.java index cbd8ecd..a15762e 100644 --- a/support/src/main/java/org/fourthline/cling/support/model/RecordMediumWriteStatus.java +++ b/suppo...
true
true
static public RecordMediumWriteStatus valueOrUnknownOf(String s) { try { return valueOf(s); } catch (IllegalArgumentException ex) { return UNKNOWN; } }
static public RecordMediumWriteStatus valueOrUnknownOf(String s) { if (s == null) return UNKNOWN; try { return valueOf(s); } catch (IllegalArgumentException ex) { return UNKNOWN; } }
diff --git a/gdx/src/com/badlogic/gdx/Version.java b/gdx/src/com/badlogic/gdx/Version.java index d8a5ed275..e460f36f1 100644 --- a/gdx/src/com/badlogic/gdx/Version.java +++ b/gdx/src/com/badlogic/gdx/Version.java @@ -1,44 +1,41 @@ /* * Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@eso...
true
true
public static void loadLibrary () { if(GdxNativesLoader.loadLibraries()) return; String os = System.getProperty("os.name"); String arch = System.getProperty("os.arch"); if (!arch.equals("amd64") || os.contains("Mac")) { System.loadLibrary("gdx"); } else { if( arch.contains("Windows") ) ...
public static void loadLibrary () { if(GdxNativesLoader.loadLibraries()) return; String os = System.getProperty("os.name"); String arch = System.getProperty("os.arch"); if (!arch.equals("amd64") || os.contains("Mac")) { System.loadLibrary("gdx"); } else { System.loadLibrary("gdx-64"); } }...
diff --git a/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/DocumentModelComparator.java b/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/DocumentModelComparator.java index 739bc8423..11086ce03 100644 --- a/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/api/DocumentModelComparator.java +++ b/nuxeo-core-api/s...
false
true
public int compare(DocumentModel doc1, DocumentModel doc2) { int cmp = 0; if (schemaName != null) { final DataModel d1 = doc1.getDataModel(schemaName); final DataModel d2 = doc2.getDataModel(schemaName); for (Entry<String, String> e : orderBy.entrySet()) { ...
public int compare(DocumentModel doc1, DocumentModel doc2) { int cmp = 0; if (schemaName != null) { final DataModel d1 = doc1.getDataModel(schemaName); final DataModel d2 = doc2.getDataModel(schemaName); for (Entry<String, String> e : orderBy.entrySet()) { ...
diff --git a/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java b/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java index 37ddbd75..db606159 100644 --- a/components/dotnet-dao-project/src/main/java/npanday/dao/impl/ProjectDaoImpl.java +++ b/components/dotnet-...
false
true
public Set<Artifact> storeProjectAndResolveDependencies( Project project, File localRepository, List<ArtifactRepository> artifactRepositories ) throws IOException, IllegalArgumentException { long startTime = System.currentTimeMillis();...
public Set<Artifact> storeProjectAndResolveDependencies( Project project, File localRepository, List<ArtifactRepository> artifactRepositories ) throws IOException, IllegalArgumentException { long startTime = System.currentTimeMillis();...
diff --git a/hw5/list/DListNode.java b/hw5/list/DListNode.java index cc0b581..88af7c9 100644 --- a/hw5/list/DListNode.java +++ b/hw5/list/DListNode.java @@ -1,169 +1,170 @@ /* DListNode.java */ package hw5.list; /** * A DListNode is a mutable node in a DList (doubly-linked list). **/ public class DListNo...
true
true
public void remove() throws InvalidNodeException { if (!isValidNode()) { throw new InvalidNodeException("remove() called on invalid node"); }else{ DListNode before = this.prev; DListNode after = this.next; before.next = after; after.prev = before; // Your solution her...
public void remove() throws InvalidNodeException { if (!isValidNode()) { throw new InvalidNodeException("remove() called on invalid node"); }else{ DListNode before = this.prev; DListNode after = this.next; before.next = after; after.prev = before; // Your solution her...
diff --git a/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java b/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java index d6c2a20..9295773 100644 --- a/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +++ b/src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java...
true
true
private void handleBroadcastSms(AsyncResult ar) { try { byte[] receivedPdu = (byte[])ar.result; if (false) { for (int i = 0; i < receivedPdu.length; i += 8) { StringBuilder sb = new StringBuilder("SMS CB pdu data: "); for (int ...
private void handleBroadcastSms(AsyncResult ar) { try { byte[] receivedPdu = (byte[])ar.result; if (false) { for (int i = 0; i < receivedPdu.length; i += 8) { StringBuilder sb = new StringBuilder("SMS CB pdu data: "); for (int ...
diff --git a/src/hk/reality/stock/view/IndexAdapter.java b/src/hk/reality/stock/view/IndexAdapter.java index d9ea313..19c9049 100644 --- a/src/hk/reality/stock/view/IndexAdapter.java +++ b/src/hk/reality/stock/view/IndexAdapter.java @@ -1,81 +1,81 @@ package hk.reality.stock.view; import hk.reality.stock.R; import...
false
true
public View getView(int position, View view, ViewGroup parent) { View v = view; if (v == null) { LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = (View) vi.inflate(R.layout.index_item, null); } Log.d(TAG...
public View getView(int position, View view, ViewGroup parent) { View v = view; if (v == null) { LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = (View) vi.inflate(R.layout.index_item, null); } Log.d(TAG...
diff --git a/src/webapp/src/java/org/wyona/yanel/servlet/About.java b/src/webapp/src/java/org/wyona/yanel/servlet/About.java index af0749fd6..34249523a 100644 --- a/src/webapp/src/java/org/wyona/yanel/servlet/About.java +++ b/src/webapp/src/java/org/wyona/yanel/servlet/About.java @@ -1,18 +1,18 @@ package org.wyona.ya...
true
true
public static String toHTML(String version, String revision) { StringBuilder sb = new StringBuilder("<html>"); sb.append("<head><title>About Yanel</title></head>"); sb.append("<body><h1>About Yanel</h1><p>Version " + version + "-r" + revision + "</p><p>Copyright &#169; 2005 - 2009 Wyona. All...
public static String toHTML(String version, String revision) { StringBuilder sb = new StringBuilder("<html>"); sb.append("<head><title>About Yanel</title></head>"); sb.append("<body><h1>About Yanel</h1><p>Version " + version + "-r" + revision + "</p><p>Copyright &#169; 2005 - 2010 Wyona. All...
diff --git a/src/main/scala/thirdparty/misc/ThistleFilter.java b/src/main/scala/thirdparty/misc/ThistleFilter.java index 681f31b..aa44be9 100644 --- a/src/main/scala/thirdparty/misc/ThistleFilter.java +++ b/src/main/scala/thirdparty/misc/ThistleFilter.java @@ -1,59 +1,59 @@ package thirdparty.misc; import thirdpart...
true
true
public BufferedImage filter(BufferedImage bi) { if (bi.getSampleModel().getDataType() != DataBuffer.TYPE_INT) throw new UnsupportedOperationException(); BufferedImage dstImg = new BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType()); BufferedImage tmp = new BufferedImage(...
public BufferedImage filter(BufferedImage bi) { if (bi.getSampleModel().getDataType() != DataBuffer.TYPE_INT) throw new UnsupportedOperationException(); BufferedImage dstImg = new BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType()); BufferedImage tmp = new BufferedImage(...
diff --git a/src/main/java/com/github/kpacha/jkata/primeFactors/PrimeFactors.java b/src/main/java/com/github/kpacha/jkata/primeFactors/PrimeFactors.java index cebf1a5..81840b9 100644 --- a/src/main/java/com/github/kpacha/jkata/primeFactors/PrimeFactors.java +++ b/src/main/java/com/github/kpacha/jkata/primeFactors/Prime...
true
true
public static List<Integer> generate(final int number) { return new ArrayList<Integer>(); }
public static List<Integer> generate(final int number) { List<Integer> primes = new ArrayList<Integer>(); if (number > 1) { primes.add(2); } return primes; }
diff --git a/modules/extra/jetty-runner/src/main/java/org/mortbay/jetty/runner/Runner.java b/modules/extra/jetty-runner/src/main/java/org/mortbay/jetty/runner/Runner.java index 218f38619..c759d252a 100644 --- a/modules/extra/jetty-runner/src/main/java/org/mortbay/jetty/runner/Runner.java +++ b/modules/extra/jetty-runne...
true
true
public void configure(String[] args) throws Exception { // handle classpath bits first so we can initialize the log mechanism. for (int i=0;i<args.length;i++) { if ("--lib".equals(args[i])) { Resource lib = Resource.newResource(args[++i])...
public void configure(String[] args) throws Exception { // handle classpath bits first so we can initialize the log mechanism. for (int i=0;i<args.length;i++) { if ("--lib".equals(args[i])) { Resource lib = Resource.newResource(args[++i])...
diff --git a/plugins/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/presentation/aggregation/layout/RequesterFragment.java b/plugins/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/presentation/aggregation/layout/RequesterFragment.java index 807b1d5c..ca0ce55f 10...
true
true
protected String doPostService( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { String className = getClass( ).getName( ) .substring( getClass( ).getName( ).lastIndexOf( '.' ) + 1 ); return JSPRootPath + "/pages/layout/" + className + ".jsp"; //$NON-NLS-1$ ...
protected String doPostService( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { request.setAttribute( "ServletPath", request.getServletPath( ) ); //$NON-NLS-1$ String className = getClass( ).getName( ) .substring( getClass( ).getName( ).lastIndexOf( '.' ) + ...
diff --git a/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java b/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java index 33fab1312..bb4e76c09 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/Communica...
true
true
public void handleUidlRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { // repaint requested or session has timed out and new one is created boolean repaintAll = (request.getParameter(GET_PARAM_REPAINT_ALL) != null) || request.getSession().isNew(); // If repaint is r...
public void handleUidlRequest(HttpServletRequest request, HttpServletResponse response) throws IOException { // repaint requested or session has timed out and new one is created boolean repaintAll = (request.getParameter(GET_PARAM_REPAINT_ALL) != null) || request.getSession().isNew(); // If repaint is r...
diff --git a/fi/hu/cs/titokone/Compiler.java b/fi/hu/cs/titokone/Compiler.java index 13a5701..c4e07a3 100755 --- a/fi/hu/cs/titokone/Compiler.java +++ b/fi/hu/cs/titokone/Compiler.java @@ -1,997 +1,996 @@ package fi.hu.cs.titokone; import fi.hu.cs.ttk91.TTK91CompileException; import java.util.HashMap; import java...
true
true
private CompileInfo firstRoundProcess(String line) throws TTK91CompileException { String[] lineTemp = parseCompilerCommandLine(line); boolean nothingFound = true; String comment = ""; String[] commentParameters; int intValue = 0; String[] symbolTableEntry = new String[2]; boolean labelFound = false; boole...
private CompileInfo firstRoundProcess(String line) throws TTK91CompileException { String[] lineTemp = parseCompilerCommandLine(line); boolean nothingFound = true; String comment = ""; String[] commentParameters; int intValue = 0; String[] symbolTableEntry = new String[2]; boolean labelFound = false; boole...
diff --git a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifier.java index 173af61..4fd777f 100644 --- a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/EntitiesVerifie...
true
true
public void verify( String file ) throws Exception { HtmlPage page = htmlPage( file ); assertNotNull( page ); HtmlMeta author = (HtmlMeta) page.getElementsByName( "author" ).get( 0 ); assertNotNull( author ); assertTrue( author.toString().indexOf( "Ligature &...
public void verify( String file ) throws Exception { HtmlPage page = htmlPage( file ); assertNotNull( page ); HtmlMeta author = (HtmlMeta) page.getElementsByName( "author" ).get( 0 ); assertNotNull( author ); assertTrue( author.toString().indexOf( "Ligature &...
diff --git a/spring-integration-core/src/test/java/org/springframework/integration/endpoint/PollingLifecycleTests.java b/spring-integration-core/src/test/java/org/springframework/integration/endpoint/PollingLifecycleTests.java index 9345a881bc..964b870823 100644 --- a/spring-integration-core/src/test/java/org/springfra...
true
true
public void ensurePollerTaskStopsForAdapterWithInteraptible() throws Exception{ final CountDownLatch latch = new CountDownLatch(2); QueueChannel channel = new QueueChannel(); SourcePollingChannelAdapterFactoryBean adapterFactory = new SourcePollingChannelAdapterFactoryBean(); PollerMetadata pollerMetadata =...
public void ensurePollerTaskStopsForAdapterWithInterruptible() throws Exception{ final CountDownLatch latch = new CountDownLatch(2); QueueChannel channel = new QueueChannel(); SourcePollingChannelAdapterFactoryBean adapterFactory = new SourcePollingChannelAdapterFactoryBean(); PollerMetadata pollerMetadata ...
diff --git a/52n-wps-io-impl/src/main/java/org/n52/wps/io/datahandler/parser/GTBinZippedWKT64Parser.java b/52n-wps-io-impl/src/main/java/org/n52/wps/io/datahandler/parser/GTBinZippedWKT64Parser.java index e678c96e..f00d06ba 100644 --- a/52n-wps-io-impl/src/main/java/org/n52/wps/io/datahandler/parser/GTBinZippedWKT64Par...
false
true
public GTVectorDataBinding parse(InputStream stream, String mimeType, String schema) { try { String fileName = "tempfile" + UUID.randomUUID() + ".zip"; String tmpDirPath = System.getProperty("java.io.tmpdir"); File tempFile = new File(tmpDirPath + File.separatorChar + fileName); finalizeFiles.add(tem...
public GTVectorDataBinding parse(InputStream stream, String mimeType, String schema) { try { String fileName = "tempfile" + UUID.randomUUID() + ".zip"; String tmpDirPath = System.getProperty("java.io.tmpdir"); File tempFile = new File(tmpDirPath + File.separatorChar + fileName); finalizeFiles.add(tem...
diff --git a/apps/seqos-test/src/test/java/org/seerc/seqos/dao/DummyObservationDAOImplTest.java b/apps/seqos-test/src/test/java/org/seerc/seqos/dao/DummyObservationDAOImplTest.java index 9d2b445..6e445cb 100644 --- a/apps/seqos-test/src/test/java/org/seerc/seqos/dao/DummyObservationDAOImplTest.java +++ b/apps/seqos-tes...
true
true
public void testCreateObservations() { ObservationDAO dao = new DummyObservationDAOImpl(); ListObservationTO status = dao.getObservations(); Assert.assertEquals(10, status.getObservations().size()); }
public void testCreateObservations() { ObservationDAO dao = new DummyObservationDAOImpl(); ListObservationTO status = dao.getObservations(); Assert.assertEquals(2, status.getObservations().size()); }
diff --git a/src/org/iplant/pipeline/client/dnd/DragCreator.java b/src/org/iplant/pipeline/client/dnd/DragCreator.java index 7847b82..8606977 100644 --- a/src/org/iplant/pipeline/client/dnd/DragCreator.java +++ b/src/org/iplant/pipeline/client/dnd/DragCreator.java @@ -1,216 +1,216 @@ /* * Copyright 2012 Oregon State U...
false
true
public static native void addDrag(Element element, IPCType rec, DragListener listener) /*-{ function handleDragStart(e) { var dragIcon = listener.@org.iplant.pipeline.client.dnd.DragListener::getDragImage(Lorg/iplant/pipeline/client/json/IPCType;)(rec); e.dataTransfer.setDragImage(dragIcon, -10, -10); e.dat...
public static native void addDrag(Element element, IPCType rec, DragListener listener) /*-{ function handleDragStart(e) { var dragIcon = listener.@org.iplant.pipeline.client.dnd.DragListener::getDragImage(Lorg/iplant/pipeline/client/json/IPCType;)(rec); e.dataTransfer.setDragImage(dragIcon, -10, -10); e.dat...
diff --git a/src/de/hotmail/gurkilein/bankcraft/MinecraftCommandListener.java b/src/de/hotmail/gurkilein/bankcraft/MinecraftCommandListener.java index d3d1aa0..c1521a3 100644 --- a/src/de/hotmail/gurkilein/bankcraft/MinecraftCommandListener.java +++ b/src/de/hotmail/gurkilein/bankcraft/MinecraftCommandListener.java @@ ...
true
true
public boolean onCommand(CommandSender sender, Command command, String cmdlabel, String[] vars) { Player p; if (sender instanceof Player) { p = (Player) sender; if (cmdlabel.equalsIgnoreCase("bank") || cmdlabel.equalsIgnoreCase("bc")) { if (vars.length == 0) { sendHelp(p); return true; } ...
public boolean onCommand(CommandSender sender, Command command, String cmdlabel, String[] vars) { Player p; if (sender instanceof Player) { p = (Player) sender; if (cmdlabel.equalsIgnoreCase("bank") || cmdlabel.equalsIgnoreCase("bc")) { if (vars.length == 0) { sendHelp(p); return true; } ...
diff --git a/AccessProvider/src/org/nchelp/meteor/provider/access/IndexProviderService.java b/AccessProvider/src/org/nchelp/meteor/provider/access/IndexProviderService.java index 9672113b..2046281b 100755 --- a/AccessProvider/src/org/nchelp/meteor/provider/access/IndexProviderService.java +++ b/AccessProvider/src/org/n...
true
true
private DataProviderList aggregateList (ResponseData responseData, IndexProvider currentIndexProvider, DataProviderList dataProviders, List newDataProviders, MeteorParameters params) { // easiest way to do this is to cast this to a Set and add them then turn it // back int...
private DataProviderList aggregateList (ResponseData responseData, IndexProvider currentIndexProvider, DataProviderList dataProviders, List newDataProviders, MeteorParameters params) { // easiest way to do this is to cast this to a Set and add them then turn it // back int...
diff --git a/galaxyCar/src/org/psywerx/car/view/StevecView.java b/galaxyCar/src/org/psywerx/car/view/StevecView.java index 59f4665..bab871b 100644 --- a/galaxyCar/src/org/psywerx/car/view/StevecView.java +++ b/galaxyCar/src/org/psywerx/car/view/StevecView.java @@ -1,73 +1,73 @@ package org.psywerx.car.view; import ...
true
true
public boolean setSpeed(float speed) { long ct = System.nanoTime(); mDistance += speed*(mTimestamp-ct)/1e9; mTimestamp = ct; mSpeed = (1.0f-mAlpha)*mSpeed + mAlpha * speed; float temp = -30+2.3f*mSpeed; if (temp < MIN_ROTATE || temp > MAX_ROTATE) return false; this.mRotate = temp; this.postInvali...
public boolean setSpeed(float speed) { long ct = System.nanoTime(); mDistance += speed*(ct-mTimestamp)/1e10; mTimestamp = ct; mSpeed = (1.0f-mAlpha)*mSpeed + mAlpha * speed; float temp = -30+2.3f*mSpeed; if (temp < MIN_ROTATE || temp > MAX_ROTATE) return false; this.mRotate = temp; this.postInval...
diff --git a/src/haven/GLState.java b/src/haven/GLState.java index ec157556..d6409ad6 100644 --- a/src/haven/GLState.java +++ b/src/haven/GLState.java @@ -1,742 +1,742 @@ /* * This file is part of the Haven & Hearth game client. * Copyright (C) 2009 Fredrik Tolf <fredrik@dolda2000.com>, and * ...
false
true
public void apply(GOut g) { long st = 0; if(Config.profile) st = System.nanoTime(); Slot<?>[] deplist = GLState.deplist; if(trans.length < slotnum) { synchronized(Slot.class) { trans = new boolean[slotnum]; repl = new boolean[slotnum]; shaders = Utils.extend(shaders, slotnum); ...
public void apply(GOut g) { long st = 0; if(Config.profile) st = System.nanoTime(); if(trans.length < slotnum) { synchronized(Slot.class) { trans = new boolean[slotnum]; repl = new boolean[slotnum]; shaders = Utils.extend(shaders, slotnum); } } bufdiff(cur, next, trans, r...
diff --git a/src/org/thoughtcrime/securesms/mms/AudioSlide.java b/src/org/thoughtcrime/securesms/mms/AudioSlide.java index ee27e9e95..f0df498fa 100644 --- a/src/org/thoughtcrime/securesms/mms/AudioSlide.java +++ b/src/org/thoughtcrime/securesms/mms/AudioSlide.java @@ -1,84 +1,85 @@ /** * Copyright (C) 2011 Whisper ...
false
true
public static PduPart constructPartFromUri(Context context, Uri uri) throws IOException, MediaTooLargeException { PduPart part = new PduPart(); if (getMediaSize(context, uri) > MAX_MESSAGE_SIZE) throw new MediaTooLargeException("Audio track larger than size maximum."); Cursor cursor = null; ...
public static PduPart constructPartFromUri(Context context, Uri uri) throws IOException, MediaTooLargeException { PduPart part = new PduPart(); if (getMediaSize(context, uri) > MAX_MESSAGE_SIZE) throw new MediaTooLargeException("Audio track larger than size maximum."); Cursor cursor = null; ...
diff --git a/org.emftext.sdk/src/org/emftext/sdk/codegen/generators/ANTLRGrammarGenerator.java b/org.emftext.sdk/src/org/emftext/sdk/codegen/generators/ANTLRGrammarGenerator.java index 52f33f43d..340258d54 100644 --- a/org.emftext.sdk/src/org/emftext/sdk/codegen/generators/ANTLRGrammarGenerator.java +++ b/org.emftext.s...
false
true
public boolean generate(PrintWriter pw){ initOptions(); initCaches(); String csName = getResourceClassName(); String lexerName = getLexerName(csName); boolean backtracking = OptionManager.INSTANCE.getBooleanOptionValue(conrceteSyntax, OptionTypes.ANTLR_BACKTRACKING); boolean memo...
public boolean generate(PrintWriter pw){ initOptions(); initCaches(); String csName = getResourceClassName(); String lexerName = getLexerName(csName); boolean backtracking = OptionManager.INSTANCE.getBooleanOptionValue(conrceteSyntax, OptionTypes.ANTLR_BACKTRACKING); boolean memo...
diff --git a/src/main/java/com/voxbone/kelpie/CallSession.java b/src/main/java/com/voxbone/kelpie/CallSession.java index 2c8b3c3..9610352 100755 --- a/src/main/java/com/voxbone/kelpie/CallSession.java +++ b/src/main/java/com/voxbone/kelpie/CallSession.java @@ -1,589 +1,589 @@ /** * Copyright 2012 Voxbone SA/NV ...
true
true
public void parseSDP(String sdp, boolean offer) { SdpFactory sdpFactory = SdpFactory.getInstance(); try { SessionDescription sd = sdpFactory.createSessionDescription(sdp); @SuppressWarnings("unchecked") Vector<MediaDescription> mdesc = (Vector<MediaDescription>) sd.getMediaDescriptions(false); f...
public void parseSDP(String sdp, boolean offer) { SdpFactory sdpFactory = SdpFactory.getInstance(); try { SessionDescription sd = sdpFactory.createSessionDescription(sdp); @SuppressWarnings("unchecked") Vector<MediaDescription> mdesc = (Vector<MediaDescription>) sd.getMediaDescriptions(false); f...
diff --git a/src/com/scholastic/sbam/server/database/util/SqlExecution.java b/src/com/scholastic/sbam/server/database/util/SqlExecution.java index b78a408..0610405 100644 --- a/src/com/scholastic/sbam/server/database/util/SqlExecution.java +++ b/src/com/scholastic/sbam/server/database/util/SqlExecution.java @@ -1,101 +...
true
true
public ResultSet executeStatement(String sql) throws SQLException { // Close any previous result set and statement closeResult(); // Create the connection, if not already present if (conn == null) conn = HibernateUtil.getConnection(); // Create the new statement Statement sqlStmt = conn.createSt...
public ResultSet executeStatement(String sql) throws SQLException { // Close any previous result set and statement closeResult(); // Create the connection, if not already present if (conn == null) conn = HibernateUtil.getConnection(); // Create the new statement sqlStmt = conn.createStatement();...
diff --git a/illadownload/src/illarion/download/util/Lang.java b/illadownload/src/illarion/download/util/Lang.java index 6b5e1ef9..ec0305ed 100644 --- a/illadownload/src/illarion/download/util/Lang.java +++ b/illadownload/src/illarion/download/util/Lang.java @@ -1,153 +1,153 @@ /* * This file is part of the Illarion...
true
true
private Lang() { locale = Locale.getDefault(); if (locale.getLanguage() == Locale.GERMAN.getLanguage()) { locale = Locale.GERMAN; } else { locale = Locale.ENGLISH; } messages = ResourceBundle.getBundle(MESSAGE_BUNDLE, locale, Lang.class.getClassLoader...
private Lang() { locale = Locale.getDefault(); if (locale.getLanguage().equals(Locale.GERMAN.getLanguage())) { locale = Locale.GERMAN; } else { locale = Locale.ENGLISH; } messages = ResourceBundle.getBundle(MESSAGE_BUNDLE, locale, Lang.class.getClassL...
diff --git a/sample_bots/DispersionBot/src/MyBot.java b/sample_bots/DispersionBot/src/MyBot.java index c9a9b8b..396b060 100644 --- a/sample_bots/DispersionBot/src/MyBot.java +++ b/sample_bots/DispersionBot/src/MyBot.java @@ -1,79 +1,80 @@ import java.io.IOException; import java.util.Collections; import java.util.Com...
true
true
public void doTurn() { Game game = getGame(); // Count my production int production = 0; for (EconomicPlanet p : game.getMyEconomicPlanets()) { production += p.revenue; } /* Sort targets by weakness */ List<Planet> targets = game.getNotMyPlanets(); Collections.sort(targets, new Comparator<Planet>(...
public void doTurn() { Game game = getGame(); // Count my production int production = 0; for (EconomicPlanet p : game.getMyEconomicPlanets()) { production += p.revenue; } /* Sort targets by weakness */ List<Planet> targets = game.getNotMyPlanets(); Collections.sort(targets, new Comparator<Planet>(...
diff --git a/src/org/pixmob/hcl/HttpRequestBuilder.java b/src/org/pixmob/hcl/HttpRequestBuilder.java index eb8317c..1507cc7 100644 --- a/src/org/pixmob/hcl/HttpRequestBuilder.java +++ b/src/org/pixmob/hcl/HttpRequestBuilder.java @@ -1,485 +1,485 @@ /* * Copyright (C) 2012 Pixmob (http://github.com/pixmob) * * Li...
false
true
public void execute() throws HttpClientException { HttpURLConnection conn = null; UncloseableInputStream payloadStream = null; try { if (parameters != null && !parameters.isEmpty()) { final StringBuilder buf = new StringBuilder(256); if (!HTTP_POST...
public void execute() throws HttpClientException { HttpURLConnection conn = null; UncloseableInputStream payloadStream = null; try { if (parameters != null && !parameters.isEmpty()) { final StringBuilder buf = new StringBuilder(256); if (!HTTP_POST...
diff --git a/sikuli-script/src/main/java/org/sikuli/script/TextRecognizer.java b/sikuli-script/src/main/java/org/sikuli/script/TextRecognizer.java index 74980b29..edc35a4b 100644 --- a/sikuli-script/src/main/java/org/sikuli/script/TextRecognizer.java +++ b/sikuli-script/src/main/java/org/sikuli/script/TextRecognizer.ja...
true
true
public void init(){ Debug.info("Text Recgonizer inited."); try{ String path = ResourceExtractor.extract("tessdata"); // TESSDATA_PREFIX doesn't contain tessdata/ if(path.endsWith("tessdata/")) path = path.substring(0,path.length()-9); Settings.OcrDataPath =...
public void init(){ Debug.info("Text Recognizer inited."); try{ String path = ResourceExtractor.extract("tessdata"); // TESSDATA_PREFIX doesn't contain tessdata/ if(path.endsWith("tessdata/")) path = path.substring(0,path.length()-9); Settings.OcrDataPath =...
diff --git a/src/app/server/udpservlet/ElectionReceiveServlet.java b/src/app/server/udpservlet/ElectionReceiveServlet.java index 6fed76f..631705f 100644 --- a/src/app/server/udpservlet/ElectionReceiveServlet.java +++ b/src/app/server/udpservlet/ElectionReceiveServlet.java @@ -1,72 +1,75 @@ package app.server.udpservle...
true
true
public void run() { while (true) { int timeout = 10000; Object packet; try { // getOwner().setElectionState(ElectionState.WAIT_FOR_REPLY); //TODO: to remove, for testing only packet = receiveWithTimeout(timeout); LiteLogger.log("ELECTION PACKET RECEIVED!! PACKET = ", packet); ...
public void run() { while (true) { int timeout = 10000; Object packet; try { // getOwner().setElectionState(ElectionState.WAIT_FOR_REPLY); //TODO: to remove, for testing only packet = receiveWithTimeout(timeout); LiteLogger.log("ELECTION PACKET RECEIVED!! PACKET = ", packet); ...
diff --git a/src/main/java/org/apache/commons/digester3/xmlrules/XmlRulesModule.java b/src/main/java/org/apache/commons/digester3/xmlrules/XmlRulesModule.java index 386bf853..8dbe0fc3 100644 --- a/src/main/java/org/apache/commons/digester3/xmlrules/XmlRulesModule.java +++ b/src/main/java/org/apache/commons/digester3/xm...
false
true
public void configure( RulesBinder rulesBinder ) { if ( rulesBinder instanceof WithMemoryRulesBinder ) { memoryRulesBinder = (WithMemoryRulesBinder) rulesBinder; } else { memoryRulesBinder = new WithMemoryRulesBinder( rulesBinder ); if ...
public void configure( RulesBinder rulesBinder ) { if ( rulesBinder instanceof WithMemoryRulesBinder ) { memoryRulesBinder = (WithMemoryRulesBinder) rulesBinder; } else { memoryRulesBinder = new WithMemoryRulesBinder( rulesBinder ); if ...
diff --git a/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java b/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java index 4d07328c7d..30d5bacfbc 100644 --- a/lucene/core/src/java/org/apache/lucene/search/payloads/PayloadTermQuery.java +++ b/lucene/core/src/java/org/a...
true
true
public Explanation explain(AtomicReaderContext context, int doc) throws IOException { PayloadTermSpanScorer scorer = (PayloadTermSpanScorer) scorer(context, true, false, context.reader().getLiveDocs()); if (scorer != null) { int newDoc = scorer.advance(doc); if (newDoc == doc) { ...
public Explanation explain(AtomicReaderContext context, int doc) throws IOException { PayloadTermSpanScorer scorer = (PayloadTermSpanScorer) scorer(context, true, false, context.reader().getLiveDocs()); if (scorer != null) { int newDoc = scorer.advance(doc); if (newDoc == doc) { ...
diff --git a/src/callgraphanalyzer/Comparator.java b/src/callgraphanalyzer/Comparator.java index 5cfb422..de35f2d 100644 --- a/src/callgraphanalyzer/Comparator.java +++ b/src/callgraphanalyzer/Comparator.java @@ -1,386 +1,386 @@ package callgraphanalyzer; import java.util.ArrayList; import java.util.HashMap; impo...
true
true
public void getModifiedMethodsForFile(String fileName, List<diffObjectResult> deleteDiffs, List<diffObjectResult> insertDiffs) { Set<MethodPercentage> newMethods = new HashSet<MethodPercentage>(); Set<MethodPercentage> oldMethods = new HashSet<MethodPercentage>(); // methods from old file version+ for ...
public void getModifiedMethodsForFile(String fileName, List<diffObjectResult> deleteDiffs, List<diffObjectResult> insertDiffs) { Set<MethodPercentage> newMethods = new HashSet<MethodPercentage>(); Set<MethodPercentage> oldMethods = new HashSet<MethodPercentage>(); // methods from old file version+ for ...
diff --git a/fog/src/de/tuilmenau/ics/fog/transfer/manager/ProcessList.java b/fog/src/de/tuilmenau/ics/fog/transfer/manager/ProcessList.java index fd8d90c2..e295121b 100644 --- a/fog/src/de/tuilmenau/ics/fog/transfer/manager/ProcessList.java +++ b/fog/src/de/tuilmenau/ics/fog/transfer/manager/ProcessList.java @@ -1,94 ...
false
true
public Process getProcess(Identity owner, int processID) { for(Process process : mProcesses) { if(process.getID() == processID) { // do we filter for owners? if(owner != null) { // check if the entities are the same if(process.isChangableBy(owner)) { return process; } } else { ...
public Process getProcess(Identity owner, int processID) { if(mProcesses != null){ for(Process process : mProcesses) { if(process.getID() == processID) { // do we filter for owners? if(owner != null) { // check if the entities are the same if(process.isChangableBy(owner)) { retur...
diff --git a/main/src/cgeo/geocaching/VisitCacheActivity.java b/main/src/cgeo/geocaching/VisitCacheActivity.java index c93eb1fa5..43caa58c4 100644 --- a/main/src/cgeo/geocaching/VisitCacheActivity.java +++ b/main/src/cgeo/geocaching/VisitCacheActivity.java @@ -1,752 +1,752 @@ package cgeo.geocaching; import cgeo.ge...
true
true
public void handleMessage(Message msg) { if (!types.contains(typeSelected)) { typeSelected = types.get(0); setType(typeSelected); showToast(res.getString(R.string.info_log_type_changed)); } if (cgBase.isEmpty(viewstates) && at...
public void handleMessage(Message msg) { if (!types.contains(typeSelected)) { typeSelected = types.get(0); setType(typeSelected); showToast(res.getString(R.string.info_log_type_changed)); } if (cgBase.isEmpty(viewstates) && at...
diff --git a/src/org/mcteam/factions/commands/FCommandTag.java b/src/org/mcteam/factions/commands/FCommandTag.java index 3cc3938f..2c1b69df 100644 --- a/src/org/mcteam/factions/commands/FCommandTag.java +++ b/src/org/mcteam/factions/commands/FCommandTag.java @@ -1,65 +1,65 @@ package org.mcteam.factions.commands; i...
true
true
public void perform() { if ( ! assertHasFaction()) { return; } if( isLocked() ) { sendLockMessage(); return; } if ( ! assertMinRole(Role.MODERATOR)) { return; } String tag = parameters.get(0); // TODO does not first test cover selfcase? if (Faction.isTagTaken(tag) && ! TextUti...
public void perform() { if ( ! assertHasFaction()) { return; } if( isLocked() ) { sendLockMessage(); return; } if ( ! assertMinRole(Role.MODERATOR)) { return; } String tag = parameters.get(0); // TODO does not first test cover selfcase? if (Faction.isTagTaken(tag) && ! TextUti...
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java b/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java index fb9cccf19..355b33032 100644 --- a/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java +++ b/org.eclipse.help.base/src/org/eclipse...
false
true
private void displayHelpURL(String helpURL, boolean forceExternal) { if (!BaseHelpSystem.ensureWebappRunning()) { return; } if (BaseHelpSystem.getMode() == BaseHelpSystem.MODE_STANDALONE) { // wait for Display to be created DisplayUtils.waitForDisplay(); } try { /* if (helpURL == null || help...
private void displayHelpURL(String helpURL, boolean forceExternal) { if (!BaseHelpSystem.ensureWebappRunning()) { return; } if (BaseHelpSystem.getMode() == BaseHelpSystem.MODE_STANDALONE) { // wait for Display to be created DisplayUtils.waitForDisplay(); } try { /* if (helpURL == null || help...
diff --git a/grails/src/commons/org/codehaus/groovy/grails/commons/spring/SpringConfig.java b/grails/src/commons/org/codehaus/groovy/grails/commons/spring/SpringConfig.java index e6e5fdcb2..8c8f6b945 100644 --- a/grails/src/commons/org/codehaus/groovy/grails/commons/spring/SpringConfig.java +++ b/grails/src/commons/org...
true
true
private void populateControllerReferences(Collection beanReferences, Map urlMappings) { Bean simpleGrailsController = SpringConfigUtils.createSingletonBean(SimpleGrailsController.class); simpleGrailsController.setAutowire("byType"); beanReferences.add(SpringConfigUtils.createBeanReference(SimpleGrailsController...
private void populateControllerReferences(Collection beanReferences, Map urlMappings) { Bean simpleGrailsController = SpringConfigUtils.createSingletonBean(SimpleGrailsController.class); simpleGrailsController.setAutowire("byType"); beanReferences.add(SpringConfigUtils.createBeanReference(SimpleGrailsController...
diff --git a/src/com/android/deskclock/DeskClock.java b/src/com/android/deskclock/DeskClock.java index f8b7129..e7060b5 100644 --- a/src/com/android/deskclock/DeskClock.java +++ b/src/com/android/deskclock/DeskClock.java @@ -1,733 +1,739 @@ /* * Copyright (C) 2009 The Android Open Source Project * * Licensed und...
false
true
private void initViews() { // give up any internal focus before we switch layouts final View focused = getCurrentFocus(); if (focused != null) focused.clearFocus(); setContentView(R.layout.desk_clock); mTime = (DigitalClock) findViewById(R.id.time); mDate = (TextVie...
private void initViews() { // give up any internal focus before we switch layouts final View focused = getCurrentFocus(); if (focused != null) focused.clearFocus(); setContentView(R.layout.desk_clock); mTime = (DigitalClock) findViewById(R.id.time); mDate = (TextVie...
diff --git a/src/com/arcao/geocaching4locus/ImportFromGCActivity.java b/src/com/arcao/geocaching4locus/ImportFromGCActivity.java index 0d6f5b47..0eef2a5b 100644 --- a/src/com/arcao/geocaching4locus/ImportFromGCActivity.java +++ b/src/com/arcao/geocaching4locus/ImportFromGCActivity.java @@ -1,154 +1,153 @@ package com....
true
true
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!LocusTesting.isLocusInstalled(this)) { LocusTesting.showLocusMissingError(this); return; } // if import task is running, show the import task progress dialog ImportDialogFragment fragment = (ImportDialogFrag...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (!LocusTesting.isLocusInstalled(this)) { LocusTesting.showLocusMissingError(this); return; } // if import task is running, show the import task progress dialog if (getSupportFragmentManager().findFragmentByTag...
diff --git a/src/uk/org/ponder/rsf/renderer/html/BasicHTMLRenderSystem.java b/src/uk/org/ponder/rsf/renderer/html/BasicHTMLRenderSystem.java index 1c388b1..e438d60 100644 --- a/src/uk/org/ponder/rsf/renderer/html/BasicHTMLRenderSystem.java +++ b/src/uk/org/ponder/rsf/renderer/html/BasicHTMLRenderSystem.java @@ -1,439 +...
true
true
public int renderComponent(UIComponent torendero, View view, XMLLump[] lumps, int lumpindex, PrintOutputStream pos) { XMLWriter xmlw = new XMLWriter(pos); XMLLump lump = lumps[lumpindex]; int nextpos = -1; XMLLump outerendopen = lump.open_end; XMLLump outerclose = lump.close_tag; nextpo...
public int renderComponent(UIComponent torendero, View view, XMLLump[] lumps, int lumpindex, PrintOutputStream pos) { XMLWriter xmlw = new XMLWriter(pos); XMLLump lump = lumps[lumpindex]; int nextpos = -1; XMLLump outerendopen = lump.open_end; XMLLump outerclose = lump.close_tag; nextpo...
diff --git a/src/java/com/stackframe/sarariman/Sarariman.java b/src/java/com/stackframe/sarariman/Sarariman.java index 58e21ce..b5083e7 100644 --- a/src/java/com/stackframe/sarariman/Sarariman.java +++ b/src/java/com/stackframe/sarariman/Sarariman.java @@ -1,177 +1,178 @@ /* * Copyright (C) 2009-2010 StackFrame, LLC...
false
true
public void contextInitialized(ServletContextEvent sce) { try { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:comp/env"); Properties directoryProperties = lookupDirectoryProperties(envContext); directory = n...
public void contextInitialized(ServletContextEvent sce) { try { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:comp/env"); Properties directoryProperties = lookupDirectoryProperties(envContext); directory = n...
diff --git a/src/main/java/net/rubygrapefruit/platform/internal/NativeLibraryLocator.java b/src/main/java/net/rubygrapefruit/platform/internal/NativeLibraryLocator.java index c7dbd66..075ba39 100755 --- a/src/main/java/net/rubygrapefruit/platform/internal/NativeLibraryLocator.java +++ b/src/main/java/net/rubygrapefruit...
true
true
public File find(LibraryDef libraryDef) throws IOException { String resourceName = String.format("net/rubygrapefruit/platform/%s/%s", libraryDef.platform, libraryDef.name); if (extractDir != null) { File libFile = new File(extractDir, String.format("%s/%s", NativeLibraryFunctions.VERSION...
public File find(LibraryDef libraryDef) throws IOException { String resourceName = String.format("net/rubygrapefruit/platform/%s/%s", libraryDef.platform, libraryDef.name); if (extractDir != null) { File libFile = new File(extractDir, String.format("%s/%s", NativeLibraryFunctions.VERSION...
diff --git a/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/RemoveJSFNatureContribution.java b/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/RemoveJSFNatureContribution.java index 9d18828d8..eaf47cf7e 100644 --- a/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/m...
false
true
public int execute() { if(model == null) return 1; XModelObject webxml = WebAppHelper.getWebApp(model); XModelObject servlet = WebAppHelper.findServlet(webxml, JSFConstants.FACES_SERVLET_CLASS, "Faces Config"); //$NON-NLS-1$ String servletName = servlet == null ? null : servlet.getAttributeValue("servlet-n...
public int execute() { if(model == null) return 1; XModelObject webxml = WebAppHelper.getWebApp(model); if(webxml != null) { XModelObject servlet = WebAppHelper.findServlet(webxml, JSFConstants.FACES_SERVLET_CLASS, "Faces Config"); //$NON-NLS-1$ String servletName = servlet == null ? null : servlet.ge...
diff --git a/src/main/java/com/jin/tpdb/persistence/DAO.java b/src/main/java/com/jin/tpdb/persistence/DAO.java index d38998d..acc07fa 100755 --- a/src/main/java/com/jin/tpdb/persistence/DAO.java +++ b/src/main/java/com/jin/tpdb/persistence/DAO.java @@ -1,116 +1,116 @@ package com.jin.tpdb.persistence; import java.u...
true
true
public Long getAlbumTotalComments(int id) { /*$albums_query = "SELECT users.username, albums.album_id, albums.uploader_user_id, albums.album_name, albums.upload_date, albums.cover, albums.description, artists.artist_name, (SELECT COUNT( comment_id ) FROM comments WHERE comments.album_id = albums.albu...
public Long getAlbumTotalComments(int id) { /*$albums_query = "SELECT users.username, albums.album_id, albums.uploader_user_id, albums.album_name, albums.upload_date, albums.cover, albums.description, artists.artist_name, (SELECT COUNT( comment_id ) FROM comments WHERE comments.album_id = albums.albu...
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/SynchronizeSelectedAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasklist/ui/SynchronizeSelectedAction.java index f03c28051..2d67ac81f 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/taskl...
true
true
public void run(IAction action) { if (query != null) { AbstractRepositoryConnector connector = MylarTaskListPlugin.getRepositoryManager().getRepositoryConnector( query.getRepositoryKind()); if (connector != null) connector.synchronize(query, new JobChangeAdapter() { public void done(IJobChangeEve...
public void run(IAction action) { if (query != null) { AbstractRepositoryConnector connector = MylarTaskListPlugin.getRepositoryManager().getRepositoryConnector( query.getRepositoryKind()); if (connector != null) connector.synchronize(query, new JobChangeAdapter() { public void done(IJobChangeEve...
diff --git a/src/com/android/dialer/list/SmartDialSearchFragment.java b/src/com/android/dialer/list/SmartDialSearchFragment.java index e3882ca50..a163f5db7 100644 --- a/src/com/android/dialer/list/SmartDialSearchFragment.java +++ b/src/com/android/dialer/list/SmartDialSearchFragment.java @@ -1,72 +1,70 @@ /* * Copyr...
false
true
public Loader<Cursor> onCreateLoader(int id, Bundle args) { // Smart dialing does not support Directory Load, falls back to normal search instead. if (id == getDirectoryLoaderId()) { Log.v(TAG, "Directory load"); return super.onCreateLoader(id, args); } else { ...
public Loader<Cursor> onCreateLoader(int id, Bundle args) { // Smart dialing does not support Directory Load, falls back to normal search instead. if (id == getDirectoryLoaderId()) { return super.onCreateLoader(id, args); } else { final SmartDialNumberListAdapter adap...
diff --git a/filters/xml/src/test/java/net/sf/okapi/filters/xml/XMLFilterTest.java b/filters/xml/src/test/java/net/sf/okapi/filters/xml/XMLFilterTest.java index b4352fdf6..0e70b33b0 100644 --- a/filters/xml/src/test/java/net/sf/okapi/filters/xml/XMLFilterTest.java +++ b/filters/xml/src/test/java/net/sf/okapi/filters/xm...
true
true
public void testDoubleExtraction () throws URISyntaxException { // Read all files in the data directory ArrayList<InputDocument> list = new ArrayList<InputDocument>(); list.add(new InputDocument(root+"test01.xml", null)); list.add(new InputDocument(root+"test02.xml", null)); list.add(new InputDocument(root+"...
public void testDoubleExtraction () throws URISyntaxException { // Read all files in the data directory ArrayList<InputDocument> list = new ArrayList<InputDocument>(); list.add(new InputDocument(root+"test01.xml", null)); list.add(new InputDocument(root+"test02.xml", null)); list.add(new InputDocument(root+"...
diff --git a/corelib-solr/src/main/java/eu/europeana/corelib/solr/server/importer/util/AggregationFieldInput.java b/corelib-solr/src/main/java/eu/europeana/corelib/solr/server/importer/util/AggregationFieldInput.java index 878a2d07..75f1395c 100644 --- a/corelib-solr/src/main/java/eu/europeana/corelib/solr/server/impor...
true
true
public static AggregationImpl createAggregationMongoFields( eu.europeana.corelib.definitions.jibx.Aggregation aggregation, MongoDBServer mongoServer) throws InstantiationException, IllegalAccessException { AggregationImpl mongoAggregation = new AggregationImpl(); mongoAggregation.setAbout(aggregation.getA...
public static AggregationImpl createAggregationMongoFields( eu.europeana.corelib.definitions.jibx.Aggregation aggregation, MongoDBServer mongoServer) throws InstantiationException, IllegalAccessException { AggregationImpl mongoAggregation = new AggregationImpl(); mongoAggregation.setAbout(aggregation.getA...
diff --git a/pmd-eclipse-runtime/src/net/sourceforge/pmd/runtime/writer/impl/RuleSetWriterImpl.java b/pmd-eclipse-runtime/src/net/sourceforge/pmd/runtime/writer/impl/RuleSetWriterImpl.java index 49a59ec96..f89234375 100644 --- a/pmd-eclipse-runtime/src/net/sourceforge/pmd/runtime/writer/impl/RuleSetWriterImpl.java +++ ...
true
true
private Element getRuleElement(Document doc, Rule rule) { final Element ruleElement = doc.createElement("rule"); ruleElement.setAttribute("name", rule.getName()); ruleElement.setAttribute("message", rule.getMessage()); final String className = rule.getClass().getName(); // ...
private Element getRuleElement(Document doc, Rule rule) { final Element ruleElement = doc.createElement("rule"); ruleElement.setAttribute("name", rule.getName()); ruleElement.setAttribute("message", rule.getMessage()); final String className = rule.getClass().getName(); // ...