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/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ChangePermissions.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ChangePermissions.java index 63af95a13..73e617595 100644 --- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/ChangePermissions.jav...
true
true
public void visit(State state, Properties props) throws Exception { Connector conn = state.getConnector(); Random rand = (Random) state.get("rand"); @SuppressWarnings("unchecked") List<String> userNames = (List<String>) state.get("users"); String userName = userNames.get(rand.nextInt(use...
public void visit(State state, Properties props) throws Exception { Connector conn = state.getConnector(); Random rand = (Random) state.get("rand"); @SuppressWarnings("unchecked") List<String> userNames = (List<String>) state.get("users"); String userName = userNames.get(rand.nextInt(use...
diff --git a/org.openntf.domino/src/org/openntf/domino/impl/Base.java b/org.openntf.domino/src/org/openntf/domino/impl/Base.java index 584bc2c56..370828845 100644 --- a/org.openntf.domino/src/org/openntf/domino/impl/Base.java +++ b/org.openntf.domino/src/org/openntf/domino/impl/Base.java @@ -1,605 +1,605 @@ /* * Cop...
false
true
protected static Object toDominoFriendly(final Object value, final Base<?, ?> context) throws IllegalArgumentException { // First, go over the normal data types if (value instanceof lotus.domino.DateTime) { return toLotus((lotus.domino.DateTime) value); } else if (value instanceof lotus.domino.DateRange) { ...
protected static Object toDominoFriendly(final Object value, final Base<?, ?> context) throws IllegalArgumentException { // First, go over the normal data types if (value instanceof lotus.domino.DateTime) { return toLotus((lotus.domino.DateTime) value); } else if (value instanceof lotus.domino.DateRange) { ...
diff --git a/src/com/android/camera/ListPreference.java b/src/com/android/camera/ListPreference.java index 9ea2e34ec..d1d34911b 100644 --- a/src/com/android/camera/ListPreference.java +++ b/src/com/android/camera/ListPreference.java @@ -1,198 +1,198 @@ /* * Copyright (C) 2009 The Android Open Source Project * * ...
true
true
public ListPreference(Context context, AttributeSet attrs) { super(context, attrs); TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.ListPreference, 0, 0); mKey = Util.checkNotNull( a.getString(R.styleable.ListPreference_key)); // W...
public ListPreference(Context context, AttributeSet attrs) { super(context, attrs); TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.ListPreference, 0, 0); mKey = Util.checkNotNull( a.getString(R.styleable.ListPreference_key)); // W...
diff --git a/iddb-db-runtime/src/main/java/iddb/runtime/db/model/dao/impl/mysql/ServerDAOImpl.java b/iddb-db-runtime/src/main/java/iddb/runtime/db/model/dao/impl/mysql/ServerDAOImpl.java index 6943403..ef3c781 100644 --- a/iddb-db-runtime/src/main/java/iddb/runtime/db/model/dao/impl/mysql/ServerDAOImpl.java +++ b/iddb-...
true
true
public void save(Server server) throws DAOException { String sql; if (server.getKey() == null) { sql = "insert into server (uid," + "name, " + "admin, " + "created, " + "updated, " + "onlineplayers, " + "address, " + "pluginversion, " + "maxlevel, " + "isdirty, " + ...
public void save(Server server) throws DAOException { String sql; if (server.getKey() == null) { sql = "insert into server (uid," + "name, " + "admin, " + "created, " + "updated, " + "onlineplayers, " + "address, " + "pluginversion, " + "maxlevel, " + "isdirty, " + ...
diff --git a/MODSRC/vazkii/tinkerer/common/enchantment/ModEnchantmentHandler.java b/MODSRC/vazkii/tinkerer/common/enchantment/ModEnchantmentHandler.java index b48c1ef9..a0b3cd6b 100644 --- a/MODSRC/vazkii/tinkerer/common/enchantment/ModEnchantmentHandler.java +++ b/MODSRC/vazkii/tinkerer/common/enchantment/ModEnchantme...
true
true
public void onEntityUpdate(LivingUpdateEvent event) { final double min = -0.0784000015258789; if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; int slowfall = EnchantmentHelper.getMaxEnchantmentLevel(LibEnchantIDs.idSlowFall, player.inventory.armorInve...
public void onEntityUpdate(LivingUpdateEvent event) { final double min = -0.0784000015258789; if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; int slowfall = EnchantmentHelper.getMaxEnchantmentLevel(LibEnchantIDs.idSlowFall, player.inventory.armorInve...
diff --git a/core/carrot2-util-text/src/org/carrot2/text/preprocessing/LanguageModelStemmer.java b/core/carrot2-util-text/src/org/carrot2/text/preprocessing/LanguageModelStemmer.java index d9207f6dd..3c747a8ac 100644 --- a/core/carrot2-util-text/src/org/carrot2/text/preprocessing/LanguageModelStemmer.java +++ b/core/ca...
false
true
private void addStemStatistics(PreprocessingContext context, char [][] wordStemImages, Set<MutableCharArray> queryStems) { final int [] stemImagesOrder = IndirectSort.sort(wordStemImages, 0, wordStemImages.length, CharArrayComparators.FAST_CHAR_ARRAY_COMPARATOR); // Local ar...
private void addStemStatistics(PreprocessingContext context, char [][] wordStemImages, Set<MutableCharArray> queryStems) { final int [] stemImagesOrder = IndirectSort.sort(wordStemImages, 0, wordStemImages.length, CharArrayComparators.FAST_CHAR_ARRAY_COMPARATOR); // Local ar...
diff --git a/src/org/eclipse/cdt/internal/core/CBuilder.java b/src/org/eclipse/cdt/internal/core/CBuilder.java index 41d86caf6..516030dfb 100644 --- a/src/org/eclipse/cdt/internal/core/CBuilder.java +++ b/src/org/eclipse/cdt/internal/core/CBuilder.java @@ -1,288 +1,286 @@ package org.eclipse.cdt.internal.core; /* ...
false
true
private boolean invokeMake(boolean fullBuild, IProgressMonitor monitor) { boolean isClean = false; boolean isCanceled = false; IProject currProject = getProject(); SubProgressMonitor subMonitor = null; if (monitor == null) { monitor = new NullProgressMonitor(); } monitor.beginTask("Invoking the C Bui...
private boolean invokeMake(boolean fullBuild, IProgressMonitor monitor) { boolean isClean = false; IProject currProject = getProject(); SubProgressMonitor subMonitor = null; if (monitor == null) { monitor = new NullProgressMonitor(); } monitor.beginTask("Invoking the C Builder: " + currProject.getName(...
diff --git a/src/jDistsim/application/designer/common/ComponentFactory.java b/src/jDistsim/application/designer/common/ComponentFactory.java index 182906e..72ee34f 100644 --- a/src/jDistsim/application/designer/common/ComponentFactory.java +++ b/src/jDistsim/application/designer/common/ComponentFactory.java @@ -1,76 +1...
true
true
public JFrame frame(String title, JComponent contentPane, JMenuBar menuBar) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLayout(new BorderLayout()); if (title != null) frame.setTitle(title); if (menuBar != null) frame.setJMenuB...
public JFrame frame(String title, JComponent contentPane, JMenuBar menuBar) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLayout(new BorderLayout()); if (title != null) frame.setTitle(title); if (menuBar != null) frame.setJMenuB...
diff --git a/framework/src/play/mvc/results/RenderTemplate.java b/framework/src/play/mvc/results/RenderTemplate.java index 0e9b6a60..57a3aacb 100644 --- a/framework/src/play/mvc/results/RenderTemplate.java +++ b/framework/src/play/mvc/results/RenderTemplate.java @@ -1,34 +1,34 @@ package play.mvc.results; import ja...
true
true
public void apply(Request request, Response response) { try { setContentTypeIfNotSet(response, MimeTypes.getContentType(template.name, "text/plain")); response.out.write(content.getBytes("utf-8")); } catch(Exception e) { throw new UnexpectedException(e); }...
public void apply(Request request, Response response) { try { Result.setContentTypeIfNotSet(response, MimeTypes.getContentType(template.name, "text/plain")); response.out.write(content.getBytes("utf-8")); } catch(Exception e) { throw new UnexpectedException(e); ...
diff --git a/WebSpringMvc/src/main/java/com/excilys/computerdatabase/controller/ComputerController.java b/WebSpringMvc/src/main/java/com/excilys/computerdatabase/controller/ComputerController.java index 6f56166..3874c14 100644 --- a/WebSpringMvc/src/main/java/com/excilys/computerdatabase/controller/ComputerController.j...
true
true
public String index(ModelMap model, @ModelAttribute("alertMessage") String alertMessage, @RequestParam(value="s",defaultValue = "2") int sortedColumnNumber, @RequestParam(value="f",defaultValue = "") String research, ...
public String index(ModelMap model, @ModelAttribute("alertMessage") String alertMessage, @RequestParam(value="s",defaultValue = "2") int sortedColumnNumber, @RequestParam(value="f",defaultValue = "") String research, ...
diff --git a/src/com/contoso/services/TodoServices.java b/src/com/contoso/services/TodoServices.java index 2aad17a..8638dc7 100644 --- a/src/com/contoso/services/TodoServices.java +++ b/src/com/contoso/services/TodoServices.java @@ -1,80 +1,80 @@ /* Todo service */ package com.contoso.services; import java.io.IOEx...
true
true
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Gson gson = new Gson(); TodoList todoList = new TodoList(); todoList.name = "Personal"; todoList.color = "blue"; todoList.items = getTe...
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Gson gson = new Gson(); TodoList todoList = new TodoList(); todoList.name = "Personal"; todoList.color = "red"; todoList.items = getTes...
diff --git a/src/main/java/net/aufdemrand/denizen/scripts/containers/core/InteractScriptHelper.java b/src/main/java/net/aufdemrand/denizen/scripts/containers/core/InteractScriptHelper.java index ada08daf7..47c2cb386 100644 --- a/src/main/java/net/aufdemrand/denizen/scripts/containers/core/InteractScriptHelper.java +++ ...
false
true
public static InteractScriptContainer getInteractScript(dNPC npc, dPlayer player, Class<? extends AbstractTrigger> trigger) { // If no trigger, npc or player specified, return null. // These objects are required to progress any further. ...
public static InteractScriptContainer getInteractScript(dNPC npc, dPlayer player, Class<? extends AbstractTrigger> trigger) { // If no trigger, npc or player specified, return null. // These objects are required to progress any further. ...
diff --git a/tools/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java b/tools/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java index 88f1ad1e..b60c837f 100644 --- a/tools/ddms/libs/ddmuilib/src/com/android/ddmuilib/ScreenShotDialog.java +++ b/tools/ddms/libs/ddmuilib/src/com/android/ddmu...
false
true
private void createContents(final Shell shell) { GridData data; final int colCount = 4; shell.setLayout(new GridLayout(colCount, true)); // "refresh" button Button refresh = new Button(shell, SWT.PUSH); refresh.setText("Refresh"); data = new GridData(GridDa...
private void createContents(final Shell shell) { GridData data; final int colCount = 4; shell.setLayout(new GridLayout(colCount, true)); // "refresh" button Button refresh = new Button(shell, SWT.PUSH); refresh.setText("Refresh"); data = new GridData(GridDa...
diff --git a/src/nl/sense_os/commonsense/client/common/components/LoginForm.java b/src/nl/sense_os/commonsense/client/common/components/LoginForm.java index 604c1c8a..de09ec48 100644 --- a/src/nl/sense_os/commonsense/client/common/components/LoginForm.java +++ b/src/nl/sense_os/commonsense/client/common/components/Logi...
true
true
private void initButtons() { forgotPassword = new LabelField("Forgot your password?"); forgotPassword.setHideLabel(true); forgotPassword.setStyleAttribute("cursor", "pointer"); forgotPassword.addListener(Events.OnClick, new Listener<ComponentEvent>() { @Override ...
private void initButtons() { forgotPassword = new LabelField("Forgot your password?"); forgotPassword.setHideLabel(true); forgotPassword.setStyleAttribute("cursor", "pointer"); forgotPassword.addListener(Events.OnClick, new Listener<ComponentEvent>() { @Override ...
diff --git a/src/main/java/org/basex/api/jaxp/BXPathExpression.java b/src/main/java/org/basex/api/jaxp/BXPathExpression.java index cb62361d7..ca3a3bb5f 100644 --- a/src/main/java/org/basex/api/jaxp/BXPathExpression.java +++ b/src/main/java/org/basex/api/jaxp/BXPathExpression.java @@ -1,116 +1,118 @@ package org.basex....
true
true
private Object finish(final Result item, final QName res) throws XPathExpressionException { final Nodes nodes = item instanceof Nodes ? (Nodes) item : null; if(res == XPathConstants.NODESET || res == XPathConstants.NODE) { if(nodes == null) throw new XPathExpressionException( "Result ca...
private Object finish(final Result item, final QName res) throws XPathExpressionException { final Nodes nodes = item instanceof Nodes ? (Nodes) item : null; if(res == XPathConstants.NODESET || res == XPathConstants.NODE) { if(nodes == null) throw new XPathExpressionException( "Result ca...
diff --git a/src/com/nexus/classloading/NexusLibraryManager.java b/src/com/nexus/classloading/NexusLibraryManager.java index badc818..69060dc 100644 --- a/src/com/nexus/classloading/NexusLibraryManager.java +++ b/src/com/nexus/classloading/NexusLibraryManager.java @@ -1,260 +1,263 @@ package com.nexus.classloading; ...
false
true
public void load(){ if(NexusVersion.IsDevelopmentVersion) return; List<Throwable> LoadingErrors = new ArrayList<Throwable>(); try{ for(ILibraryList lib : this.RequiredLibraries){ for(int i = 0; i < lib.getLibraries().length; i++){ boolean ShouldDownload = false; String LibraryName = lib...
public void load(){ if(NexusVersion.IsDevelopmentVersion) return; List<Throwable> LoadingErrors = new ArrayList<Throwable>(); try{ for(ILibraryList lib : this.RequiredLibraries){ for(int i = 0; i < lib.getLibraries().length; i++){ boolean ShouldDownload = false; String LibraryName = lib...
diff --git a/src/main/java/riking/horses/PluginMain.java b/src/main/java/riking/horses/PluginMain.java index 7e7a320..446b76c 100644 --- a/src/main/java/riking/horses/PluginMain.java +++ b/src/main/java/riking/horses/PluginMain.java @@ -1,195 +1,195 @@ package riking.horses; import java.util.ArrayList; import java...
true
true
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (command.getName().equalsIgnoreCase("horse")) { Player player; if (args.length != 0) { player = Bukkit.getPlayer(args[0]); if (player == null) { ...
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (command.getName().equalsIgnoreCase("horse")) { Player player; if (args.length != 0) { player = Bukkit.getPlayer(args[0]); if (player == null) { ...
diff --git a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java b/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java index 16685090..06eebf24 100644 --- a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support...
true
true
public static File getFile(Object source, String filename) throws IOException { Class<?> clazz = (source instanceof Class<?>) ? (Class<?>) source : source.getClass(); if (Platform.isRunning()) { ClassLoader classLoader = clazz.getClassLoader(); if (classLoader instanceof DefaultClassLoader) { // TODO e3....
public static File getFile(Object source, String filename) throws IOException { Class<?> clazz = (source instanceof Class<?>) ? (Class<?>) source : source.getClass(); if (Platform.isRunning()) { ClassLoader classLoader = clazz.getClassLoader(); if (classLoader instanceof DefaultClassLoader) { // TODO e3....
diff --git a/compiler/src/test/java/dagger/tests/integration/codegen/InjectAdapterGenerationTest.java b/compiler/src/test/java/dagger/tests/integration/codegen/InjectAdapterGenerationTest.java index 9030479c..b11c5e39 100644 --- a/compiler/src/test/java/dagger/tests/integration/codegen/InjectAdapterGenerationTest.java ...
false
true
@Test public void basicInjectAdapter() { JavaFileObject sourceFile = JavaFileObjects.forSourceString("Basic", Joiner.on("\n").join( "import dagger.Module;", "import javax.inject.Inject;", "class Basic {", " static class A { @Inject A() { } }", " @Module(injects = A.class)...
@Test public void basicInjectAdapter() { JavaFileObject sourceFile = JavaFileObjects.forSourceString("Basic", Joiner.on("\n").join( "import dagger.Module;", "import javax.inject.Inject;", "class Basic {", " static class A { @Inject A() { } }", " @Module(injects = A.class)...
diff --git a/src/gossipLearning/controls/observers/errorComputation/BanditPercComputator.java b/src/gossipLearning/controls/observers/errorComputation/BanditPercComputator.java index fa69914..e51bcf2 100644 --- a/src/gossipLearning/controls/observers/errorComputation/BanditPercComputator.java +++ b/src/gossipLearning/c...
true
true
public double[] computeError(ModelHolder modelHolder) { double meanErrorOfNodeI = 0.0; BanditModel model = (BanditModel)modelHolder.getModel(modelHolder.size() -1); double max = Double.MIN_VALUE; int maxIdx = -1; for (int j = 0; j < GlobalArmModel.numberOfArms(); j ++) { if (GlobalArmMo...
public double[] computeError(ModelHolder modelHolder) { double meanErrorOfNodeI = 0.0; BanditModel model = (BanditModel)modelHolder.getModel(modelHolder.size() -1); double max = Double.NEGATIVE_INFINITY; int maxIdx = -1; for (int j = 0; j < GlobalArmModel.numberOfArms(); j ++) { if (Glo...
diff --git a/scm-webapp/src/main/java/sonia/scm/resources/AbstractResourceServlet.java b/scm-webapp/src/main/java/sonia/scm/resources/AbstractResourceServlet.java index 4d09bd495..5ea68330e 100644 --- a/scm-webapp/src/main/java/sonia/scm/resources/AbstractResourceServlet.java +++ b/scm-webapp/src/main/java/sonia/scm/re...
true
true
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String uri = HttpUtil.getStrippedURI(request); ResourceType type = getType(); String nameSeparator = HttpUtil.SEPARATOR_PATH.concat( type.getExte...
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String uri = HttpUtil.getStrippedURI(request); ResourceType type = getType(); String nameSeparator = HttpUtil.SEPARATOR_PATH.concat( type.getExte...
diff --git a/openFaces/source/org/openfaces/renderkit/table/DataTablePaginatorRenderer.java b/openFaces/source/org/openfaces/renderkit/table/DataTablePaginatorRenderer.java index 64ebd49a4..32ba5e996 100644 --- a/openFaces/source/org/openfaces/renderkit/table/DataTablePaginatorRenderer.java +++ b/openFaces/source/org/o...
true
true
public void encodeChildren(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) return; DataTablePaginator paginator = ((DataTablePaginator) component); DataTable table = paginator.getTable(); int pageCount = table.getPageCount()...
public void encodeChildren(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) return; DataTablePaginator paginator = ((DataTablePaginator) component); DataTable table = paginator.getTable(); int pageCount = table.getPageCount()...
diff --git a/src/org/python/core/PyException.java b/src/org/python/core/PyException.java index 3269e73e..c6d10918 100644 --- a/src/org/python/core/PyException.java +++ b/src/org/python/core/PyException.java @@ -1,330 +1,335 @@ // Copyright (c) Corporation for National Research Initiatives package org.python.core; im...
true
true
public static PyException doRaise(PyObject type, PyObject value, PyObject traceback) { if (type == null) { ThreadState state = Py.getThreadState(); type = state.exception.type; value = state.exception.value; traceback = state.exception.traceback; } ...
public static PyException doRaise(PyObject type, PyObject value, PyObject traceback) { if (type == null) { ThreadState state = Py.getThreadState(); type = state.exception.type; value = state.exception.value; traceback = state.exception.traceback; } ...
diff --git a/src/org/eclipse/core/internal/utils/Policy.java b/src/org/eclipse/core/internal/utils/Policy.java index 1921a569..ab25b023 100644 --- a/src/org/eclipse/core/internal/utils/Policy.java +++ b/src/org/eclipse/core/internal/utils/Policy.java @@ -1,136 +1,136 @@ package org.eclipse.core.internal.utils; /* ...
true
true
public static String bind(String id, String[] bindings) { if (id == null) return "No message available"; String message = null; try { message = bundle.getString(id); } catch (MissingResourceException e) { // If we got an exception looking for the message, fail gracefully by just returning // the id we were ...
public static String bind(String id, String[] bindings) { if (id == null) return "No message available"; String message = null; try { message = bundle.getString(id); } catch (MissingResourceException e) { // If we got an exception looking for the message, fail gracefully by just returning // the id we were ...
diff --git a/src/java/org/smoothbuild/parse/ArgumentNodesCreator.java b/src/java/org/smoothbuild/parse/ArgumentNodesCreator.java index 77a00039..9d9d3eb6 100644 --- a/src/java/org/smoothbuild/parse/ArgumentNodesCreator.java +++ b/src/java/org/smoothbuild/parse/ArgumentNodesCreator.java @@ -1,135 +1,135 @@ package org....
true
true
private void convertImplicitToExplicit(Map<String, Param> params, Collection<Argument> arguments, Map<String, DefinitionNode> explicitArgs) { // TODO Implicit arguments are allowed only in pipes so there can be at // most one implicit argument checkArgument(arguments.size() <= 1); ...
private void convertImplicitToExplicit(Map<String, Param> params, Collection<Argument> arguments, Map<String, DefinitionNode> explicitArgs) { // TODO Implicit arguments are allowed only in pipes so there can be at // most one implicit argument checkArgument(arguments.size() <= 1); ...
diff --git a/core/tests/org.eclipse.dltk.debug.tests/src/org/eclipse/dltk/debug/dbgp/tests/service/DbgpServiceTests.java b/core/tests/org.eclipse.dltk.debug.tests/src/org/eclipse/dltk/debug/dbgp/tests/service/DbgpServiceTests.java index b923d419e..fa007129e 100644 --- a/core/tests/org.eclipse.dltk.debug.tests/src/org/e...
true
true
public void testRestart() throws IOException { int port1 = findAvailablePort(MIN_PORT, MAX_PORT); int port2 = findAvailablePort(port1 + 1, MAX_PORT); for (int i = 0; i < 4; ++i) { final DbgpService service = createService(port1); try { assertEquals(port1, service.getPort()); connect(port1); try...
public void _testRestart() throws IOException { int port1 = findAvailablePort(MIN_PORT, MAX_PORT); int port2 = findAvailablePort(port1 + 1, MAX_PORT); for (int i = 0; i < 4; ++i) { final DbgpService service = createService(port1); try { assertEquals(port1, service.getPort()); connect(port1); tr...
diff --git a/common/src/com/digitald4/common/servlet/ParentServlet.java b/common/src/com/digitald4/common/servlet/ParentServlet.java index 145ec0c..bdc1562 100644 --- a/common/src/com/digitald4/common/servlet/ParentServlet.java +++ b/common/src/com/digitald4/common/servlet/ParentServlet.java @@ -1,101 +1,101 @@ packag...
true
true
public void checkEntityManager() throws ServletException { ServletContext sc = getServletContext(); if (EntityManagerHelper.getEntityManager()==null) { try { System.out.println("***********HHHHHH###### Loading driver"); EntityManagerHelper.init(sc.getInitParameter("dbdriver"), sc.getInitParameter...
public void checkEntityManager() throws ServletException { ServletContext sc = getServletContext(); if (EntityManagerHelper.getEntityManager()==null) { try { System.out.println("*********** Loading driver"); EntityManagerHelper.init(sc.getInitParameter("dbdriver"), sc.getInitParameter("dburl"), ...
diff --git a/src/main/java/org/movsim/simulator/roadSection/impl/RoadSectionFactory.java b/src/main/java/org/movsim/simulator/roadSection/impl/RoadSectionFactory.java index d651d78a..10f1b58c 100644 --- a/src/main/java/org/movsim/simulator/roadSection/impl/RoadSectionFactory.java +++ b/src/main/java/org/movsim/simulato...
true
true
public static RoadSection create(InputDataImpl inputData, final RoadInput roadInput, final VehicleGenerator vehGenerator) { final long roadId = roadInput.getId(); if (roadId % 100 == 0) { logger.info("create MAINROAD for road id={}", roadId); return new RoadSectio...
public static RoadSection create(InputDataImpl inputData, final RoadInput roadInput, final VehicleGenerator vehGenerator) { final long roadId = roadInput.getId(); if (roadId % 10 == 0) { logger.info("create MAINROAD for road id={}", roadId); return new RoadSection...
diff --git a/ProjectTieBreak/src/DAL/MemberAccess.java b/ProjectTieBreak/src/DAL/MemberAccess.java index 5e2eba6..c13b36f 100644 --- a/ProjectTieBreak/src/DAL/MemberAccess.java +++ b/ProjectTieBreak/src/DAL/MemberAccess.java @@ -1,218 +1,219 @@ package DAL; import BE.Member; import com.microsoft.sqlserver.jdbc.SQL...
true
true
public void update(Member m) throws SQLServerException, SQLException { try (Connection con = connector.getConnection()) { String sql = "UPDATE Member " + "SET First_Name = ?, Last_Name = ?, Address = ?, Birth_Year = ?, Phone_No = ?, Email = ?, MemberType = ?, WHER...
public void update(Member m) throws SQLServerException, SQLException { try (Connection con = connector.getConnection()) { String sql = "UPDATE Member " + "SET First_Name = ?, Last_Name = ?, Address = ?, Birth_Year = ?, Phone_No = ?, Email = ?, MemberType = ? " ...
diff --git a/src/com/prcse/utils/PrcseConnection.java b/src/com/prcse/utils/PrcseConnection.java index 627a136..45135b7 100644 --- a/src/com/prcse/utils/PrcseConnection.java +++ b/src/com/prcse/utils/PrcseConnection.java @@ -1,107 +1,107 @@ package com.prcse.utils; import java.io.IOException; import java.io.Object...
true
true
public ArrayList<Object> getFrontPage() throws Exception { out.writeObject(new FrontPage()); try { FrontPage response = (FrontPage)in.readObject(); if(response.getError() != null) { error = response.getError(); } else { return response.getArtists(); } } catch (ClassNotFoundException e) {...
public ArrayList getFrontPage() throws Exception { out.writeObject(new FrontPage()); try { FrontPage response = (FrontPage)in.readObject(); if(response.getError() != null) { error = response.getError(); } else { return response.getArtists(); } } catch (ClassNotFoundException e) { erro...
diff --git a/client/src/es/deusto/weblab/client/ui/audio/AudioManager.java b/client/src/es/deusto/weblab/client/ui/audio/AudioManager.java index 458fd25ef..47111df9f 100644 --- a/client/src/es/deusto/weblab/client/ui/audio/AudioManager.java +++ b/client/src/es/deusto/weblab/client/ui/audio/AudioManager.java @@ -1,175 +...
false
true
public AudioElement playBest(String file) { if( this.getSoundEnabled() ) { final Audio audio = Audio.createIfSupported(); if( audio != null ) { final AudioElement elem = audio.getAudioElement(); // First try probably if(audio.canPlayType(OGG_TYPE).equals(MediaElement.CAN_PLAY_PROBABLY)) e...
public AudioElement playBest(String file) { if( this.getSoundEnabled() ) { final Audio audio = Audio.createIfSupported(); if( audio != null ) { final AudioElement elem = audio.getAudioElement(); // First try probably if(elem.canPlayType(OGG_TYPE).equals(MediaElement.CAN_PLAY_PROBABLY)) el...
diff --git a/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBInputFormat.java b/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBInputFormat.java index 6f4b208e..140517a7 100644 --- a/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBInputFormat.java +++ b/src/java/org/apache/sqoop/mapreduce/db/DataDrivenDBInputF...
true
true
public List<InputSplit> getSplits(JobContext job) throws IOException { int targetNumTasks = ConfigurationHelper.getJobNumMaps(job); String boundaryQuery = getDBConf().getInputBoundingQuery(); // If user do not forced us to use his boundary query and we don't have to // bacause there is only one mapp...
public List<InputSplit> getSplits(JobContext job) throws IOException { int targetNumTasks = ConfigurationHelper.getJobNumMaps(job); String boundaryQuery = getDBConf().getInputBoundingQuery(); // If user do not forced us to use his boundary query and we don't have to // bacause there is only one mapp...
diff --git a/messaging/src/main/java/xdi2/messaging/target/interceptor/impl/LinkContractsInterceptor.java b/messaging/src/main/java/xdi2/messaging/target/interceptor/impl/LinkContractsInterceptor.java index 685f77d28..79158a504 100644 --- a/messaging/src/main/java/xdi2/messaging/target/interceptor/impl/LinkContractsInt...
false
true
private boolean checkLinkContractAuthorization(Operation operation, XRI3Segment targetAddress, ExecutionContext executionContext) throws Xdi2NotAuthorizedException { boolean operationAllowed = false, senderIsAssigned = false; XRI3Segment sender = operation.getSender(); LinkContract linkContract = getLinkC...
private boolean checkLinkContractAuthorization(Operation operation, XRI3Segment targetAddress, ExecutionContext executionContext) throws Xdi2NotAuthorizedException { boolean operationAllowed = false, senderIsAssigned = false; XRI3Segment sender = operation.getSender(); LinkContract linkContract = getLinkC...
diff --git a/openejb-itests-client/src/main/java/org/apache/openejb/test/ActiveMqTestJms.java b/openejb-itests-client/src/main/java/org/apache/openejb/test/ActiveMqTestJms.java index b865791..94518fa 100644 --- a/openejb-itests-client/src/main/java/org/apache/openejb/test/ActiveMqTestJms.java +++ b/openejb-itests-clien...
true
true
public ConnectionFactory getConnectionFactory() { return new ActiveMQConnectionFactory(); }
public ConnectionFactory getConnectionFactory() { return new ActiveMQConnectionFactory("tcp://localhost:61616"); }
diff --git a/nexus-gwt-ui/sonatype-ext-gwt-nexus-client/src/main/java/org/sonatype/nexus/ext/gwt/ui/client/reposerver/RepoMaintenancePage.java b/nexus-gwt-ui/sonatype-ext-gwt-nexus-client/src/main/java/org/sonatype/nexus/ext/gwt/ui/client/reposerver/RepoMaintenancePage.java index 72ca24562..0a63ff840 100644 --- a/nexus...
true
true
public void init(ServerInstance server) { Tree contentTree = new Tree(); final RepoTreeBinding treeBinding = new RepoTreeBinding(contentTree); ContentPanel repoTreePanel = new ContentPanel(); repoTreePanel.setTitle("Repository Information"); repoTreePanel.ad...
public void init(ServerInstance server) { Tree contentTree = new Tree(); final RepoTreeBinding treeBinding = new RepoTreeBinding(contentTree); ContentPanel repoTreePanel = new ContentPanel(); repoTreePanel.setTitle("Repository Information"); repoTreePanel.ad...
diff --git a/src/com/beecub/command/bPermissions.java b/src/com/beecub/command/bPermissions.java index 5f7f1d8..e42719f 100644 --- a/src/com/beecub/command/bPermissions.java +++ b/src/com/beecub/command/bPermissions.java @@ -1,186 +1,189 @@ package com.beecub.command; import org.bukkit.command.CommandSender; impor...
false
true
public static boolean scheckPermission(Player player, String command) { /*String admin = "glizer.admin"; String moderator = "glizer.moderator"; String user = "glizer.user";*/ if (player.isOp()) { return true; } if (command.equalsIgnoreCase("")) { if (player.hasPermission("")) { return true; ...
public static boolean scheckPermission(Player player, String command) { /*String admin = "glizer.admin"; String moderator = "glizer.moderator"; String user = "glizer.user";*/ if (player.isOp()) { return true; } if (command.equalsIgnoreCase("")) { if (player.hasPermission("")) { return true; ...
diff --git a/sslr-core/src/test/java/org/sonar/sslr/internal/matchers/PatternMatcherTest.java b/sslr-core/src/test/java/org/sonar/sslr/internal/matchers/PatternMatcherTest.java index e88a923e..3607fce5 100644 --- a/sslr-core/src/test/java/org/sonar/sslr/internal/matchers/PatternMatcherTest.java +++ b/sslr-core/src/test...
true
true
public void should_catch_StackOverflowError() { matcher = new PatternMatcher("([a-fA-F]|\\d)+"); when(context.length()).thenReturn(10000); when(context.charAt(Mockito.anyInt())).thenReturn('a'); thrown.expect(RuntimeException.class); thrown.expectMessage("The regular expression '([a-fA-F]|\\d)+' h...
public void should_catch_StackOverflowError() { matcher = new PatternMatcher("([a-fA-F]|\\d)+"); when(context.length()).thenReturn(8000); when(context.charAt(Mockito.anyInt())).thenReturn('a'); thrown.expect(RuntimeException.class); thrown.expectMessage("The regular expression '([a-fA-F]|\\d)+' ha...
diff --git a/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java b/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java index 63bc689ff..60959fbec 100644 --- a/src/main/org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate.java +++ b/src/main/org/jboss/jms/client/d...
true
true
public synchronized Object invoke(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if (trace) { log.trace("invoking " + methodName + " on server"); } SimpleMetaData md = mi.getMetaData(); md...
public synchronized Object invoke(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if (trace) { log.trace("invoking " + methodName + " on server"); } SimpleMetaData md = mi.getMetaData(); md...
diff --git a/okapi/filters/table/src/main/java/net/sf/okapi/filters/table/csv/Parameters.java b/okapi/filters/table/src/main/java/net/sf/okapi/filters/table/csv/Parameters.java index b08c4a632..eb8686c77 100644 --- a/okapi/filters/table/src/main/java/net/sf/okapi/filters/table/csv/Parameters.java +++ b/okapi/filters/ta...
true
true
protected void parameters_load(ParametersString buffer) { super.parameters_load(buffer); fieldDelimiter = buffer.getString("fieldDelimiter", "").trim(); textQualifier = buffer.getString("textQualifier", "").trim(); removeQualifiers = buffer.getBoolean("removeQualifiers", true); }
protected void parameters_load(ParametersString buffer) { super.parameters_load(buffer); fieldDelimiter = buffer.getString("fieldDelimiter", ""); textQualifier = buffer.getString("textQualifier", ""); removeQualifiers = buffer.getBoolean("removeQualifiers", true); }
diff --git a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java b/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java index 0373862cd..58308cedf 100644 --- a/test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java +++ b/test/unit/org/apach...
false
true
public void testMutateLevel() throws Exception { String ksname = "Keyspace1"; String cfname = "StandardLeveled"; Table table = Table.open(ksname); ColumnFamilyStore store = table.getColumnFamilyStore(cfname); ByteBuffer value = ByteBuffer.wrap(new byte[100 * 1024]); // 1...
public void testMutateLevel() throws Exception { String ksname = "Keyspace1"; String cfname = "StandardLeveled"; Table table = Table.open(ksname); ColumnFamilyStore store = table.getColumnFamilyStore(cfname); ByteBuffer value = ByteBuffer.wrap(new byte[100 * 1024]); // 1...
diff --git a/src/java/org/apache/cassandra/service/AntiEntropyService.java b/src/java/org/apache/cassandra/service/AntiEntropyService.java index b54149797..6af96f695 100644 --- a/src/java/org/apache/cassandra/service/AntiEntropyService.java +++ b/src/java/org/apache/cassandra/service/AntiEntropyService.java @@ -1,947 +...
true
true
public void runMayThrow() throws Exception { if (endpoints.isEmpty()) { differencingDone.signalAll(); logger.info("No neighbors to repair with for " + tablename + " on " + range + ": " + getName() + " completed."); return; ...
public void runMayThrow() throws Exception { if (endpoints.isEmpty()) { differencingDone.signalAll(); logger.info("No neighbors to repair with for " + tablename + " on " + range + ": " + getName() + " completed."); return; ...
diff --git a/src/de/hampelratte/svdrp/util/ChannelParser.java b/src/de/hampelratte/svdrp/util/ChannelParser.java index 3b4aeb9..0fd2120 100644 --- a/src/de/hampelratte/svdrp/util/ChannelParser.java +++ b/src/de/hampelratte/svdrp/util/ChannelParser.java @@ -1,142 +1,142 @@ /* $Id$ * * Copyright (c) 2005, Henrik Ni...
false
true
private static void parseParameters(Channel channel, String string) { for (int i = 0; i < string.length(); i++) { char c = string.charAt(i); switch(c) { case 'B': channel.setBandwidth(Integer.parseInt(Character.toString(string.charAt(i+1)))); ...
private static void parseParameters(Channel channel, String string) { for (int i = 0; i < string.length(); i++) { char c = string.charAt(i); switch(c) { case 'B': channel.setBandwidth(Integer.parseInt(Character.toString(string.charAt(i+1)))); ...
diff --git a/src/main/de/vwistuttgart/openstreetmap/osmosis/fastusedfilter/FastUsedPluginLoader.java b/src/main/de/vwistuttgart/openstreetmap/osmosis/fastusedfilter/FastUsedPluginLoader.java index b5f0543..dcb257c 100644 --- a/src/main/de/vwistuttgart/openstreetmap/osmosis/fastusedfilter/FastUsedPluginLoader.java +++ b...
false
true
public Map<String, TaskManagerFactory> loadTaskFactories() { Map<String, TaskManagerFactory> factories = new HashMap<String, TaskManagerFactory>(); factories.put("--fast-used-node", new FastUsedNodeFilterFactory()); factories.put("--fun", new FastUsedNodeFilterFactory()); factories.put("--fast-used-node-0.6"...
public Map<String, TaskManagerFactory> loadTaskFactories() { Map<String, TaskManagerFactory> factories = new HashMap<String, TaskManagerFactory>(); factories.put("fast-used-node", new FastUsedNodeFilterFactory()); factories.put("fun", new FastUsedNodeFilterFactory()); factories.put("fast-used-node-0.6", new ...
diff --git a/test/AppTest.java b/test/AppTest.java index 4475aa9..451d595 100644 --- a/test/AppTest.java +++ b/test/AppTest.java @@ -1,10 +1,10 @@ import junit.framework.*; public class AppTest extends TestCase { public void test1() { } public void test2() { - fail("test failed!"); + ...
true
true
public void test2() { fail("test failed!"); }
public void test2() { // fail("test failed!"); }
diff --git a/src/me/snowleo/goremod/ParticleBlockListener.java b/src/me/snowleo/goremod/ParticleBlockListener.java index 773ed50..504e1de 100644 --- a/src/me/snowleo/goremod/ParticleBlockListener.java +++ b/src/me/snowleo/goremod/ParticleBlockListener.java @@ -1,97 +1,97 @@ /* * GoreMod - a blood plugin for Bukkit ...
true
true
public void onBlockPistonExtend(final BlockPistonExtendEvent event) { final Location loc = event.getBlock().getLocation(); if (!goreMod.isWorldEnabled(loc.getWorld())) { return; } for (Block block : event.getBlocks()) { if (goreMod.getStorage().isUnbreakable(loc)) { event.setCancelled(true); ...
public void onBlockPistonExtend(final BlockPistonExtendEvent event) { final Location loc = event.getBlock().getLocation(); if (!goreMod.isWorldEnabled(loc.getWorld())) { return; } for (Block block : event.getBlocks()) { if (goreMod.getStorage().isUnbreakable(block.getLocation())) { event.setC...
diff --git a/jython/src/org/python/core/PyJavaType.java b/jython/src/org/python/core/PyJavaType.java index ae5d5a73..f5f31250 100644 --- a/jython/src/org/python/core/PyJavaType.java +++ b/jython/src/org/python/core/PyJavaType.java @@ -1,918 +1,918 @@ package org.python.core; import java.lang.reflect.Constructor; i...
false
true
protected void init(Class<?> forClass, Set<PyJavaType> needsInners) { name = forClass.getName(); // Strip the java fully qualified class name from Py classes in core if (name.startsWith("org.python.core.Py")) { name = name.substring("org.python.core.Py".length()).toLowerCase(); ...
protected void init(Class<?> forClass, Set<PyJavaType> needsInners) { name = forClass.getName(); // Strip the java fully qualified class name from Py classes in core if (name.startsWith("org.python.core.Py")) { name = name.substring("org.python.core.Py".length()).toLowerCase(); ...
diff --git a/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java b/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java index fad6c80b..408e76a7 100755 --- a/jcr/src/test/java/org/apache/abdera/jcr/JcrCollectionProviderTest.java +++ b/jcr/src/test/java/org/apache/abdera/jcr/JcrColle...
true
true
public void testCustomerProvider() throws Exception { Abdera abdera = new Abdera(); Factory factory = abdera.getFactory(); AbderaClient client = new AbderaClient(abdera); String base = "http://localhost:9002/"; // Testing of entry creation IRI colUri = new IRI(base).resolve("acme/feed"); ...
public void testCustomerProvider() throws Exception { Abdera abdera = new Abdera(); Factory factory = abdera.getFactory(); AbderaClient client = new AbderaClient(abdera); String base = "http://localhost:9002/"; // Testing of entry creation IRI colUri = new IRI(base).resolve("acme/feed"); ...
diff --git a/src/com/ghelius/narodmon/WidgetConfigActivity.java b/src/com/ghelius/narodmon/WidgetConfigActivity.java index 6c227cf..51eb1f8 100644 --- a/src/com/ghelius/narodmon/WidgetConfigActivity.java +++ b/src/com/ghelius/narodmon/WidgetConfigActivity.java @@ -1,104 +1,104 @@ package com.ghelius.narodmon; impor...
true
true
public void onCreate(Bundle savedInstanceState) { setTheme(com.actionbarsherlock.R.style.Theme_Sherlock); super.onCreate(savedInstanceState); setContentView(R.layout.widget_config_activity); setTitle(getString(R.string.select_sensor_text)); setResult(RESULT_CANCELED); Intent intent = getIntent(); ListVie...
public void onCreate(Bundle savedInstanceState) { setTheme(com.actionbarsherlock.R.style.Theme_Sherlock); super.onCreate(savedInstanceState); setContentView(R.layout.widget_config_activity); setTitle(getString(R.string.select_sensor_text)); setResult(RESULT_CANCELED); Intent intent = getIntent(); ListVie...
diff --git a/src/se/troed/plugin/Courier/CourierConfig.java b/src/se/troed/plugin/Courier/CourierConfig.java index 00158af..69067c2 100644 --- a/src/se/troed/plugin/Courier/CourierConfig.java +++ b/src/se/troed/plugin/Courier/CourierConfig.java @@ -1,120 +1,120 @@ package se.troed.plugin.Courier; import org.bukkit....
false
true
public CourierConfig(Courier plug) { log = plug.getServer().getLogger(); FileConfiguration config = plug.getConfig(); PluginDescriptionFile pdfFile = plug.getDescription(); // verify config compatibility String version = config.getString(".Version" + pdfFile.getName()); ...
public CourierConfig(Courier plug) { log = plug.getServer().getLogger(); FileConfiguration config = plug.getConfig(); PluginDescriptionFile pdfFile = plug.getDescription(); // verify config compatibility String version = config.getString(pdfFile.getName() + ".Version"); ...
diff --git a/src/com/dmdirc/ChannelEventHandler.java b/src/com/dmdirc/ChannelEventHandler.java index 9568bc669..d00f98b41 100644 --- a/src/com/dmdirc/ChannelEventHandler.java +++ b/src/com/dmdirc/ChannelEventHandler.java @@ -1,321 +1,323 @@ /* * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes ...
true
true
public void onChannelTopic(final Parser tParser, final ChannelInfo cChannel, final boolean bIsJoinTopic) { checkParser(tParser); final Topic newTopic = new Topic(cChannel.getTopic(), cChannel.getTopicSetter(), cChannel.getTopicTime()); if (bIsJoinTopic) { ...
public void onChannelTopic(final Parser tParser, final ChannelInfo cChannel, final boolean bIsJoinTopic) { checkParser(tParser); final Topic newTopic = new Topic(cChannel.getTopic(), cChannel.getTopicSetter(), cChannel.getTopicTime()); if (bIsJoinTopic) { ...
diff --git a/play-dcep-utils/src/main/java/eu/play_project/dcep/distributedetalis/utils/ProActiveHelpers.java b/play-dcep-utils/src/main/java/eu/play_project/dcep/distributedetalis/utils/ProActiveHelpers.java index 1278cd3a..2893cf6a 100644 --- a/play-dcep-utils/src/main/java/eu/play_project/dcep/distributedetalis/util...
false
true
public static Component newComponent(String componentName, Map<String, Object> context) throws ADLException { final Integer PROACTIVE_PNP_PORT = Integer.getInteger(DcepConstants.getProperties().getProperty("dcep.proactive.pnp.port")); final Integer PROACTIVE_HTTP_PORT = Integer.getInteger(DcepConstants.getPrope...
public static Component newComponent(String componentName, Map<String, Object> context) throws ADLException { final Integer PROACTIVE_PNP_PORT = Integer.valueOf(DcepConstants.getProperties().getProperty("dcep.proactive.pnp.port")); final Integer PROACTIVE_HTTP_PORT = Integer.valueOf(DcepConstants.getProperties(...
diff --git a/src/cnt/network/TCPReceiver.java b/src/cnt/network/TCPReceiver.java index 3b9d9f6..802988f 100644 --- a/src/cnt/network/TCPReceiver.java +++ b/src/cnt/network/TCPReceiver.java @@ -1,215 +1,215 @@ /** * Coop Network Tetris — A cooperative tetris over the Internet. * * Copyright © 2012 Calle Lejdbra...
true
true
public void run() { /* prepair outgoing stream */ ObjectOutputStream output = null; /* prepair id to map sockets and streams to */ int peer = 0; Packet packet = null; System.err.println("\033[1;33mStarting TCPReceiver\033[0m"); try { if (this.input == null) { output = new ObjectOutput...
public void run() { /* prepair outgoing stream */ ObjectOutputStream output = null; /* prepair id to map sockets and streams to */ int peer = 0; Packet packet = null; System.err.println("\033[1;33mStarting TCPReceiver\033[0m"); try { if (this.input == null) { output = new ObjectOutput...
diff --git a/src/main/java/org/mvel2/CompileException.java b/src/main/java/org/mvel2/CompileException.java index 47caac57..ee3ac8f1 100644 --- a/src/main/java/org/mvel2/CompileException.java +++ b/src/main/java/org/mvel2/CompileException.java @@ -1,277 +1,277 @@ /** * MVEL 2.0 * Copyright (C) 2007 The Codehaus *...
true
true
private CharSequence showCodeNearError(char[] expr, int cursor) { if (expr == null) return "Unknown"; int start = cursor - 20; int end = (cursor + 30); if (end > expr.length) { end = expr.length; start -= 30; } if (start < 0) { s...
private CharSequence showCodeNearError(char[] expr, int cursor) { if (expr == null) return "Unknown"; int start = cursor - 20; int end = (cursor + 30); if (end > expr.length) { end = expr.length; start -= 30; } if (start < 0) { s...
diff --git a/org-antlr-works-editor/src/org/antlr/works/editor/grammar/navigation/RuleScanningTaskV4.java b/org-antlr-works-editor/src/org/antlr/works/editor/grammar/navigation/RuleScanningTaskV4.java index 7573b4d..addb870 100644 --- a/org-antlr-works-editor/src/org/antlr/works/editor/grammar/navigation/RuleScanningTa...
true
true
private void processParseResult(Snapshot snapshot, GrammarParserV4.GrammarFileResultV4 result, GrammarRulesPanelUI ui, GrammarNode.GrammarNodeDescription rootDescription, G...
private void processParseResult(Snapshot snapshot, GrammarParserV4.GrammarFileResultV4 result, GrammarRulesPanelUI ui, GrammarNode.GrammarNodeDescription rootDescription, G...
diff --git a/SpaceFarmer/src/App/listener/IncrementListener.java b/SpaceFarmer/src/App/listener/IncrementListener.java index a274106..ac4e40f 100644 --- a/SpaceFarmer/src/App/listener/IncrementListener.java +++ b/SpaceFarmer/src/App/listener/IncrementListener.java @@ -1,41 +1,41 @@ package App.listener; import java...
true
true
public void actionPerformed(ActionEvent e) { if(Pattern.matches("[0-9]+", theField.getText())) { int n = Integer.parseInt(theField.getText()); if (n < 16){ //TODO: make it decrement when at 16, make this less confusing to read theField.setText(n + (IncType ? 1 :( ...
public void actionPerformed(ActionEvent e) { if(Pattern.matches("[0-9]+", theField.getText())) { int n = Integer.parseInt(theField.getText()); if (n < 16 || !IncType){ //TODO: make it decrement when at 16, make this less confusing to read theField.setText(n + (Inc...
diff --git a/com.itsolut.mantis.ui/src/com/itsolut/mantis/ui/internal/MantisImages.java b/com.itsolut.mantis.ui/src/com/itsolut/mantis/ui/internal/MantisImages.java index 190948b..a036edb 100644 --- a/com.itsolut.mantis.ui/src/com/itsolut/mantis/ui/internal/MantisImages.java +++ b/com.itsolut.mantis.ui/src/com/itsolut/...
true
true
private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException { if (baseURL == null) throw new MalformedURLException(); StringBuffer buffer = new StringBuffer(prefix); if (prefix != "") buffer.append('/'); buffer.append(name); return new URL(baseURL, buffer.toString()); ...
private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException { if (baseURL == null) throw new MalformedURLException(); StringBuffer buffer = new StringBuffer(prefix); if (!"".equals(prefix)) buffer.append('/'); buffer.append(name); return new URL(baseURL, buffer.toString...
diff --git a/JTT/src/com/aragaer/jtt/JTT.java b/JTT/src/com/aragaer/jtt/JTT.java index 07338e6..b3f160c 100644 --- a/JTT/src/com/aragaer/jtt/JTT.java +++ b/JTT/src/com/aragaer/jtt/JTT.java @@ -1,235 +1,235 @@ package com.aragaer.jtt; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; ...
true
true
private double computeSolarEventTime(Calendar date, boolean isSunrise) { date.setTimeZone(this.timeZone); final double lngHour = longitude / 15; final double t = date.get(Calendar.DAY_OF_YEAR) + ((isSunrise ? 6 : 18) - lngHour) / 24; final double M = (0.9856 * t) - ...
private double computeSolarEventTime(Calendar date, boolean isSunrise) { date.setTimeZone(this.timeZone); final double lngHour = longitude / 15; final double t = date.get(Calendar.DAY_OF_YEAR) + ((isSunrise ? 6 : 18) - lngHour) / 24; final double M = (0.9856 * t) - ...
diff --git a/libs/GraphicsConnection.java b/libs/GraphicsConnection.java index 5219263..b5695d3 100644 --- a/libs/GraphicsConnection.java +++ b/libs/GraphicsConnection.java @@ -1,178 +1,178 @@ import java.io.*; import java.net.*; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.atomic....
true
true
public synchronized void sendGamestate(int turnNumber, int dimension, String mapData[][], AIConnection playerlist[]){ // TODO: correct turn number System.out.println("Sending gamestate to graphics engine"); JSONObject root = new JSONObject(); try { root.put("message", "gamestate"); root.put("...
public synchronized void sendGamestate(int turnNumber, int dimension, String mapData[][], AIConnection playerlist[]){ // TODO: correct turn number System.out.println("Sending gamestate to graphics engine"); JSONObject root = new JSONObject(); try { root.put("message", "gamestate"); root.put("...
diff --git a/FatTnt/src/me/asofold/bukkit/fattnt/propagation/ArrayPropagation.java b/FatTnt/src/me/asofold/bukkit/fattnt/propagation/ArrayPropagation.java index 46fc55d..84d8ddf 100644 --- a/FatTnt/src/me/asofold/bukkit/fattnt/propagation/ArrayPropagation.java +++ b/FatTnt/src/me/asofold/bukkit/fattnt/propagation/Array...
true
true
final void propagate(final World w, int x, int y, int z, int i, int dir, int mpl, float expStr){ // preparation: // TODO: also set these from the configuration. final int wyMin = w.getMaxHeight(); final int wyMax = 0; final int yMin; final int yMax; if (settings.confineEnabled){ yMin = settings.co...
final void propagate(final World w, int x, int y, int z, int i, int dir, int mpl, float expStr){ // preparation: // TODO: also set these from the configuration. final int wyMin = 0; final int wyMax = w.getMaxHeight(); final int yMin; final int yMax; if (settings.confineEnabled){ yMin = settings.co...
diff --git a/src/net/sf/freecol/common/model/UnitType.java b/src/net/sf/freecol/common/model/UnitType.java index d37025217..064103205 100644 --- a/src/net/sf/freecol/common/model/UnitType.java +++ b/src/net/sf/freecol/common/model/UnitType.java @@ -1,687 +1,687 @@ /** * Copyright (C) 2002-2007 The FreeCol Team *...
true
true
public void readFromXML(XMLStreamReader in, Specification specification) throws XMLStreamException { setId(in.getAttributeValue(null, "id")); offence = getAttribute(in, "offence", 0); defence = getAttribute(in, "defence", 1); movement = Integer.parseInt(in.getAttributeVal...
public void readFromXML(XMLStreamReader in, Specification specification) throws XMLStreamException { setId(in.getAttributeValue(null, "id")); offence = getAttribute(in, "offence", 0); defence = getAttribute(in, "defence", 1); movement = Integer.parseInt(in.getAttributeVal...
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/URLHyperlinkDetector.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/URLHyperlinkDetector.java index fa69c83d7..506533ec6 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/URLHyperlinkDetector.java +++ b/o...
true
true
public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) { if (region == null || textViewer == null) return null; IDocument document= textViewer.getDocument(); int offset= region.getOffset(); String urlString= null; if (document == null) return ...
public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) { if (region == null || textViewer == null) return null; IDocument document= textViewer.getDocument(); int offset= region.getOffset(); String urlString= null; if (document == null) return ...
diff --git a/AndroidAsync/src/com/koushikdutta/async/http/socketio/SocketIOConnection.java b/AndroidAsync/src/com/koushikdutta/async/http/socketio/SocketIOConnection.java index 7376220..f9799f3 100644 --- a/AndroidAsync/src/com/koushikdutta/async/http/socketio/SocketIOConnection.java +++ b/AndroidAsync/src/com/koushikd...
false
true
private void attach() { webSocket.setDataCallback(new NullDataCallback()); webSocket.setClosedCallback(new CompletedCallback() { @Override public void onCompleted(final Exception ex) { webSocket = null; reportDisconnect(ex); } ...
private void attach() { webSocket.setDataCallback(new NullDataCallback()); webSocket.setClosedCallback(new CompletedCallback() { @Override public void onCompleted(final Exception ex) { webSocket = null; reportDisconnect(ex); } ...
diff --git a/src/main/java/com/mozilla/bagheera/consumer/KafkaLoggerConsumer.java b/src/main/java/com/mozilla/bagheera/consumer/KafkaLoggerConsumer.java index ad9a85e..58de7ca 100644 --- a/src/main/java/com/mozilla/bagheera/consumer/KafkaLoggerConsumer.java +++ b/src/main/java/com/mozilla/bagheera/consumer/KafkaLoggerC...
true
true
public static void main(String[] args) { OptionFactory optFactory = OptionFactory.getInstance(); Options options = KafkaConsumer.getOptions(); options.addOption(optFactory.create("lv", "logvalues", false, "Log values.")); CommandLineParser parser = new GnuParser(); S...
public static void main(String[] args) { OptionFactory optFactory = OptionFactory.getInstance(); Options options = KafkaConsumer.getOptions(); options.addOption(optFactory.create("lv", "logvalues", false, "Log values.")); CommandLineParser parser = new GnuParser(); S...
diff --git a/openjdk/java/util/zip/InflaterHuffmanTree.java b/openjdk/java/util/zip/InflaterHuffmanTree.java index 9856aa36..74cb91ad 100644 --- a/openjdk/java/util/zip/InflaterHuffmanTree.java +++ b/openjdk/java/util/zip/InflaterHuffmanTree.java @@ -1,215 +1,220 @@ /* InflaterHuffmanTree.java -- Copyright (C) 200...
false
true
private void buildTree(byte[] codeLengths) throws DataFormatException { int[] blCount = new int[MAX_BITLEN+1]; int[] nextCode = new int[MAX_BITLEN+1]; for (int i = 0; i < codeLengths.length; i++) { int bits = codeLengths[i]; if (bits > 0) blCount[bits]++; } int...
private void buildTree(byte[] codeLengths) throws DataFormatException { int[] blCount = new int[MAX_BITLEN+1]; int[] nextCode = new int[MAX_BITLEN+1]; for (int i = 0; i < codeLengths.length; i++) { int bits = codeLengths[i]; if (bits > 0) blCount[bits]++; } int...
diff --git a/src/com/eteks/sweethome3d/swing/PlanComponent.java b/src/com/eteks/sweethome3d/swing/PlanComponent.java index dd8f089e..4584eae8 100644 --- a/src/com/eteks/sweethome3d/swing/PlanComponent.java +++ b/src/com/eteks/sweethome3d/swing/PlanComponent.java @@ -1,4723 +1,4723 @@ /* * PlanComponent.java 2 juin 2...
false
true
private void addModelListeners(Home home, final UserPreferences preferences, final PlanController controller) { // Add listener to update plan when furniture changes final PropertyChangeListener furnitureChangeListener = new PropertyChangeListener() { public void prop...
private void addModelListeners(Home home, final UserPreferences preferences, final PlanController controller) { // Add listener to update plan when furniture changes final PropertyChangeListener furnitureChangeListener = new PropertyChangeListener() { public void prop...
diff --git a/MobileLoggerServer/src/test/java/cs/wintoosa/controller/NetworkControllerTest.java b/MobileLoggerServer/src/test/java/cs/wintoosa/controller/NetworkControllerTest.java index e5f47cd..064a9cb 100644 --- a/MobileLoggerServer/src/test/java/cs/wintoosa/controller/NetworkControllerTest.java +++ b/MobileLoggerSe...
true
true
public void testPutNetworkLog() throws Exception { String jsondata = "{\"operator\":\"test\",\"phoneId\":\"123456789012345\",\"timestamp\":1361264436365,\"checksum\":\"foo\"}"; this.mockMvc.perform(put("/log/operator").contentType(MediaType.APPLICATION_JSON).content(jsondata)) ...
public void testPutNetworkLog() throws Exception { String jsondata = "{\"operator\":\"test\",\"phoneId\":\"123456789012345\",\"timestamp\":1361264436365,\"checksum\":\"foo\"}"; this.mockMvc.perform(put("/log/network").contentType(MediaType.APPLICATION_JSON).content(jsondata)) ...
diff --git a/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java b/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java index 473b7120..9e5139fc 100644 --- a/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java +++ b/core/src/com/google/zxing/pdf417/decoder/BitMatrixParser.java @@ -1,932 +1,...
true
true
int[] readCodewords() throws FormatException { int width = bitMatrix.getWidth(); int height = bitMatrix.getHeight(); erasures = new int[MAX_CW_CAPACITY]; // Get the number of pixels in a module across the X dimension //float moduleWidth = bitMatrix.getModuleWidth(); float moduleWidth = 1.0f;...
int[] readCodewords() throws FormatException { int width = bitMatrix.getWidth(); int height = bitMatrix.getHeight(); erasures = new int[MAX_CW_CAPACITY]; // Get the number of pixels in a module across the X dimension //float moduleWidth = bitMatrix.getModuleWidth(); float moduleWidth = 1.0f;...
diff --git a/app/controllers/DataHub.java b/app/controllers/DataHub.java index 6233733..e7c7c67 100644 --- a/app/controllers/DataHub.java +++ b/app/controllers/DataHub.java @@ -1,305 +1,305 @@ package controllers; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Array...
false
true
public static Result track() { response().setContentType( "image/png" ); InputStream outGifStream = Play.application().resourceAsStream("/public/images/site/blank.png"); Form<TrackRequest> req = form( TrackRequest.class ).bindFromRequest(); if( req.hasErrors() ) return badRequest( outGifStream ); Trac...
public static Result track() { response().setContentType( "image/png" ); InputStream outGifStream = Play.application().resourceAsStream("/public/images/site/blank.png"); Form<TrackRequest> req = form( TrackRequest.class ).bindFromRequest(); if( req.hasErrors() ) return badRequest( outGifStream ); Trac...
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageMarkupRendererImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageMarkupRendererImpl.java index 01b9bd616..bff7fd78b 100644 --- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageMark...
true
true
public void renderPageMarkup(Page page, MarkupWriter writer) { // This is why the PRQ is scope perthread; we tell it what to render here ... pageRenderQueue.initializeForCompletePage(page); // ... then our statically fixed pipeline is able to (eventually) call into it. markupR...
public void renderPageMarkup(Page page, MarkupWriter writer) { // This is why the PRQ is scope perthread; we tell it what to render here ... pageRenderQueue.initializeForCompletePage(page); // ... then our statically fixed pipeline is able to (eventually) call into it. markupR...
diff --git a/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java index d133d9678..6bc1e31fe 100755 --- a/mifosng-provider/src/...
true
true
public Page<JournalEntryData> retrieveAll(final SearchParameters searchParameters, final Long glAccountId, final Boolean onlyManualEntries, final Date fromDate, final Date toDate, final String transactionId, final Integer entityType) { final StringBuilder sqlBuilder = new StringBuilder(200); ...
public Page<JournalEntryData> retrieveAll(final SearchParameters searchParameters, final Long glAccountId, final Boolean onlyManualEntries, final Date fromDate, final Date toDate, final String transactionId, final Integer entityType) { final StringBuilder sqlBuilder = new StringBuilder(200); ...
diff --git a/wicket-contrib-dojo/src/main/java/org/wicketstuff/dojo/AbstractDefaultDojoBehavior.java b/wicket-contrib-dojo/src/main/java/org/wicketstuff/dojo/AbstractDefaultDojoBehavior.java index eee225d04..8fb367171 100644 --- a/wicket-contrib-dojo/src/main/java/org/wicketstuff/dojo/AbstractDefaultDojoBehavior.java +...
false
true
public void renderHead(IHeaderResponse response) { super.renderHead(response); // enable dojo debug if our configuration type is DEVELOPMENT final String configurationType = Application.get().getConfigurationType(); if (configurationType.equalsIgnoreCase(Application.DEVELOPMENT)) { StringBuffer debugScrip...
public void renderHead(IHeaderResponse response) { super.renderHead(response); // enable dojo debug if our configuration type is DEVELOPMENT final String configurationType = Application.get().getConfigurationType(); if (configurationType.equalsIgnoreCase(Application.DEVELOPMENT)) { StringBuffer debugScrip...
diff --git a/src/main/java/com/asf/wicket/pivot/web/PivotTable.java b/src/main/java/com/asf/wicket/pivot/web/PivotTable.java index 2c47227..3664fdc 100644 --- a/src/main/java/com/asf/wicket/pivot/web/PivotTable.java +++ b/src/main/java/com/asf/wicket/pivot/web/PivotTable.java @@ -1,236 +1,236 @@ /* * Copyright 2012 ...
false
true
public PivotTable(String id, PivotModel pivotModel) { super(id); List<PivotField> columnFields = pivotModel.getFields(PivotField.Area.COLUMN); List<PivotField> rowFields = pivotModel.getFields(PivotField.Area.ROW); List<PivotField> dataFields = pivotModel.getFields(PivotField.Area.DATA); List<List<Obje...
public PivotTable(String id, PivotModel pivotModel) { super(id); List<PivotField> columnFields = pivotModel.getFields(PivotField.Area.COLUMN); List<PivotField> rowFields = pivotModel.getFields(PivotField.Area.ROW); List<PivotField> dataFields = pivotModel.getFields(PivotField.Area.DATA); List<List<Obje...
diff --git a/Aufgabe1/src/informatik/hawhamburg/teamnahme/AssociationHashMap.java b/Aufgabe1/src/informatik/hawhamburg/teamnahme/AssociationHashMap.java index b1ac3d8..dc9c61f 100644 --- a/Aufgabe1/src/informatik/hawhamburg/teamnahme/AssociationHashMap.java +++ b/Aufgabe1/src/informatik/hawhamburg/teamnahme/Association...
true
true
public Iterator<E> iterator() { return new Iterator<E>() { protected int readCursor = 0; protected P[] pa = (P[]) AssociationHashMap.this.storage.keySet().toArray(); @Override public boolean hasNext() { return pa.length >= readCursor; ...
public Iterator<E> iterator() { return new Iterator<E>() { protected int readCursor = 0; protected P[] pa = (P[]) AssociationHashMap.this.storage.keySet().toArray(); @Override public boolean hasNext() { return pa.length != readCursor; ...
diff --git a/uk.ac.diamond.scisoft.analysis/test/uk/ac/diamond/scisoft/analysis/diffraction/DSpacingTest.java b/uk.ac.diamond.scisoft.analysis/test/uk/ac/diamond/scisoft/analysis/diffraction/DSpacingTest.java index 5df851789..415372cd4 100644 --- a/uk.ac.diamond.scisoft.analysis/test/uk/ac/diamond/scisoft/analysis/diff...
false
true
public void testEllipses() { DiffractionCrystalEnvironment env = new DiffractionCrystalEnvironment(0.5); DetectorProperties det = DetectorProperties.getDefaultDetectorProperties(new int[] {100, 100}); ROIBase roi = DSpacing.conicFromDSpacing(det, env, 1); EllipticalROI eroi = (EllipticalROI) roi; Assert.ass...
public void testEllipses() { DiffractionCrystalEnvironment env = new DiffractionCrystalEnvironment(0.5); DetectorProperties det = DetectorProperties.getDefaultDetectorProperties(new int[] {100, 100}); ROIBase roi = DSpacing.conicFromDSpacing(det, env, 1); EllipticalROI eroi = (EllipticalROI) roi; Assert.ass...
diff --git a/src/main/java/tconstruct/util/EnvironmentChecks.java b/src/main/java/tconstruct/util/EnvironmentChecks.java index c950f98fb..96b185c6f 100644 --- a/src/main/java/tconstruct/util/EnvironmentChecks.java +++ b/src/main/java/tconstruct/util/EnvironmentChecks.java @@ -1,74 +1,74 @@ package tconstruct.util; ...
false
true
public static void verifyEnvironmentSanity () { List<String> modIds = new ArrayList<String>(); if (Loader.isModLoaded("gregtech_addon")) { TConstruct.logger.error("Tinkers' Construct and GregTech are incompatible for the following reasons:"); TConstruct.logger.er...
public static void verifyEnvironmentSanity () { List<String> modIds = new ArrayList<String>(); if (Loader.isModLoaded("gregtech")) { TConstruct.logger.error("Tinkers' Construct and GregTech are incompatible for the following reasons:"); TConstruct.logger.error(mo...
diff --git a/src/main/de/Lathanael/Commands/Attaint.java b/src/main/de/Lathanael/Commands/Attaint.java index e66b666..dd87636 100644 --- a/src/main/de/Lathanael/Commands/Attaint.java +++ b/src/main/de/Lathanael/Commands/Attaint.java @@ -1,110 +1,112 @@ /*****************************************************************...
false
true
public void execute(CommandSender sender, CommandArgs args) { Player target; String name = ""; if (FunCommands.players.containsKey(args.getString(0))) name = FunCommands.players.get(args.getString(0)).getName(); else name = args.getString(0); target = Utils.getUser(sender, name, permNode, true); if (...
public void execute(CommandSender sender, CommandArgs args) { Player target; String name = ""; CommandArgs newArgs; if (FunCommands.players.containsKey(args.getString(0))) name = FunCommands.players.get(args.getString(0)).getName(); else name = args.getString(0); newArgs = new CommandArgs(name); ta...
diff --git a/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/ui/TaskListInterestFilter.java b/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/ui/TaskListInterestFilter.java index 5651e9009..dd195fc1e 100644 --- a/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/ui/TaskListInterestFilt...
true
true
public boolean select(Viewer viewer, Object parent, Object element) { try { if (!(viewer instanceof StructuredViewer)) return true; if (!containsMylarInterestFilter((StructuredViewer) viewer)) return true; IMylarElement node = null; if (element instanceof IMylarElement) { node = (IMylarEleme...
public boolean select(Viewer viewer, Object parent, Object element) { try { if (!(viewer instanceof StructuredViewer)) return true; if (!containsMylarInterestFilter((StructuredViewer) viewer)) return true; IMylarElement node = null; if (element instanceof IMylarElement) { node = (IMylarEleme...
diff --git a/apps/test/app/controllers/EnvioMailsController.java b/apps/test/app/controllers/EnvioMailsController.java index b1dd48e6..e8d5cab8 100644 --- a/apps/test/app/controllers/EnvioMailsController.java +++ b/apps/test/app/controllers/EnvioMailsController.java @@ -1,36 +1,41 @@ package controllers; import jav...
true
true
public static void enviarMail(Long idSolicitud, String enviarBoton) { checkAuthenticity(); if (!permisoEnviarMail("editar")) { Messages.error("No tiene permisos suficientes para realizar la acción"); } Solicitud dbSolicitud = EnvioMailsController.getSolicitud(idSolicitud); if (!Messages.hasErrors()) { ...
public static void enviarMail(Long idSolicitud, String enviarBoton) { checkAuthenticity(); if (!permisoEnviarMail("editar")) { Messages.error("No tiene permisos suficientes para realizar la acción"); } Solicitud dbSolicitud = EnvioMailsController.getSolicitud(idSolicitud); if (!Messages.hasErrors()) { ...
diff --git a/src/core/org/apache/hadoop/util/RunJar.java b/src/core/org/apache/hadoop/util/RunJar.java index a7a8c9579..b18b2e9ba 100644 --- a/src/core/org/apache/hadoop/util/RunJar.java +++ b/src/core/org/apache/hadoop/util/RunJar.java @@ -1,162 +1,166 @@ /** * Licensed to the Apache Software Foundation (ASF) under...
true
true
public static void main(String[] args) throws Throwable { String usage = "RunJar jarFile [mainClass] args..."; if (args.length < 1) { System.err.println(usage); System.exit(-1); } int firstArg = 0; String fileName = args[firstArg++]; File file = new File(fileName); String mai...
public static void main(String[] args) throws Throwable { String usage = "RunJar jarFile [mainClass] args..."; if (args.length < 1) { System.err.println(usage); System.exit(-1); } int firstArg = 0; String fileName = args[firstArg++]; File file = new File(fileName); if (!file....
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/AlterTopic.java b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/AlterTopic.java index 29033b35e..ad3fc7d51 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/AlterTopic.java +++ b/gerrit-server...
true
true
public ReviewResult call() throws EmailException, InvalidChangeOperationException, NoSuchChangeException, OrmException { final ChangeControl control = changeControlFactory.validateFor(changeId); final ReviewResult result = new ReviewResult(); result.setChangeId(changeId); if (!control.canAddPat...
public ReviewResult call() throws EmailException, InvalidChangeOperationException, NoSuchChangeException, OrmException { final ChangeControl control = changeControlFactory.validateFor(changeId); final ReviewResult result = new ReviewResult(); result.setChangeId(changeId); if (!control.canAddPat...
diff --git a/src/indaprojekt/General.java b/src/indaprojekt/General.java index 2db0c75..fd00463 100644 --- a/src/indaprojekt/General.java +++ b/src/indaprojekt/General.java @@ -1,22 +1,30 @@ package indaprojekt; /** * A class for things of general usefulness * */ public class General { /** * Moves <co...
false
true
public static float towardsZero(float a, float b) { if (a < 0) { return a + b; } else if (a > 0) { return a - b; } else { return a; } }
public static float towardsZero(float a, float b) { if (a < 0) { if (a + b > 0) { return 0; } else { return a + b; } } else if (a > 0) { if (a - b < 0) { return 0; } else { return a - b; } } else { return a; } }
diff --git a/src/Unbxd.java b/src/Unbxd.java index 3ce10e5..e4315f0 100644 --- a/src/Unbxd.java +++ b/src/Unbxd.java @@ -1,225 +1,225 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.L...
false
true
public void ask(){ if(status == STATES.WHAT_TO_DO){ System.out.println("What do you want to do?"); System.out.println("1) Look for products matching a search string"); System.out.println("2) Look for search strings matching an artist"); System.out.println("Q) Quit"); String input = in.nextLine(); ...
public void ask(){ if(status == STATES.WHAT_TO_DO){ System.out.println("What do you want to do?"); System.out.println("1) Look for products matching a search string"); System.out.println("2) Look for search strings matching an artist"); System.out.println("Q) Quit"); String input = in.nextLine(); ...
diff --git a/java/src/main/java/com/nedap/retail/api/v1/tester/App.java b/java/src/main/java/com/nedap/retail/api/v1/tester/App.java index 2451188..956cae5 100644 --- a/java/src/main/java/com/nedap/retail/api/v1/tester/App.java +++ b/java/src/main/java/com/nedap/retail/api/v1/tester/App.java @@ -1,552 +1,553 @@ packag...
true
true
public static void main(String[] args) { System.out.println("Store !D API tester for !D Top and !D Gate"); if (args.length==0) { System.out.println("Please use URL of device as parameter, for example: http://localhost:8081"); System.out.println("Optionally, y...
public static void main(String[] args) { System.out.println("Store !D API tester for !D Top and !D Gate"); if (args.length==0) { System.out.println("Please use URL of device as parameter, for example: http://localhost:8081"); System.out.println("Optionally, y...
diff --git a/hw6/src/site/Quiz.java b/hw6/src/site/Quiz.java index 1e80d74..9718429 100644 --- a/hw6/src/site/Quiz.java +++ b/hw6/src/site/Quiz.java @@ -1,281 +1,272 @@ package site; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; import java.util.A...
false
true
public void populateQuiz() { try{ Connection con = (Connection) MyDB.getConnection(); Connection con2 = (Connection) MyDB.getConnection(); Statement stmt = con.createStatement(); Statement stmt2 = con2.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM questions WHERE quiz_id="+quiz_id...
public void populateQuiz() { try{ Connection con = (Connection) MyDB.getConnection(); Connection con2 = (Connection) MyDB.getConnection(); Statement stmt = con.createStatement(); Statement stmt2 = con2.createStatement(); ResultSet rs = stmt.executeQuery("SELECT * FROM questions WHERE quiz_id="+quiz_id...
diff --git a/src/dk/dbc/opensearch/plugins/IndexerXSEM.java b/src/dk/dbc/opensearch/plugins/IndexerXSEM.java index de18d09d..87f3d33f 100644 --- a/src/dk/dbc/opensearch/plugins/IndexerXSEM.java +++ b/src/dk/dbc/opensearch/plugins/IndexerXSEM.java @@ -1,316 +1,317 @@ /** * \file IndexerXSEM.java * \brief Indexing u...
false
true
private long getProcessTime( CompassSession session, CargoContainer cc, String fedoraHandle, IEstimate estimate ) throws PluginException, CompassException, ConfigurationException { long processTime = 0; Date finishTime = new Date(); /* \todo: right now we index all stream in a cc with t...
private long getProcessTime( CompassSession session, CargoContainer cc, String fedoraHandle, IEstimate estimate ) throws PluginException, CompassException, ConfigurationException { long processTime = 0; Date finishTime = new Date(); /* \todo: right now we index all stream in a cc with t...
diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java index 3b4bdeb6a..8fe9485bd 100644 --- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/Com...
false
true
public EList<Diff> getDifferences(EObject element) { if (element == null) { return new BasicEList<Diff>(); } if (diffCrossReferencer == null) { diffCrossReferencer = new DiffCrossReferencer(); eAdapters().add(diffCrossReferencer); } final Match match = getMatch(element); if (match != null) { ...
public EList<Diff> getDifferences(EObject element) { if (element == null) { return new BasicEList<Diff>(); } if (diffCrossReferencer == null) { diffCrossReferencer = new DiffCrossReferencer(); eAdapters().add(diffCrossReferencer); } Iterable<Diff> diffOnElement = filter(getInverse(element, diffCro...
diff --git a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/PatchSetContentRemoteFactory.java b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/PatchSetContentRemoteFactory.java index 7688074f..b0e8b58e 100644 --- a/org.eclipse.mylyn.gerrit.core/src/org/e...
true
true
public List<IFileItem> createModel(IReviewItemSet set, PatchSetContent content) { List<IFileItem> items = set.getItems(); for (Patch patch : content.getTargetDetail().getPatches()) { String targetId = patch.getKey().toString(); String sourceFileName = (patch.getSourceFileName() != null) ? patch.getSourc...
public List<IFileItem> createModel(IReviewItemSet set, PatchSetContent content) { List<IFileItem> items = set.getItems(); if (!items.isEmpty()) { return items; } for (Patch patch : content.getTargetDetail().getPatches()) { String targetId = patch.getKey().toString(); String sourceFileName = (patch.get...
diff --git a/bootstrap/WyvernCompiler/src/compiler/Context.java b/bootstrap/WyvernCompiler/src/compiler/Context.java index a052927..a25c8b6 100644 --- a/bootstrap/WyvernCompiler/src/compiler/Context.java +++ b/bootstrap/WyvernCompiler/src/compiler/Context.java @@ -1,308 +1,314 @@ /** * */ package compiler; im...
false
true
private SymbolType createNonTerminalSymbolType(final String name) { return new SymbolType() { @Override public Context context() { return Context.this; } @Override public String name() { return name; } @Override public boolean isTerminal() { return false; } @Override ...
private SymbolType createNonTerminalSymbolType(final String name) { return new SymbolType() { @Override public Context context() { return Context.this; } @Override public String name() { return name; } @Override public boolean isTerminal() { return false; } @Override ...
diff --git a/cotrix/cotrix-application/src/main/java/org/cotrix/application/changelog/ChangelogManager.java b/cotrix/cotrix-application/src/main/java/org/cotrix/application/changelog/ChangelogManager.java index edb565f1..c0b964ab 100644 --- a/cotrix/cotrix-application/src/main/java/org/cotrix/application/changelog/Chan...
false
true
private void trackBulk(Codelist.Private list) { //this seems coarse: any bulk change triggers a full traversal //in practice we do expect shared defs to occur in most-to-all codes. //even if the impacted codes were a few, how much overhead would we be adding to the //traversal required underneatah to find ...
private void trackBulk(Codelist.Private list) { //this seems coarse: any bulk change triggers a full traversal //in practice we do expect shared defs to occur in most-to-all codes. //even if the impacted codes were a few, how much overhead would we be adding to the //traversal required underneatah to find ...
diff --git a/sch-pek-web/src/main/java/hu/sch/web/common/PekPage.java b/sch-pek-web/src/main/java/hu/sch/web/common/PekPage.java index a7099375..abb93651 100644 --- a/sch-pek-web/src/main/java/hu/sch/web/common/PekPage.java +++ b/sch-pek-web/src/main/java/hu/sch/web/common/PekPage.java @@ -1,180 +1,181 @@ /** * Copy...
true
true
private void init() { add(titleLabel = new Label("title", getTitle())); add(navbarScript = new Label("navbarScript")); createNavbarWithSupportId(32); navbarScript.setEscapeModelStrings(false); // do not HTML escape JavaScript code add(new WebComponent("css").add( ...
private void init() { add(titleLabel = new Label("title", getTitle())); add(navbarScript = new Label("navbarScript")); createNavbarWithSupportId(32); navbarScript.setEscapeModelStrings(false); // do not HTML escape JavaScript code add(new WebComponent("css").add( ...
diff --git a/JsTestDriver/src-test/com/google/jstestdriver/ConfigurationParserTest.java b/JsTestDriver/src-test/com/google/jstestdriver/ConfigurationParserTest.java index 52fbc65..8b88e7e 100644 --- a/JsTestDriver/src-test/com/google/jstestdriver/ConfigurationParserTest.java +++ b/JsTestDriver/src-test/com/google/jstes...
true
true
public void testParseConfigFileAndHaveListOfFiles() throws Exception { File tmpDir = File.createTempFile("test", "JsTestDriver", new File(System.getProperty("java.io.tmpdir"))); tmpDir.delete(); tmpDir.mkdir(); tmpDir.deleteOnExit(); File codeDir = new File(tmpDir, "code"); File testDir...
public void testParseConfigFileAndHaveListOfFiles() throws Exception { File tmpDir = File.createTempFile("test", "JsTestDriver", new File(System.getProperty("java.io.tmpdir"))); tmpDir.delete(); tmpDir.mkdir(); tmpDir.deleteOnExit(); File codeDir = new File(tmpDir, "code"); File testDir...
diff --git a/src/main/java/com/jiekebo/scjp/Boxing.java b/src/main/java/com/jiekebo/scjp/Boxing.java index fb7f0e4..1d31b17 100644 --- a/src/main/java/com/jiekebo/scjp/Boxing.java +++ b/src/main/java/com/jiekebo/scjp/Boxing.java @@ -1,39 +1,39 @@ package com.jiekebo.scjp; public class Boxing { public static vo...
true
true
public static void main(String[] args ) { // Widen and box byte b = 5; increase(b); // varargs int i = 1; overload(i); Integer test = 10; Object o = test; String[] testArray = new String[3]; int size = testArray.length; System.out.println(size); String testString = "abcdefg"; System.out.pr...
public static void main(String[] args ) { // Widen and box byte b = 5; increase(b); // varargs int i = 1; //overload(i); Integer test = 10; Object o = test; String[] testArray = new String[3]; int size = testArray.length; System.out.println(size); String testString = "abcdefg"; System.out....
diff --git a/vertx-platform/src/main/java/org/vertx/java/platform/impl/java/CompilingClassLoader.java b/vertx-platform/src/main/java/org/vertx/java/platform/impl/java/CompilingClassLoader.java index 0cba4ce5e..91443c5bd 100644 --- a/vertx-platform/src/main/java/org/vertx/java/platform/impl/java/CompilingClassLoader.jav...
true
true
public CompilingClassLoader(ClassLoader loader, String sourceName) { super(loader); URL resource = getResource(sourceName); if(resource == null) { throw new RuntimeException("Resource not found: " + sourceName); } //Need to urldecode it too, since bug in JDK URL class which does not url deco...
public CompilingClassLoader(ClassLoader loader, String sourceName) { super(loader); URL resource = getResource(sourceName); if(resource == null) { throw new RuntimeException("Resource not found: " + sourceName); } //Need to urldecode it too, since bug in JDK URL class which does not url deco...
diff --git a/resilience/src/au/com/dius/resilience/persistence/repository/impl/ParseIncidentRepository.java b/resilience/src/au/com/dius/resilience/persistence/repository/impl/ParseIncidentRepository.java index f009ada..d69ab30 100644 --- a/resilience/src/au/com/dius/resilience/persistence/repository/impl/ParseIncident...
false
true
public void save(final RepositoryCommandResultListener<Incident> listener, final Incident incident) { AsyncTask.execute(new Runnable() { @Override public void run() { final ParseObject parseObject = ParseObject.createWithoutData(Constants.TABLE_INCIDENT, incident.getId()); try { ...
public void save(final RepositoryCommandResultListener<Incident> listener, final Incident incident) { AsyncTask.execute(new Runnable() { @Override public void run() { final ParseObject parseObject = ParseObject.createWithoutData(Constants.TABLE_INCIDENT, incident.getId()); try { ...
diff --git a/src/fitnesse/wikitext/parser/Collapsible.java b/src/fitnesse/wikitext/parser/Collapsible.java index f233d98f9..acabc8b3a 100644 --- a/src/fitnesse/wikitext/parser/Collapsible.java +++ b/src/fitnesse/wikitext/parser/Collapsible.java @@ -1,102 +1,102 @@ package fitnesse.wikitext.parser; import fitnesse.h...
true
true
public static String generateHtml(String state, String titleText, String bodyText) { long id = nextId++; HtmlTag outerBlock = new HtmlTag("div"); outerBlock.addAttribute("class", "collapse_rim"); HtmlTag floatRight = new HtmlTag("div"); floatRight.addAttribute("style", "float...
public static String generateHtml(String state, String titleText, String bodyText) { long id = nextId++; HtmlTag outerBlock = new HtmlTag("div"); outerBlock.addAttribute("class", "collapse_rim"); HtmlTag floatRight = new HtmlTag("div"); floatRight.addAttribute("style", "float...
diff --git a/src/com/jidesoft/plaf/LookAndFeelFactory.java b/src/com/jidesoft/plaf/LookAndFeelFactory.java index 8519b8fc..c171c27b 100644 --- a/src/com/jidesoft/plaf/LookAndFeelFactory.java +++ b/src/com/jidesoft/plaf/LookAndFeelFactory.java @@ -1,1697 +1,1698 @@ /* * @(#)LookAndFeelFactory.java 5/28/2005 * * C...
true
true
public void customize(UIDefaults defaults) { try { Class syntheticaClass = Class.forName(SYNTHETICA_LNF); Class syntheticaFrameBorder = Class.forName("com.jidesoft.plaf.synthetica.SyntheticaFrameBorder"); Class syntheticaPopupBorder = Class.forName("co...
public void customize(UIDefaults defaults) { try { Class syntheticaClass = Class.forName(SYNTHETICA_LNF); Class syntheticaFrameBorder = Class.forName("com.jidesoft.plaf.synthetica.SyntheticaFrameBorder"); Class syntheticaPopupBorder = Class.forName("co...
diff --git a/dspace/src/org/dspace/administer/DCType.java b/dspace/src/org/dspace/administer/DCType.java index ecc7c4b36..2a4672a0c 100644 --- a/dspace/src/org/dspace/administer/DCType.java +++ b/dspace/src/org/dspace/administer/DCType.java @@ -1,295 +1,295 @@ /* * DCType.java * * Version: $Revision$ * * Dat...
false
true
public static DCType findByElement(Context context, String element, String qualifier) throws SQLException { String sql = "SELECT * FROM dctyperegistry WHERE element LIKE \"" + element + "\" AND qualifier"; if (qualifier==null) { sql = sql ...
public static DCType findByElement(Context context, String element, String qualifier) throws SQLException { String sql = "SELECT * FROM dctyperegistry WHERE element LIKE '" + element + "' AND qualifier"; if (qualifier == null) { sql = sql ...
diff --git a/TurnBased/src/inf1/oop/turnbased/TurnBasedGame.java b/TurnBased/src/inf1/oop/turnbased/TurnBasedGame.java index 767db83..e9da5ad 100644 --- a/TurnBased/src/inf1/oop/turnbased/TurnBasedGame.java +++ b/TurnBased/src/inf1/oop/turnbased/TurnBasedGame.java @@ -1,67 +1,67 @@ package inf1.oop.turnbased; impor...
true
true
public void create() { float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); camera = new OrthographicCamera(1, h/w); batch = new SpriteBatch(); texture = new Texture(Gdx.files.internal("data/libgdx.png")); texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); Texture...
public void create() { float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); camera = new OrthographicCamera(1, h/w); batch = new SpriteBatch(); texture = new Texture(Gdx.files.internal("assets/data/libgdx.png")); texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); ...
diff --git a/osmorc/src/org/osmorc/OsmorcModuleComponent.java b/osmorc/src/org/osmorc/OsmorcModuleComponent.java index 0054dc756b..088759223c 100644 --- a/osmorc/src/org/osmorc/OsmorcModuleComponent.java +++ b/osmorc/src/org/osmorc/OsmorcModuleComponent.java @@ -1,190 +1,194 @@ /* * Copyright (c) 2007-2009, Osmorc D...
true
true
private void updateModuleDependencyIndex() { myApplication.invokeLater(new Runnable() { public void run() { ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (indicator != null) { indicator.setText("Updating OSGi dependency index for module '" +...
private void updateModuleDependencyIndex() { myApplication.invokeLater(new Runnable() { public void run() { // Fix for EA-23251 if ( myModule.isDisposed() ) { return; } ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (i...
diff --git a/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java b/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java index 0443cdc3..b903932e 100644 --- a/src/com/android/email/activity/setup/AccountSetupOutgoingFragment.java +++ b/src/com/android/email/activity/setup/AccountSetu...
true
true
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) { Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onCreateView"); } int layoutId = mSettingsMode ? R.la...
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (Logging.DEBUG_LIFECYCLE && Email.DEBUG) { Log.d(Logging.LOG_TAG, "AccountSetupOutgoingFragment onCreateView"); } int layoutId = mSettingsMode ? R.la...