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/classpath/java/lang/Runtime.java b/classpath/java/lang/Runtime.java index 341d0ed1..a59339bf 100644 --- a/classpath/java/lang/Runtime.java +++ b/classpath/java/lang/Runtime.java @@ -1,170 +1,170 @@ /* Copyright (c) 2008-2009, Avian Contributors Permission to use, copy, modify, and/or distribute this...
true
true
public MyProcess exec(final String[] command) { final MyProcess[] process = new MyProcess[1]; final Throwable[] exception = new Throwable[1]; synchronized (process) { Thread t = new Thread() { public void run() { synchronized (process) { try { lon...
public Process exec(final String[] command) { final MyProcess[] process = new MyProcess[1]; final Throwable[] exception = new Throwable[1]; synchronized (process) { Thread t = new Thread() { public void run() { synchronized (process) { try { long[...
diff --git a/cruisecontrol/main/src/net/sourceforge/cruisecontrol/util/OSEnvironment.java b/cruisecontrol/main/src/net/sourceforge/cruisecontrol/util/OSEnvironment.java index f0ce96af..25d24f56 100644 --- a/cruisecontrol/main/src/net/sourceforge/cruisecontrol/util/OSEnvironment.java +++ b/cruisecontrol/main/src/net/sou...
true
true
private final void parse() { String command; // Detemine the correct command to run based on OS name String os = System.getProperty("os.name").toLowerCase(); if (os.indexOf("windows 9") > -1) { command = "command.com /c set"; } else if ( (os.indexOf(...
private final void parse() { String command; // Detemine the correct command to run based on OS name String os = System.getProperty("os.name").toLowerCase(); if (os.indexOf("windows 9") > -1) { command = "command.com /c set"; } else if ( (os.indexOf(...
diff --git a/src/itschess/Evaluation.java b/src/itschess/Evaluation.java index 92c79fb..7dc7cb2 100644 --- a/src/itschess/Evaluation.java +++ b/src/itschess/Evaluation.java @@ -1,205 +1,205 @@ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package itschess; /...
false
true
public static double eval(Board chessboard){ byte[][] board = chessboard.board; double k = 0; double kb = 0; double q =0; double qb = 0; double r =0; double rb = 0; double b =0; double bb = 0; double n =0; double nb = 0...
public static double eval(Board chessboard){ byte[][] board = chessboard.board; double k = 0; double kb = 0; double q =0; double qb = 0; double r =0; double rb = 0; double b =0; double bb = 0; double n =0; double nb = 0...
diff --git a/src/main/java/com/freeroom/projectci/beans/ReportService.java b/src/main/java/com/freeroom/projectci/beans/ReportService.java index fc23765..5f52f83 100644 --- a/src/main/java/com/freeroom/projectci/beans/ReportService.java +++ b/src/main/java/com/freeroom/projectci/beans/ReportService.java @@ -1,76 +1,76 ...
true
true
public String utilityData() { final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyyMMdd"); final DateTime yesterday = new DateTime().minusDays(1); DateTime date = new DateTime(2014, 4, 15, 0, 0, 0); System.out.println(">>>>>>>>>>>>>> 1111111111111111"); final ...
public String utilityData() { final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyyMMdd"); final DateTime yesterday = new DateTime().minusDays(1); DateTime date = new DateTime(2014, 4, 15, 0, 0, 0); System.out.println(">>>>>>>>>>>>>> 1111111111111111"); final ...
diff --git a/fritzing/Fritzing.diagram/src/org/fritzing/fritzing/diagram/part/FritzingPCBExportAction.java b/fritzing/Fritzing.diagram/src/org/fritzing/fritzing/diagram/part/FritzingPCBExportAction.java index 2ee0c3ec8..bf4eff940 100644 --- a/fritzing/Fritzing.diagram/src/org/fritzing/fritzing/diagram/part/FritzingPCBE...
false
true
public void run(IAction action) { // STEP 1: create Eagle script file from Fritzing files // use currently active diagram IDiagramGraphicalViewer viewer = FritzingDiagramEditorUtil.getActiveDiagramEditor() .getDiagramGraphicalViewer(); String script = Fritzing2Eagle.createEagleScript(viewer); /...
public void run(IAction action) { // STEP 1: create Eagle script file from Fritzing files // use currently active diagram IDiagramGraphicalViewer viewer = FritzingDiagramEditorUtil.getActiveDiagramEditor() .getDiagramGraphicalViewer(); String script = Fritzing2Eagle.createEagleScript(viewer); /...
diff --git a/src/me/sacnoth/bottledexp/BottledExpCommandExecutor.java b/src/me/sacnoth/bottledexp/BottledExpCommandExecutor.java index 16b1877..7c35dd0 100644 --- a/src/me/sacnoth/bottledexp/BottledExpCommandExecutor.java +++ b/src/me/sacnoth/bottledexp/BottledExpCommandExecutor.java @@ -1,62 +1,67 @@ package me.sacno...
true
true
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { if ((sender instanceof Player)) { if (cmd.getName().equalsIgnoreCase("bottle")) { Player player = (Player) sender; int currentxp = player.getTotalExperience(); if (args.length == 0) { sender.send...
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { if ((sender instanceof Player)) { if (cmd.getName().equalsIgnoreCase("bottle")) { Player player = (Player) sender; int currentxp = player.getTotalExperience(); if (args.length == 0) { sender.send...
diff --git a/src/PackageInfo/QueryProperties.java b/src/PackageInfo/QueryProperties.java index 38eb473..6bdc342 100644 --- a/src/PackageInfo/QueryProperties.java +++ b/src/PackageInfo/QueryProperties.java @@ -1,132 +1,138 @@ /* * $RCSfile$ * * Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. * ...
true
true
public static void main(String[] args) { VirtualUniverse vu = new VirtualUniverse(); Map vuMap = vu.getProperties(); System.out.println("version = " + vuMap.get("j3d.version")); System.out.println("vendor = " + vuMap.get("j3d.vendor")); System.out.println("specification.version = " + ...
public static void main(String[] args) { VirtualUniverse vu = new VirtualUniverse(); Map vuMap = vu.getProperties(); System.out.println("version = " + vuMap.get("j3d.version")); System.out.println("vendor = " + vuMap.get("j3d.vendor")); System.out.println("specification.version = " + ...
diff --git a/src/main/java/si/mazi/rescu/HttpTemplate.java b/src/main/java/si/mazi/rescu/HttpTemplate.java index a2336c2..3fcb44b 100644 --- a/src/main/java/si/mazi/rescu/HttpTemplate.java +++ b/src/main/java/si/mazi/rescu/HttpTemplate.java @@ -1,267 +1,268 @@ /** * Copyright (C) 2012 - 2013 Xeiam LLC http://xeiam.c...
false
true
public <T> T executeRequest(String urlString, Class<T> returnType, String requestBody, Map<String, String> httpHeaders, HttpMethod method, String contentType, Class<? extends RuntimeException> exceptionType) { log.debug("Executing {} request at {}", method, urlString); log.trace("Request body = {}"...
public <T> T executeRequest(String urlString, Class<T> returnType, String requestBody, Map<String, String> httpHeaders, HttpMethod method, String contentType, Class<? extends RuntimeException> exceptionType) { log.debug("Executing {} request at {}", method, urlString); log.trace("Request body = {}"...
diff --git a/src/org/encog/neural/networks/training/strategy/RequiredImprovementStrategy.java b/src/org/encog/neural/networks/training/strategy/RequiredImprovementStrategy.java index 167f08b52..ca78492db 100644 --- a/src/org/encog/neural/networks/training/strategy/RequiredImprovementStrategy.java +++ b/src/org/encog/ne...
true
true
public void preIteration() { if (train.getError() > this.acceptableThreshold) { if (!Double.isNaN(lastError)) { double improve = (lastError - train.getError()); if (improve < this.required) { this.badCycleCount++; if (this.badCycleCount > this.cycles) { if (this.logger.isDebugEnabled()) {...
public void preIteration() { if (train.getError() > this.acceptableThreshold) { if (!Double.isNaN(lastError)) { double improve = (lastError - train.getError()); if (improve < this.required) { this.badCycleCount++; if (this.badCycleCount > this.cycles) { if (this.logger.isDebugEnabled()) {...
diff --git a/src/main/java/com/radiadesign/catalina/session/RedisSession.java b/src/main/java/com/radiadesign/catalina/session/RedisSession.java index 8781134..9189bc8 100644 --- a/src/main/java/com/radiadesign/catalina/session/RedisSession.java +++ b/src/main/java/com/radiadesign/catalina/session/RedisSession.java @@ ...
true
true
public void setAttribute(String key, Object value) { if (manualDirtyTrackingSupportEnabled && manualDirtyTrackingAttributeKey.equals(key)) { dirty = true; return; } Object oldValue = getAttribute(key); if ( value == null && oldValue != null || oldValue == null && value != null ...
public void setAttribute(String key, Object value) { if (manualDirtyTrackingSupportEnabled && manualDirtyTrackingAttributeKey.equals(key)) { dirty = true; return; } Object oldValue = getAttribute(key); if ( (value != null || oldValue != null) && ( value == null && oldValue != nul...
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java b/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java index 2e3e024a..456a77c3 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtpaccept.java +++ b/Essentials/src/com/earth2me/essentials/commands/Comman...
true
true
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { final User target = user.getTeleportRequest(); if (target == null || target.getBase() instanceof OfflinePlayer || (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpaher...
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception { final User target = user.getTeleportRequest(); if (target == null || target.getBase() instanceof OfflinePlayer || (user.isTeleportRequestHere() ? !target.isAuthorized("essentials.tpahere...
diff --git a/api/src/test/java/org/openmrs/module/mirebalais/integration/MirthIT.java b/api/src/test/java/org/openmrs/module/mirebalais/integration/MirthIT.java index 8697715a..012796e8 100644 --- a/api/src/test/java/org/openmrs/module/mirebalais/integration/MirthIT.java +++ b/api/src/test/java/org/openmrs/module/mireb...
true
true
public void testMirthChannelIntegration() throws Exception { PatientService patientService = Context.getPatientService(); EncounterService encounterService = Context.getEncounterService(); OrderService orderService = Context.getOrderService(); authenticate(); // run the module activator so that the ...
public void testMirthChannelIntegration() throws Exception { PatientService patientService = Context.getPatientService(); EncounterService encounterService = Context.getEncounterService(); OrderService orderService = Context.getOrderService(); authenticate(); // run the module activator so that the ...
diff --git a/frost-wot/source/frost/Core.java b/frost-wot/source/frost/Core.java index e1b26d23..007d50bf 100644 --- a/frost-wot/source/frost/Core.java +++ b/frost-wot/source/frost/Core.java @@ -1,613 +1,615 @@ /* Core.java / Frost Copyright (C) 2003 Frost Project <jtcfrost.sourceforge.net> This program is...
false
true
public void initialize() throws Exception { Splashscreen splashscreen = new Splashscreen(); splashscreen.setVisible(true); keypool = frostSettings.getValue("keypool.dir"); splashscreen.setText(language.getString("Splashscreen.message.1")); splashscreen.setProgress(20); ...
public void initialize() throws Exception { Splashscreen splashscreen = new Splashscreen(); splashscreen.setVisible(true); keypool = frostSettings.getValue("keypool.dir"); splashscreen.setText(language.getString("Splashscreen.message.1")); splashscreen.setProgress(20); ...
diff --git a/src/hot/com/infinitiessoft/btrs/action/ReportList.java b/src/hot/com/infinitiessoft/btrs/action/ReportList.java index 0fb40f3..8c858ba 100644 --- a/src/hot/com/infinitiessoft/btrs/action/ReportList.java +++ b/src/hot/com/infinitiessoft/btrs/action/ReportList.java @@ -1,160 +1,160 @@ package com.infinities...
true
true
public void prepareCounts() { int outgoingCount = 0; int submittedCount = 0; int rejectedCount = 0; int incomingCount = 0; int allCount = 0; // backup String savedOperator = getRestrictionLogicOperator(); Integer savedMaxResults = getMaxResults(); Integer savedFirstResult = getFirstResult(); ...
public void prepareCounts() { int outgoingCount = 0; int submittedCount = 0; int rejectedCount = 0; int incomingCount = 0; int allCount = 0; // backup String savedOperator = getRestrictionLogicOperator(); Integer savedMaxResults = getMaxResults(); Integer savedFirstResult = getFirstResult(); ...
diff --git a/AdvanceWars/src/org/game/advwars/GameBoard.java b/AdvanceWars/src/org/game/advwars/GameBoard.java index 6a908ac..92a2e46 100644 --- a/AdvanceWars/src/org/game/advwars/GameBoard.java +++ b/AdvanceWars/src/org/game/advwars/GameBoard.java @@ -1,305 +1,305 @@ package org.game.advwars; import android.view.*...
true
true
public boolean onTouch(View v, MotionEvent event) { // Handle touch events here... switch (event.getAction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: start.set(event.getX(), event.getY()); Log.d(TAG, "mode=DRAG"); mode = PRESS; break; case MotionEvent.ACTION_POINTER_DOWN: ol...
public boolean onTouch(View v, MotionEvent event) { // Handle touch events here... switch (event.getAction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: start.set(event.getX(), event.getY()); Log.d(TAG, "mode=DRAG"); mode = PRESS; break; case MotionEvent.ACTION_POINTER_DOWN: ol...
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java index be61aea7b..08111452f 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VCheckBox.java @@ -1,198 +1,200 @@ /* @ITMillApache2LicenseF...
true
true
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { // Save details this.client = client; id = uidl.getId(); // Ensure correct implementation if (client.updateComponent(this, uidl, false)) { return; } focusHandlerRegistration = ...
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) { // Save details this.client = client; id = uidl.getId(); // Ensure correct implementation if (client.updateComponent(this, uidl, false)) { return; } focusHandlerRegistration = ...
diff --git a/application/test/test/UserDatabaseTest.java b/application/test/test/UserDatabaseTest.java index 53601a6c..5795655a 100644 --- a/application/test/test/UserDatabaseTest.java +++ b/application/test/test/UserDatabaseTest.java @@ -1,205 +1,205 @@ package test; import java.util.Date; import java.util.List; i...
false
true
public void findListBasedOnType(){ int numberOfIndependentUser = 10; int numberOfPupils = 5; //First clear the Users for (UserModel um :UserModel.find.all()){ um.delete(); } //generate random IndependentUser and save them. for(int i = 0; i < numb...
public void findListBasedOnType(){ int numberOfIndependentUser = 10; int numberOfTeachers = 5; //First clear the Users for (UserModel um :UserModel.find.all()){ um.delete(); } //generate random IndependentUser and save them. for(int i = 0; i < nu...
diff --git a/de.hswt.hrm.main/src/de/hswt/hrm/main/handlers/AboutHandler.java b/de.hswt.hrm.main/src/de/hswt/hrm/main/handlers/AboutHandler.java index f4b68b8f..397ac6b5 100644 --- a/de.hswt.hrm.main/src/de/hswt/hrm/main/handlers/AboutHandler.java +++ b/de.hswt.hrm.main/src/de/hswt/hrm/main/handlers/AboutHandler.java @...
true
true
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) { String[] developer = new String[] { "Tobias Placht", "Anton Schreck", "Lucas Haering", "Marek Bieber", "Benjamin Pabst", "Michael Sieger","Stefan Kleeberger"}; StringBuilder sb = new StringBuilder(); Arrays.sort(developer); for (Strin...
public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) { String[] developer = new String[] { "Tobias Placht", "Anton Schreck", "Lucas Haering", "Marek Bieber", "Benjamin Pabst", "Michael Sieger","Stefan Kleeberger"}; StringBuilder sb = new StringBuilder(); Arrays.sort(developer); for (Strin...
diff --git a/src/main/java/framework/utils/CloudBootstrapper.java b/src/main/java/framework/utils/CloudBootstrapper.java index 5d9aa752..47ac680f 100644 --- a/src/main/java/framework/utils/CloudBootstrapper.java +++ b/src/main/java/framework/utils/CloudBootstrapper.java @@ -1,65 +1,65 @@ package framework.utils; im...
true
true
public String getOptions() throws IOException { StringBuilder builder = new StringBuilder(); if (noWebServices) { builder.append("-no-web-services"); } if (cloudOverrides != null && !cloudOverrides.isEmpty()) { File cloudOverridesFile = IOUtils.createTempOverridesFile(cloudOverrides); builder ....
public String getOptions() throws IOException { StringBuilder builder = new StringBuilder(); if (noWebServices) { builder.append("-no-web-services"); } if (cloudOverrides != null && !cloudOverrides.isEmpty()) { File cloudOverridesFile = IOUtils.createTempOverridesFile(cloudOverrides); builder ....
diff --git a/src/gov/nih/nci/caintegrator/analysis/server/HierarchicalClusteringTaskR.java b/src/gov/nih/nci/caintegrator/analysis/server/HierarchicalClusteringTaskR.java index c15fbf3..50d6e1d 100755 --- a/src/gov/nih/nci/caintegrator/analysis/server/HierarchicalClusteringTaskR.java +++ b/src/gov/nih/nci/caintegrator/...
true
true
public void run() { HierarchicalClusteringRequest hcRequest = (HierarchicalClusteringRequest) getRequest(); result = new HierarchicalClusteringResult(getRequest().getSessionId(), getRequest().getTaskId()); logger.info(getExecutingThreadName() + " processing hierarchical clustering analysis request=" + ...
public void run() { HierarchicalClusteringRequest hcRequest = (HierarchicalClusteringRequest) getRequest(); result = new HierarchicalClusteringResult(getRequest().getSessionId(), getRequest().getTaskId()); logger.info(getExecutingThreadName() + " processing hierarchical clustering analysis request=" + ...
diff --git a/src/bots/Map.java b/src/bots/Map.java index 7210389..d0acffa 100644 --- a/src/bots/Map.java +++ b/src/bots/Map.java @@ -1,117 +1,117 @@ package bots; import java.awt.Component; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.IOException; import ...
false
true
public void init(Base red, Base blue) { // TODO paint a nicer map! for (int img_x = 0; img_x < map_img.getWidth(); img_x++) { List<Ground> row = new ArrayList<Ground>(width); for (int img_y = 0; img_y < map_img.getWidth(); img_y++) { int pixel = map_img.getRGB(img_y, img_x); Ground ground = Ground.V...
public void init(Base red, Base blue) { // TODO paint a nicer map! for (int img_x = 0; img_x < map_img.getWidth(); img_x++) { List<Ground> row = new ArrayList<Ground>(width); for (int img_y = 0; img_y < map_img.getWidth(); img_y++) { int pixel = map_img.getRGB(img_y, img_x); Ground ground = Ground.V...
diff --git a/Test.java b/Test.java index 643f5f6..d2a9805 100644 --- a/Test.java +++ b/Test.java @@ -1,38 +1,38 @@ import org.antlr.runtime.*; import org.antlr.runtime.tree.Tree; import org.antlr.runtime.debug.ParseTreeBuilder; public class Test { public static void printTree(Tree t, int indent, int spaces) {...
true
true
public static void main(String[] args) throws Exception { if (args.length != 1) { System.err.println("Usage: java Test <file> ..."); return; } for (int i = 0; i < args.length; i++) { MiniAdaLexer lex = new MiniAdaLexer(new MiniAdaFileStream(args[i])); CommonToke...
public static void main(String[] args) throws Exception { if (args.length < 1) { System.err.println("Usage: java Test <file> ..."); return; } for (int i = 0; i < args.length; i++) { MiniAdaLexer lex = new MiniAdaLexer(new MiniAdaFileStream(args[i])); CommonToken...
diff --git a/Game.java b/Game.java index 4bfadcb..ef6f222 100644 --- a/Game.java +++ b/Game.java @@ -1,719 +1,716 @@ // Copyright 2010 owners of the AI Challenge project // // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may ...
false
true
public void DoTimeStep() { // Add ships to each non-neutral planet according to its growth rate. for (Planet p : planets) { if (p.Owner() > 0) { p.AddShips(p.GrowthRate()); } } // Advance all fleets by one time step. Collect the ones that are // arriving at their destination planets this t...
public void DoTimeStep() { // Add ships to each non-neutral planet according to its growth rate. for (Planet p : planets) { if (p.Owner() > 0) { p.AddShips(p.GrowthRate()); } } // Advance all fleets by one time step. Collect the ones that are // arriving at their destination planets this t...
diff --git a/src/com/gitblit/utils/ActivityUtils.java b/src/com/gitblit/utils/ActivityUtils.java index 204fe3c..d6afd93 100644 --- a/src/com/gitblit/utils/ActivityUtils.java +++ b/src/com/gitblit/utils/ActivityUtils.java @@ -1,196 +1,196 @@ /* * Copyright 2011 gitblit.com. * * Licensed under the Apache License, ...
true
true
public static List<Activity> getRecentActivity(List<RepositoryModel> models, int daysBack, String objectId) { // Activity panel shows last daysBack of activity across all // repositories. Date thresholdDate = new Date(System.currentTimeMillis() - daysBack * TimeUtils.ONEDAY); // Build a map of DailyActivi...
public static List<Activity> getRecentActivity(List<RepositoryModel> models, int daysBack, String objectId) { // Activity panel shows last daysBack of activity across all // repositories. Date thresholdDate = new Date(System.currentTimeMillis() - daysBack * TimeUtils.ONEDAY); // Build a map of DailyActivi...
diff --git a/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java b/lttng/org.eclipse.linuxtools.lttng.core/src/org/eclipse/linuxtools/internal/lttng/core/trace/LTTngTrace.java index e4c7b3ade..6170193bc 100644 --- a/lttng/org.eclipse.linuxtools.lttng.core/src/org...
true
true
private void initializeStreamingMonitor() { final JniTrace jniTrace = getCurrentJniTrace(); if (jniTrace == null || (!jniTrace.isLiveTraceSupported() || !LiveTraceManager.isLiveTrace(jniTrace.getTracepath()))) { // Set the time range of the trace final ITmfCon...
private void initializeStreamingMonitor() { final JniTrace jniTrace = getCurrentJniTrace(); if (jniTrace == null || (!jniTrace.isLiveTraceSupported() || !LiveTraceManager.isLiveTrace(jniTrace.getTracepath()))) { // Set the time range of the trace final ITmfCon...
diff --git a/src/main/java/de/switajski/priebes/flexibleorders/domain/Amount.java b/src/main/java/de/switajski/priebes/flexibleorders/domain/Amount.java index 2eb9bc79..3ad6a541 100644 --- a/src/main/java/de/switajski/priebes/flexibleorders/domain/Amount.java +++ b/src/main/java/de/switajski/priebes/flexibleorders/doma...
true
true
public String toString(){ String currencyChar = ""; switch (getCurrency()) { case EUR: currencyChar+= " �"; break; case PLN: currencyChar+= " zl"; } String s = DECIMAL_FORMAT.format(value) + currencyChar; return s; }
public String toString(){ String currencyChar = ""; switch (getCurrency()) { case EUR: currencyChar+= " \u20ac"; break; case PLN: currencyChar+= " zl"; } String s = DECIMAL_FORMAT.format(value) + currencyChar; return s; }
diff --git a/src/main/java/com/mycompany/app/App.java b/src/main/java/com/mycompany/app/App.java index 52ac766..5958b07 100644 --- a/src/main/java/com/mycompany/app/App.java +++ b/src/main/java/com/mycompany/app/App.java @@ -1,18 +1,18 @@ package com.mycompany.app; public class App { public static void main(...
false
true
public static void main( String[] args ) { String str1 = null; String str2 = "str"; System.out.println("Hello World! "+str1.equals(str2)); String test1 = "123"; char[] test2 = null; test1 = String.copyValueOf(test2); System.out.println("Hello World! "+test1); System.out...
public static void main( String[] args ) { String str1 = "str"; String str2 = "str"; System.out.println("Hello World! "+str1.equals(str2)); String test1 = "123"; char[] test2 = null; String.copyValueOf(test2); System.out.println("Hello World! "+test1); System.out.printl...
diff --git a/src/main/java/hudson/plugins/jira/listissuesparameter/JiraIssueParameterDefinition.java b/src/main/java/hudson/plugins/jira/listissuesparameter/JiraIssueParameterDefinition.java index f00fdfa..6d3c95f 100644 --- a/src/main/java/hudson/plugins/jira/listissuesparameter/JiraIssueParameterDefinition.java +++ b...
true
true
public List<JiraIssueParameterDefinition.Result> getIssues() throws IOException, ServiceException { AbstractProject<?, ?> context = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class); JiraSite site = JiraSite.get(context); JiraSession session = site.createSession(); if (session=...
public List<JiraIssueParameterDefinition.Result> getIssues() throws IOException, ServiceException { AbstractProject<?, ?> context = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class); JiraSite site = JiraSite.get(context); if (site==null) throw new IllegalStateException("JIRA site needs...
diff --git a/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java b/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java index 9cc889f..89ae936 100644 --- a/src/main/java/org/apache/commons/chain/generic/DispatchLookupCommand.java +++ b/src/main/java/org/apache/commons/chain/ge...
true
true
private Method extractMethod(Command command, C context) throws NoSuchMethodException { String methodName = this.getMethod(); if (methodName == null) { Object methodContextObj = context.get(getMethodKey()); if (methodContextObj == null) { throw new N...
private Method extractMethod(Command<C> command, C context) throws NoSuchMethodException { String methodName = this.getMethod(); if (methodName == null) { Object methodContextObj = context.get(getMethodKey()); if (methodContextObj == null) { throw ne...
diff --git a/src/minecraft/co/uk/flansmods/client/FlansModClient.java b/src/minecraft/co/uk/flansmods/client/FlansModClient.java index 4525e608..e598b6e2 100644 --- a/src/minecraft/co/uk/flansmods/client/FlansModClient.java +++ b/src/minecraft/co/uk/flansmods/client/FlansModClient.java @@ -1,293 +1,293 @@ package co.u...
true
true
public static void tick() { if (minecraft.thePlayer == null) return; if(minecraft.thePlayer.ridingEntity instanceof IControllable && minecraft.currentScreen == null) minecraft.displayGuiScreen(new GuiDriveableController((IControllable)minecraft.thePlayer.ridingEntity)); // Guns if (shootTime > 0) ...
public static void tick() { if (minecraft.thePlayer == null) return; if(minecraft.thePlayer.ridingEntity instanceof IControllable && minecraft.currentScreen == null) minecraft.displayGuiScreen(new GuiDriveableController((IControllable)minecraft.thePlayer.ridingEntity)); // Guns if (shootTime > 0) ...
diff --git a/grails-app/services/org/chai/kevin/value/ExpressionService.java b/grails-app/services/org/chai/kevin/value/ExpressionService.java index 7527f2ed..1e68b1ae 100644 --- a/grails-app/services/org/chai/kevin/value/ExpressionService.java +++ b/grails-app/services/org/chai/kevin/value/ExpressionService.java @@ -1...
true
true
private <T extends DataElement<S>, S extends DataValue> StatusValuePair getExpressionStatusValuePair(String expression, Type type, Period period, DataLocationEntity facility, Class<T> clazz) { StatusValuePair statusValuePair = new StatusValuePair(); if (expression == null) { statusValuePair.status = Status.DOES...
private <T extends DataElement<S>, S extends DataValue> StatusValuePair getExpressionStatusValuePair(String expression, Type type, Period period, DataLocationEntity facility, Class<T> clazz) { StatusValuePair statusValuePair = new StatusValuePair(); if (expression == null) { statusValuePair.status = Status.DOES...
diff --git a/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java b/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java index 09de4e6d..41bde909 100644 --- a/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java +++ b/app/src/main/java/com/github/mobile/ui/issue/AssigneeDialog.java @...
true
true
private void load(final String selectedAssignee) { new ProgressDialogTask<List<User>>(activity) { @Override public List<User> run() throws Exception { List<User> users = service.getCollaborators(repository); Map<String, User> loadedCollaborators = new...
private void load(final String selectedAssignee) { new ProgressDialogTask<List<User>>(activity) { @Override public List<User> run() throws Exception { List<User> users = service.getCollaborators(repository); Map<String, User> loadedCollaborators = new...
diff --git a/src/main/java/co/altruix/scheduler/PccSchedulerApp.java b/src/main/java/co/altruix/scheduler/PccSchedulerApp.java index 588cd5c..ac23c4c 100644 --- a/src/main/java/co/altruix/scheduler/PccSchedulerApp.java +++ b/src/main/java/co/altruix/scheduler/PccSchedulerApp.java @@ -1,159 +1,160 @@ package co.altruix...
true
true
public void run() { try { final Properties config = readConfig(); final Injector injector = initDependencyInjector(); final Persistence persistence = injector.getInstance(Persistence.class); persistence.openSession(Persistence.HOST_LOCAL,...
public void run() { try { final Properties config = readConfig(); final Injector injector = initDependencyInjector(); final Persistence persistence = injector.getInstance(Persistence.class); persistence.openSession(Persistence.HOST_LOCAL,...
diff --git a/src/org/red5/server/stream/FlowControlService.java b/src/org/red5/server/stream/FlowControlService.java index 5c9bf782..e822eda2 100644 --- a/src/org/red5/server/stream/FlowControlService.java +++ b/src/org/red5/server/stream/FlowControlService.java @@ -1,318 +1,319 @@ package org.red5.server.stream; i...
true
true
public void updateBWConfigure(IFlowControllable fc) { synchronized (fcsMap) { DataObject obj = fcsMap.get(fc); if (obj == null) return; if (fc.getBandwidthConfigure() == null) { // simple unregister the flow controllable // TODO migrate the waiting threads to ancestors fcsMap.remove(fc); } ...
public void updateBWConfigure(IFlowControllable fc) { synchronized (fcsMap) { DataObject obj = fcsMap.get(fc); if (obj == null) return; if (fc.getBandwidthConfigure() == null) { // simple unregister the flow controllable // TODO migrate the waiting threads to ancestors fcsMap.remove(fc); ret...
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivationHistory.java index f909ac67b..7756a58e4 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/u...
true
true
public AbstractTask getPreviousTask() { try { boolean active = false; for (AbstractTask task : history) { if (task.isActive()) { active = true; break; } } if (hasPrevious()) { if ((currentIndex == 0 && !history.get(currentIndex).isActive()) || !active) { return history.get(cur...
public AbstractTask getPreviousTask() { try { boolean active = false; for (AbstractTask task : history) { if (task.isActive()) { active = true; break; } } if (hasPrevious()) { if (currentIndex < history.size()-1 && ((currentIndex == 0 && !history.get(currentIndex).isActive()) || !a...
diff --git a/src/net/colar/netbeans/fan/FanUtilities.java b/src/net/colar/netbeans/fan/FanUtilities.java index 51fffa7..beff63d 100644 --- a/src/net/colar/netbeans/fan/FanUtilities.java +++ b/src/net/colar/netbeans/fan/FanUtilities.java @@ -1,102 +1,102 @@ /* * To change this template, choose Tools | Templates * a...
true
true
public static FileObject getRelativeFileObject(final FileObject fo, String relativePath) { StringTokenizer st = new StringTokenizer(relativePath.replaceAll("\\","/"), "/"); // If fo is a file, we start from the parent folder FileObject curFile= fo.isFolder()?fo:fo.getParent(); // folow the relative path to...
public static FileObject getRelativeFileObject(final FileObject fo, String relativePath) { StringTokenizer st = new StringTokenizer(relativePath.replaceAll("\\\\","/"), "/"); // If fo is a file, we start from the parent folder FileObject curFile= fo.isFolder()?fo:fo.getParent(); // folow the relative path ...
diff --git a/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/actions/ContextClearAction.java b/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal/context/ui/actions/ContextClearAction.java index 9902c2595..0ff2f0c99 100644 --- a/org.eclipse.mylyn.context.ui/src/org/eclipse/mylyn/internal...
true
true
public void run(IAction action) { ITask task = TaskListView.getFromActivePerspective().getSelectedTask(); if (task instanceof ITask) { boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell(), "Confirm clear context", "Clear context for the selec...
public void run(IAction action) { ITask task = TaskListView.getFromActivePerspective().getSelectedTask(); if (task instanceof ITask) { boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow() .getShell(), "Confirm clear context", "Clear context for the selec...
diff --git a/src/dk/itu/big_red/model/import_export/BigraphXMLImport.java b/src/dk/itu/big_red/model/import_export/BigraphXMLImport.java index d239c6af..4551bb99 100644 --- a/src/dk/itu/big_red/model/import_export/BigraphXMLImport.java +++ b/src/dk/itu/big_red/model/import_export/BigraphXMLImport.java @@ -1,184 +1,188 ...
true
true
private void addChild(Container context, Element e) throws ImportFailedException { Object model; if (!e.getNodeName().equals("node")) { model = ModelFactory.getNewObject(e.getNodeName()); } else { String controlName = DOM.getAttributeNS(e, XMLNS.BIGRAPH, "control"); Control c = bigraph.getSignature...
private void addChild(Container context, Element e) throws ImportFailedException { Object model; if (!e.getNodeName().equals("node")) { model = ModelFactory.getNewObject(e.getNodeName()); } else { String controlName = DOM.getAttributeNS(e, XMLNS.BIGRAPH, "control"); Control c = bigraph.getSignature...
diff --git a/android/ibrdtn/src/de/tubs/ibr/dtn/service/DaemonProcess.java b/android/ibrdtn/src/de/tubs/ibr/dtn/service/DaemonProcess.java index ef0ec58e..71d89e0f 100644 --- a/android/ibrdtn/src/de/tubs/ibr/dtn/service/DaemonProcess.java +++ b/android/ibrdtn/src/de/tubs/ibr/dtn/service/DaemonProcess.java @@ -1,746 +1,...
false
true
private void createConfig(Context context, String configPath) { // load preferences SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); File config = new File(configPath); // remove old config file if (config.exists()) { config.delete(); } try { FileOutputStre...
private void createConfig(Context context, String configPath) { // load preferences SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); File config = new File(configPath); // remove old config file if (config.exists()) { config.delete(); } try { FileOutputStre...
diff --git a/plugins/hdfsviewer/src/azkaban/viewer/hdfs/HdfsBrowserServlet.java b/plugins/hdfsviewer/src/azkaban/viewer/hdfs/HdfsBrowserServlet.java index bb19b20..c46b8be 100644 --- a/plugins/hdfsviewer/src/azkaban/viewer/hdfs/HdfsBrowserServlet.java +++ b/plugins/hdfsviewer/src/azkaban/viewer/hdfs/HdfsBrowserServlet....
true
true
private void displayFilePage( FileSystem fs, String user, HttpServletRequest req, HttpServletResponse resp, Session session, Path path) throws IOException { Page page = newPage(req, resp, session, "azkaban/viewer/hdfs/velocity/hdfs-file.vm"); page.add("allowproxy", allowGroupProxy); pag...
private void displayFilePage( FileSystem fs, String user, HttpServletRequest req, HttpServletResponse resp, Session session, Path path) throws IOException { Page page = newPage(req, resp, session, "azkaban/viewer/hdfs/velocity/hdfs-file.vm"); page.add("allowproxy", allowGroupProxy); pag...
diff --git a/ubticket/src/edu/ub/bda/ubticket/windows/ComprarEntradasWindow.java b/ubticket/src/edu/ub/bda/ubticket/windows/ComprarEntradasWindow.java index 06be6cd..c9672b8 100644 --- a/ubticket/src/edu/ub/bda/ubticket/windows/ComprarEntradasWindow.java +++ b/ubticket/src/edu/ub/bda/ubticket/windows/ComprarEntradasWin...
true
true
public ComprarEntradasWindow(final UBTicket ubticket) { super("Comprar entradas"); this.ubticket = ubticket; Panel espacioPanel = new Panel(new Border.Invisible(), Panel.Orientation.HORISONTAL); espacioPanel.addComponent(new Label(" Espacio seleccionado:")); sele...
public ComprarEntradasWindow(final UBTicket ubticket) { super("Comprar entradas"); this.ubticket = ubticket; Panel espacioPanel = new Panel(new Border.Invisible(), Panel.Orientation.HORISONTAL); espacioPanel.addComponent(new Label(" Espacio seleccionado:")); sele...
diff --git a/src/main/java/hudson/plugins/jira/JiraProjectProperty.java b/src/main/java/hudson/plugins/jira/JiraProjectProperty.java index 265e0e5..80d5fb1 100644 --- a/src/main/java/hudson/plugins/jira/JiraProjectProperty.java +++ b/src/main/java/hudson/plugins/jira/JiraProjectProperty.java @@ -1,133 +1,135 @@ packag...
false
true
public boolean configure(StaplerRequest req, JSONObject formData) { //Fix^H^H^HDirty hack for empty string to URL conversion error Stapler.CONVERT_UTILS.deregister(java.net.URL.class); Converter tmpUrlConverter = new Converter() { public Object convert(Class aClass,...
public boolean configure(StaplerRequest req, JSONObject formData) { //Fix^H^H^HDirty hack for empty string to URL conversion error //Should check for existing handler etc, but since this is a dirty hack, //we won't Stapler.CONVERT_UTILS.deregister(java.net.URL.class); ...
diff --git a/src/plugins/Library/ui/MainPageToadlet.java b/src/plugins/Library/ui/MainPageToadlet.java index 610a5e5..00c897a 100644 --- a/src/plugins/Library/ui/MainPageToadlet.java +++ b/src/plugins/Library/ui/MainPageToadlet.java @@ -1,135 +1,135 @@ /* This code is part of Freenet. It is distributed under the GNU G...
true
true
public void handleMethodGET(URI uri, final HTTPRequest request, final ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { ClassLoader origClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(Library.class.getClassLoader()...
public void handleMethodGET(URI uri, final HTTPRequest request, final ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException { ClassLoader origClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(Library.class.getClassLoader()...
diff --git a/src/com/intellij/plugin/crap4j/CrapChecker.java b/src/com/intellij/plugin/crap4j/CrapChecker.java index ae95cc7..310806a 100644 --- a/src/com/intellij/plugin/crap4j/CrapChecker.java +++ b/src/com/intellij/plugin/crap4j/CrapChecker.java @@ -1,44 +1,44 @@ package com.intellij.plugin.crap4j; import com.in...
false
true
public static Map<String, Double> crapCheckFile(PsiJavaFile psiFile, Project project) throws IOException, CoverageException, AnalyzerException { FileHelper fileHelper = new FileHelper(project); List<String> classFiles = fileHelper.getClassFilePaths(psiFile.getVirtualFile()); Map<String, Double> coverageMap = Emm...
public static Map<String, Double> crapCheckFile(PsiJavaFile psiFile, Project project) throws IOException, CoverageException, AnalyzerException { FileHelper fileHelper = new FileHelper(project); List<String> classFiles = fileHelper.getClassFilePaths(psiFile.getVirtualFile()); Map<String, Double> coverageMap = Emm...
diff --git a/src/jp/ac/osaka_u/ist/sdl/ectec/analyzer/sourceanalyzer/crd/AbstractCRDCreator.java b/src/jp/ac/osaka_u/ist/sdl/ectec/analyzer/sourceanalyzer/crd/AbstractCRDCreator.java index 8f99926..36a24e6 100644 --- a/src/jp/ac/osaka_u/ist/sdl/ectec/analyzer/sourceanalyzer/crd/AbstractCRDCreator.java +++ b/src/jp/ac/o...
true
true
public CRD createCrd() { final String head = bType.getHead(); final String anchor = getAnchor(); final List<Long> ancestorIds = new ArrayList<Long>(); if (parent != null) { for (final long ancestorId : parent.getAncestors()) { ancestorIds.add(ancestorId); } } final MetricsCalculator cmCalculat...
public CRD createCrd() { final String head = bType.getHead(); final String anchor = getAnchor(); final List<Long> ancestorIds = new ArrayList<Long>(); if (parent != null) { for (final long ancestorId : parent.getAncestors()) { ancestorIds.add(ancestorId); } ancestorIds.add(parent.getId()); } ...
diff --git a/CompactMobsEventHandler.java b/CompactMobsEventHandler.java index 96641f1..2281a0b 100644 --- a/CompactMobsEventHandler.java +++ b/CompactMobsEventHandler.java @@ -1,207 +1,208 @@ package compactMobs; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityList; import net.minecr...
true
true
public void entityInteract(EntityInteractEvent event) { if (event.entityPlayer != null && event.target != null) { //EntityInteractEvent event = (EntityInteractEvent)eevent; EntityPlayer player = event.entityPlayer; if (event.target instanceof EntityLiving) { EntityLiving entity = (EntityLiving) ev...
public void entityInteract(EntityInteractEvent event) { if (event.entityPlayer != null && event.target != null) { //EntityInteractEvent event = (EntityInteractEvent)eevent; EntityPlayer player = event.entityPlayer; if (event.target instanceof EntityLiving) { EntityLiving entity = (EntityLiving) ev...
diff --git a/src/webctdbexport/jdbc/DumpUsers.java b/src/webctdbexport/jdbc/DumpUsers.java index 56d2918..07b9c1e 100755 --- a/src/webctdbexport/jdbc/DumpUsers.java +++ b/src/webctdbexport/jdbc/DumpUsers.java @@ -1,117 +1,117 @@ /** * */ package webctdbexport.jdbc; import java.io.File; import java.io.IOExcep...
true
true
public static void main(String[] args) { if (args.length<3) { System.err.println("Usage: <jdbc.properties> <outputdir> <filedir> [usernames...]"); System.exit(-1); } File outputdir = new File(args[1]); if (!outputdir.exists() || !outputdir.canWrite() || !outputdir.isDirectory()) { logger.log(Level.SEV...
public static void main(String[] args) { if (args.length<3) { System.err.println("Usage: <jdbc.properties> <outputdir> <filedir> [usernames...]"); System.exit(-1); } File outputdir = new File(args[1]); if (!outputdir.exists() || !outputdir.canWrite() || !outputdir.isDirectory()) { logger.log(Level.SEV...
diff --git a/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v155/InterceptorsPage.java b/apacheds-configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v155/InterceptorsPage.java index 09d7884a6..3e8c2dfe8 100644 --- a/apacheds-configuratio...
true
true
protected void createFormContent( IManagedForm managedForm ) { PlatformUI.getWorkbench().getHelpSystem().setHelp( getPartControl(), ApacheDSConfigurationPluginConstants.PLUGIN_ID + "." + "configuration_editor_154" ); //$NON-NLS-1$ //$NON-NLS-2$ final ScrolledForm form = managedForm....
protected void createFormContent( IManagedForm managedForm ) { PlatformUI.getWorkbench().getHelpSystem().setHelp( getPartControl(), ApacheDSConfigurationPluginConstants.PLUGIN_ID + "." + "configuration_editor_155" ); //$NON-NLS-1$ //$NON-NLS-2$ final ScrolledForm form = managedForm....
diff --git a/NCore/src/main/java/fr/ribesg/bukkit/ncore/common/AsyncPermAccessor.java b/NCore/src/main/java/fr/ribesg/bukkit/ncore/common/AsyncPermAccessor.java index 81ee2b43..6c5f972c 100644 --- a/NCore/src/main/java/fr/ribesg/bukkit/ncore/common/AsyncPermAccessor.java +++ b/NCore/src/main/java/fr/ribesg/bukkit/ncore...
true
true
private void updatePlayer(final Player player) { final String playerName = player.getName(); if (player.isOp()) { this.ops.add(playerName); } else { this.ops.remove(playerName); } Set<String> playerPerms = this.permissions.get(playerName); if (playerPerms == null) { playerPerms = Collections.newSe...
private void updatePlayer(final Player player) { final String playerName = player.getName(); if (player.isOp()) { this.ops.add(playerName); } else { this.ops.remove(playerName); } Set<String> playerPerms = this.permissions.get(playerName); if (playerPerms == null) { playerPerms = Collections.newSe...
diff --git a/src/ibis/satin/impl/Inlets.java b/src/ibis/satin/impl/Inlets.java index f1423a87..a95b8183 100644 --- a/src/ibis/satin/impl/Inlets.java +++ b/src/ibis/satin/impl/Inlets.java @@ -1,214 +1,214 @@ package ibis.satin.impl; import ibis.ipl.IbisIdentifier; public abstract class Inlets extends Aborts { /...
true
true
void handleInlet(InvocationRecord r) { InvocationRecord oldParent; int oldParentStamp; IbisIdentifier oldParentOwner; if (r.inletExecuted) { System.err.print("r"); return; } if (r.parentLocals == null) { System.err.println("empty inlet in handleInlet"); handleEmptyInlet(r); return; } ...
void handleInlet(InvocationRecord r) { InvocationRecord oldParent; int oldParentStamp; IbisIdentifier oldParentOwner; if (r.inletExecuted) { System.err.print("r"); return; } if (r.parentLocals == null) { System.err.println("empty inlet in handleInlet"); handleEmptyInlet(r); return; } ...
diff --git a/src/com/rhoward/LDomino.java b/src/com/rhoward/LDomino.java index 16f10b0..99fe300 100644 --- a/src/com/rhoward/LDomino.java +++ b/src/com/rhoward/LDomino.java @@ -1,65 +1,65 @@ package com.rhoward; public class LDomino extends Domino { public LDomino(Block.BlockType type, int x, int y) { ...
false
true
public String getGrid() { String grid; switch (rotateState) { case NORMAL: grid = "10,10,11"; break; case DOWN: grid = "11,01,01"; break; case LEFT: grid = "001,111"; ...
public String getGrid() { String grid; switch (rotateState) { case NORMAL: grid = "10,10,11"; break; case RIGHT: grid = "111,100"; break; case DOWN: grid = "11,01,01"; ...
diff --git a/amibe/src/org/jcae/mesh/amibe/algos3d/AbstractAlgoHalfEdge.java b/amibe/src/org/jcae/mesh/amibe/algos3d/AbstractAlgoHalfEdge.java index f8cb0be4..d33b7a0d 100644 --- a/amibe/src/org/jcae/mesh/amibe/algos3d/AbstractAlgoHalfEdge.java +++ b/amibe/src/org/jcae/mesh/amibe/algos3d/AbstractAlgoHalfEdge.java @@ -1...
true
true
private boolean processAllHalfEdges() { Stack<HalfEdge> stackNotProcessedObject = new Stack<HalfEdge>(); Stack<Double> stackNotProcessedValue = new Stack<Double>(); double cost = -1.0; while (!tree.isEmpty() && (nrFinal == 0 || (moreTriangles && nrTriangles < nrFinal) || (!moreTriangles && nrTriangles > nrFin...
private boolean processAllHalfEdges() { Stack<HalfEdge> stackNotProcessedObject = new Stack<HalfEdge>(); Stack<Double> stackNotProcessedValue = new Stack<Double>(); double cost = -1.0; while (!tree.isEmpty() && (nrFinal == 0 || (moreTriangles && nrTriangles < nrFinal) || (!moreTriangles && nrTriangles > nrFin...
diff --git a/src/core/org/apache/hadoop/security/authorize/ProxyUsers.java b/src/core/org/apache/hadoop/security/authorize/ProxyUsers.java index f8c27c2b4..0dd8a42ea 100644 --- a/src/core/org/apache/hadoop/security/authorize/ProxyUsers.java +++ b/src/core/org/apache/hadoop/security/authorize/ProxyUsers.java @@ -1,152 +...
true
true
public static void authorize(UserGroupInformation user, String remoteAddress, Configuration newConf) throws AuthorizationException { if(conf == null) { refreshSuperUserGroupsConfiguration(newConf); } if (user.getRealUser() == null) { return; } boolean groupAuthorized = fal...
public static synchronized void authorize(UserGroupInformation user, String remoteAddress, Configuration newConf) throws AuthorizationException { if(conf == null) { refreshSuperUserGroupsConfiguration(newConf); } if (user.getRealUser() == null) { return; } boolean groupAut...
diff --git a/src/main/java/eu/europeana/api2/web/model/xml/kml/KmlResponse.java b/src/main/java/eu/europeana/api2/web/model/xml/kml/KmlResponse.java index 737179d7..e883341d 100644 --- a/src/main/java/eu/europeana/api2/web/model/xml/kml/KmlResponse.java +++ b/src/main/java/eu/europeana/api2/web/model/xml/kml/KmlRespons...
false
true
public void setItems(List<BriefBean> results) { for (BriefBean bean : results) { Placemark placemark = new Placemark(); placemark.name = bean.getTitle()[0]; StringBuilder sb = new StringBuilder(); sb.append(bean.getEdmPlaceLongitude()[0]); sb.append(","); sb.append(bean.getEdmPlaceLatitude()[0]); ...
public void setItems(List<BriefBean> results) { for (BriefBean bean : results) { Placemark placemark = new Placemark(); placemark.name = bean.getTitle()[0]; StringBuilder sb = new StringBuilder(); sb.append(bean.getEdmPlaceLongitude()); sb.append(","); sb.append(bean.getEdmPlaceLatitude()); sb.a...
diff --git a/modules/resin/src/com/caucho/jsp/PageContextImpl.java b/modules/resin/src/com/caucho/jsp/PageContextImpl.java index 9ee152c64..00f85b034 100644 --- a/modules/resin/src/com/caucho/jsp/PageContextImpl.java +++ b/modules/resin/src/com/caucho/jsp/PageContextImpl.java @@ -1,2209 +1,2210 @@ /* * Copyright (c)...
true
true
public void handlePageException(Throwable e) throws ServletException, IOException { if (e instanceof SkipPageException) return; HttpServletRequest request = getCauchoRequest(); request.setAttribute("javax.servlet.jsp.jspException", e); CauchoResponse response = getCauchoResponse(); ...
public void handlePageException(Throwable e) throws ServletException, IOException { if (e instanceof SkipPageException) return; HttpServletRequest request = getCauchoRequest(); request.setAttribute("javax.servlet.jsp.jspException", e); CauchoResponse response = getCauchoResponse(); ...
diff --git a/src/com/emcewen/ultimateplexremote/ManualActivity.java b/src/com/emcewen/ultimateplexremote/ManualActivity.java index c610009..3bb9625 100644 --- a/src/com/emcewen/ultimateplexremote/ManualActivity.java +++ b/src/com/emcewen/ultimateplexremote/ManualActivity.java @@ -1,62 +1,62 @@ package com.emcewen.ulti...
true
true
protected void onResume() { // TODO Auto-generated method stub super.onResume(); //Setup the rescan button listener Button rescanBtn = (Button) findViewById(R.id.btnRescan); rescanBtn.setOnClickListener(new View.OnClickListener() { @Override public voi...
protected void onResume() { // TODO Auto-generated method stub super.onResume(); //Setup the rescan button listener Button rescanBtn = (Button) findViewById(R.id.btnRescan); rescanBtn.setOnClickListener(new View.OnClickListener() { @Override public voi...
diff --git a/plugins/jvm/java/src/org/nwnx/nwnx2/jvm/TestRunner.java b/plugins/jvm/java/src/org/nwnx/nwnx2/jvm/TestRunner.java index bde5ab8..b83cbbb 100644 --- a/plugins/jvm/java/src/org/nwnx/nwnx2/jvm/TestRunner.java +++ b/plugins/jvm/java/src/org/nwnx/nwnx2/jvm/TestRunner.java @@ -1,126 +1,126 @@ package org.nwnx.n...
true
true
public static void init() { System.out.println("Initializing TestRunner. This class runs various sanity tests and benchmarks."); System.out.println("If anything in this class makes your server crash, something is wrong and NEEDs to be fixed!"); System.out.println("You need to load a module that has at least one ...
public static void init() { System.out.println("Initializing TestRunner. This class runs various sanity tests and benchmarks."); System.out.println("If anything in this class makes your server crash, something is wrong and NEEDs to be fixed!"); System.out.println("You need to load a module that has at least one ...
diff --git a/src/bll/DisplayController.java b/src/bll/DisplayController.java index 9adb291..8ea4c7d 100644 --- a/src/bll/DisplayController.java +++ b/src/bll/DisplayController.java @@ -1,59 +1,59 @@ package bll; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import j...
true
true
public List<PictureViewModel> getPictureObjects(boolean random) throws IOException{ ArrayList<PictureViewModel> po = new ArrayList<PictureViewModel>(); List<PictureData> sortedPictureList = pictureController.getSortedPictureDataFromDb(); int i = 1; for (PictureData p : sortedPictureList){ if (!p.isRemoveFla...
public List<PictureViewModel> getPictureObjects(boolean random) throws IOException{ ArrayList<PictureViewModel> po = new ArrayList<PictureViewModel>(); List<PictureData> sortedPictureList = pictureController.getSortedPictureDataFromDb(); int i = 1; for (PictureData p : sortedPictureList){ if (!p.isRemoveFla...
diff --git a/process-manager/process-manager-ejb/src/main/java/com/silverpeas/processManager/ProcessFilter.java b/process-manager/process-manager-ejb/src/main/java/com/silverpeas/processManager/ProcessFilter.java index eb084e5de..3a53f9b6c 100644 --- a/process-manager/process-manager-ejb/src/main/java/com/silverpeas/pr...
true
true
public ProcessFilter(ProcessModel model, String role, String lang) throws ProcessManagerException { RecordTemplate rowTemplate = model.getRowTemplate(role, lang); filter = new FilterManager(rowTemplate, lang); RecordTemplate folderTemplate = null; try { folderTemplate = model.getDataFolde...
public ProcessFilter(ProcessModel model, String role, String lang) throws ProcessManagerException { RecordTemplate rowTemplate = model.getRowTemplate(role, lang); filter = new FilterManager(rowTemplate, lang); RecordTemplate folderTemplate = null; try { folderTemplate = model.getDataFolde...
diff --git a/river/src/main/java/org/jboss/marshalling/river/RiverMarshaller.java b/river/src/main/java/org/jboss/marshalling/river/RiverMarshaller.java index 4deb8af..0f1ab9a 100644 --- a/river/src/main/java/org/jboss/marshalling/river/RiverMarshaller.java +++ b/river/src/main/java/org/jboss/marshalling/river/RiverMar...
false
true
protected void doWriteObject(final Object original, final boolean unshared) throws IOException { final ClassExternalizerFactory classExternalizerFactory = this.classExternalizerFactory; final ObjectResolver objectResolver = this.objectResolver; Object obj = original; Class<?> objClas...
protected void doWriteObject(final Object original, final boolean unshared) throws IOException { final ClassExternalizerFactory classExternalizerFactory = this.classExternalizerFactory; final ObjectResolver objectResolver = this.objectResolver; Object obj = original; Class<?> objClas...
diff --git a/JSynthLib/core/CrossBreeder.java b/JSynthLib/core/CrossBreeder.java index 5913bb5..0931aeb 100644 --- a/JSynthLib/core/CrossBreeder.java +++ b/JSynthLib/core/CrossBreeder.java @@ -1,53 +1,52 @@ package core; /* * As of version 0.14 the actual functionality of the crossbreeder * dialog is hidden away ...
true
true
public void generateNewPatch() { try { Patch father = getRandomPatch(); Patch source; byte[] sysex = new byte[father.sysex.length]; p = new Patch(sysex); p.comment = new StringBuffer(); // Clear the wrong "Invalid Manufacturer" comment! for (int i = 0; i < father.sysex.length; i++) { ...
public void generateNewPatch() { try { Patch father = getRandomPatch(); Patch source; byte[] sysex = new byte[father.sysex.length]; p = new Patch(sysex); for (int i = 0; i < father.sysex.length; i++) { // look for a patch with same Driver and enough length do { source = getRandom...
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/bug366967/NonUniqueBasedirsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/bug366967/NonUniqueBasedirsTest.java index 990cf97f..0df5a46a 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/bug366967/NonUniqueBasedirsTest.java +++ b/tycho-its...
true
true
public void testNonUniqueBasedirFailure() throws Exception { Verifier verifier = getVerifier("/nonUniqueModuleBaseDir", false); try { verifier.executeGoal("clean"); Assert.fail("build failure expected"); } catch (VerificationException e) { // expected ...
public void testNonUniqueBasedirFailure() throws Exception { Verifier verifier = getVerifier("/nonUniqueModuleBaseDir", false); try { verifier.executeGoal("clean"); Assert.fail("build failure expected"); } catch (VerificationException e) { // expected ...
diff --git a/src/de/ing_poetter/binview/BinaryFormat.java b/src/de/ing_poetter/binview/BinaryFormat.java index 435168c..8feb995 100644 --- a/src/de/ing_poetter/binview/BinaryFormat.java +++ b/src/de/ing_poetter/binview/BinaryFormat.java @@ -1,292 +1,292 @@ /* * This program is free software; you can redistribute it ...
false
true
public String aplyTo(final String source) { // false = 0; // true = 1; if(null == source) { return null; } final Vector<Boolean> bits = getBitsFromString(source); String res = "Found " + bits.size() + " bits in Data !\n"; int maxDescr...
public String aplyTo(final String source) { // false = 0; // true = 1; if(null == source) { return null; } final Vector<Boolean> bits = getBitsFromString(source); String res = "Found " + bits.size() + " bits / " + bits.size()/8 + " bytes in Da...
diff --git a/demo/src/main/java/org/jboss/jdf/example/ticketmonster/util/CacheProducer.java b/demo/src/main/java/org/jboss/jdf/example/ticketmonster/util/CacheProducer.java index 054ff33..1381f92 100644 --- a/demo/src/main/java/org/jboss/jdf/example/ticketmonster/util/CacheProducer.java +++ b/demo/src/main/java/org/jbo...
true
true
public EmbeddedCacheManager getCacheContainer() { GlobalConfiguration glob = new GlobalConfigurationBuilder() .nonClusteredDefault() //Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode .globalJmxStatistics().enable() //...
public EmbeddedCacheManager getCacheContainer() { GlobalConfiguration glob = new GlobalConfigurationBuilder() .nonClusteredDefault() //Helper method that gets you a default constructed GlobalConfiguration, preconfigured for use in LOCAL mode .globalJmxStatistics().enable() //...
diff --git a/server-main/src/test/java/org/powertac/server/ServerMessageReceiverTests.java b/server-main/src/test/java/org/powertac/server/ServerMessageReceiverTests.java index 7de2666..8c6cf2f 100644 --- a/server-main/src/test/java/org/powertac/server/ServerMessageReceiverTests.java +++ b/server-main/src/test/java/org...
false
true
public void testOnMessage() throws Exception { BrokerAuthentication ba = new BrokerAuthentication(); Broker broker = new Broker("abc"); ba.setBroker(broker); String xml = converter.toXML(ba); TextMessage message = mock(TextMessage.class); when(message.getText()).thenReturn(xml); whe...
public void testOnMessage() throws Exception { Broker broker = new Broker("abc"); BrokerAuthentication ba = new BrokerAuthentication(broker); String xml = converter.toXML(ba); TextMessage message = mock(TextMessage.class); when(message.getText()).thenReturn(xml); when(converter.fromXML(...
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ExternalArchiveSourceContainerTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/sourcelookup/ExternalArchiveSourceContainerTests.java index 5ab7749cc..9b9e73bc6 100755 --- a/org.eclipse.jdt.debug.tests/tests...
true
true
protected ExternalArchiveSourceContainer getContainer(boolean detect, boolean duplicates) throws Exception { ISourceLookupDirector director = new JavaSourceLookupDirector(); director.initializeParticipants(); director.setFindDuplicates(duplicates); LibraryLocation[] locations = JavaRuntime.getLibraryLocations(...
protected ExternalArchiveSourceContainer getContainer(boolean detect, boolean duplicates) throws Exception { ISourceLookupDirector director = new JavaSourceLookupDirector(); director.initializeParticipants(); director.setFindDuplicates(duplicates); LibraryLocation[] locations = JavaRuntime.getLibraryLocations(...
diff --git a/src/msf/DatabaseImpl.java b/src/msf/DatabaseImpl.java index ab5ac46..d942f1c 100644 --- a/src/msf/DatabaseImpl.java +++ b/src/msf/DatabaseImpl.java @@ -1,325 +1,325 @@ package msf; import java.util.*; import java.sql.*; import java.io.*; import graph.Route; /* implement the old MSF RPC databa...
true
true
public Object execute(String methodName, Object[] params) throws IOException { try { if (queries.containsKey(methodName)) { String query = queries.get(methodName) + ""; Map result = new HashMap(); if (methodName.equals("db.services")) { result.put(methodName.substring(3), filterByRoute(executeQu...
public Object execute(String methodName, Object[] params) throws IOException { try { if (queries.containsKey(methodName)) { String query = queries.get(methodName) + ""; Map result = new HashMap(); if (methodName.equals("db.services")) { result.put(methodName.substring(3), filterByRoute(executeQu...
diff --git a/robot/Multiplexor.java b/robot/Multiplexor.java index 9a32b79..ad86ae8 100644 --- a/robot/Multiplexor.java +++ b/robot/Multiplexor.java @@ -1,47 +1,49 @@ import lejos.nxt.I2CPort; import lejos.nxt.I2CSensor; public class Multiplexor extends I2CSensor{ private static byte direction; private static ...
true
true
public void setMotors(int directionIndex, int speedIndex, int wheelIndex){ // sets up possible values if(directionIndex == -1){ direction = (byte)2; }else if(directionIndex == 0){ direction = (byte)0; } else if(speedIndex == 1){ direction = (byte)1; } if(speedIndex == 0){ speed = (byte)0;...
public void setMotors(int directionIndex, int speedIndex, int wheelIndex){ // sets up possible values if(directionIndex == -1){ direction = (byte)2; }else if(directionIndex == 0){ direction = (byte)0; } else if(speedIndex == 1){ direction = (byte)1; } if(speedIndex == 0){ speed = (byte)0;...
diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommFrame.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommFrame.java index c6c3c1c5e..dc382d151 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommFrame.java +++ b/src/net/java/sip/communicator/impl/gui/cust...
true
true
public void setSizeAndLocation() { ConfigurationService configService = GuiActivator.getConfigurationService(); String className = this.getClass().getName(); String widthString = configService.getString( className + ".width"); String heightString = conf...
public void setSizeAndLocation() { ConfigurationService configService = GuiActivator.getConfigurationService(); String className = this.getClass().getName(); String widthString = configService.getString( className + ".width"); String heightString = conf...
diff --git a/src/main/java/org/primefaces/component/behavior/ajax/AjaxBehaviorRenderer.java b/src/main/java/org/primefaces/component/behavior/ajax/AjaxBehaviorRenderer.java index 8b2c24941..b22957478 100644 --- a/src/main/java/org/primefaces/component/behavior/ajax/AjaxBehaviorRenderer.java +++ b/src/main/java/org/prim...
true
true
public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) { AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior; FacesContext fc = behaviorContext.getFacesContext(); UIComponent component = behaviorContext.getComponent(); String clientId = component.getC...
public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) { AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior; FacesContext fc = behaviorContext.getFacesContext(); UIComponent component = behaviorContext.getComponent(); String clientId = component.getC...
diff --git a/src/de/danoeh/antennapod/feed/FeedItem.java b/src/de/danoeh/antennapod/feed/FeedItem.java index a80460ec..9b9375f2 100644 --- a/src/de/danoeh/antennapod/feed/FeedItem.java +++ b/src/de/danoeh/antennapod/feed/FeedItem.java @@ -1,308 +1,308 @@ package de.danoeh.antennapod.feed; import java.io.InputStream...
true
true
public void updateFromOther(FeedItem other) { super.updateFromOther(other); if (other.title != null) { title = other.title; } if (other.getDescription() != null) { description = other.getDescription(); } if (other.getContentEncoded() != null) {...
public void updateFromOther(FeedItem other) { super.updateFromOther(other); if (other.title != null) { title = other.title; } if (other.getDescription() != null) { description = other.getDescription(); } if (other.getContentEncoded() != null) {...
diff --git a/src/com/nononsenseapps/ui/ListPagerAdapter.java b/src/com/nononsenseapps/ui/ListPagerAdapter.java index 3f8b24f8..dbb4002b 100644 --- a/src/com/nononsenseapps/ui/ListPagerAdapter.java +++ b/src/com/nononsenseapps/ui/ListPagerAdapter.java @@ -1,88 +1,88 @@ /** * */ package com.nononsenseapps.ui; i...
true
true
public ListPagerAdapter(Context context, final FragmentManager fm, final ExtrasCursorAdapter wrappedAdapter, final int countAdjust) { super(context, fm); this.wrappedAdapter = wrappedAdapter; this.countAdjust = countAdjust; subObserver = new DataSetObserver() { @Override public void onChanged() { ...
public ListPagerAdapter(Context context, final FragmentManager fm, final ExtrasCursorAdapter wrappedAdapter, final int countAdjust) { super(context, fm); this.wrappedAdapter = wrappedAdapter; this.countAdjust = countAdjust; subObserver = new DataSetObserver() { @Override public void onChanged() { ...
diff --git a/src/net/sf/freecol/client/gui/panel/DefaultTransferHandler.java b/src/net/sf/freecol/client/gui/panel/DefaultTransferHandler.java index 853a7ca19..3b6364f57 100644 --- a/src/net/sf/freecol/client/gui/panel/DefaultTransferHandler.java +++ b/src/net/sf/freecol/client/gui/panel/DefaultTransferHandler.java @@ ...
true
true
public boolean importData(JComponent comp, Transferable t) { try { JLabel data; /* This variable is used to temporarily keep the old selected unit, while moving cargo from one carrier to another: */ UnitLabel oldSe...
public boolean importData(JComponent comp, Transferable t) { try { JLabel data; /* This variable is used to temporarily keep the old selected unit, while moving cargo from one carrier to another: */ UnitLabel oldSe...
diff --git a/src/com/example/diceindark/DiceRender.java b/src/com/example/diceindark/DiceRender.java index 1505b2a..17201eb 100644 --- a/src/com/example/diceindark/DiceRender.java +++ b/src/com/example/diceindark/DiceRender.java @@ -1,101 +1,105 @@ package com.example.diceindark; import java.util.Random; import ...
false
true
public void renderDice() { TextureRegion keyFrame; GL10 gl = glGraphics.getGL(); gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); batcher.beginBatch(Assets.items); Die die = dice.dice.get(dice.currentDie); switch(...
public void renderDice() { TextureRegion keyFrame; GL10 gl = glGraphics.getGL(); gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); batcher.beginBatch(Assets.items); Die die = dice.dice.get(dice.currentDie); if(die....
diff --git a/src/org/acm_team/games/questforadventure/Main.java b/src/org/acm_team/games/questforadventure/Main.java index 7e42dab..a363975 100644 --- a/src/org/acm_team/games/questforadventure/Main.java +++ b/src/org/acm_team/games/questforadventure/Main.java @@ -1,65 +1,67 @@ /* * To change this template, choose T...
true
true
public static void main(String[] args) throws IOException { // init BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //Command c = new Command(); //FileDialog fail = new FileDialog(null); // welcome player System.out.println("* Welcome to the...
public static void main(String[] args) throws IOException { // init BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //Command c = new Command(); //FileDialog fail = new FileDialog(null); // welcome player System.out.println("* Welcome to the...
diff --git a/ExportPlugin/src/org/gephi/io/exporter/plugin/ExporterGraphML.java b/ExportPlugin/src/org/gephi/io/exporter/plugin/ExporterGraphML.java index 9f38fcb7e..fff767f67 100644 --- a/ExportPlugin/src/org/gephi/io/exporter/plugin/ExporterGraphML.java +++ b/ExportPlugin/src/org/gephi/io/exporter/plugin/ExporterGrap...
false
true
private void createKeys(Document document, Element root) { Element nodeLabelKeyE = document.createElement("key"); nodeLabelKeyE.setAttribute("id", "label"); nodeLabelKeyE.setAttribute("attr.name", "label"); nodeLabelKeyE.setAttribute("attr.type", "string"); nodeLabelKeyE.setA...
private void createKeys(Document document, Element root) { Element nodeLabelKeyE = document.createElement("key"); nodeLabelKeyE.setAttribute("id", "label"); nodeLabelKeyE.setAttribute("attr.name", "label"); nodeLabelKeyE.setAttribute("attr.type", "string"); nodeLabelKeyE.setA...
diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java index cbb1fcae0..0c90300cc 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceP...
true
true
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.lo...
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.lo...
diff --git a/src/plugins/Library/util/SkeletonBTreeMap.java b/src/plugins/Library/util/SkeletonBTreeMap.java index fd71490..f587608 100644 --- a/src/plugins/Library/util/SkeletonBTreeMap.java +++ b/src/plugins/Library/util/SkeletonBTreeMap.java @@ -1,1245 +1,1244 @@ /* This code is part of Freenet. It is distributed u...
false
true
protected <X extends Exception> void update( SortedSet<K> putkey, SortedSet<K> remkey, final SortedMap<K, V> putmap, Closure<Map.Entry<K, V>, X> value_handler ) throws TaskAbortException { if (value_handler == null) { // synchronous value callback - null, remkey, putmap, null assert(putkey == null); p...
protected <X extends Exception> void update( SortedSet<K> putkey, SortedSet<K> remkey, final SortedMap<K, V> putmap, Closure<Map.Entry<K, V>, X> value_handler ) throws TaskAbortException { if (value_handler == null) { // synchronous value callback - null, remkey, putmap, null assert(putkey == null); p...
diff --git a/src/com/jgaap/ui/JGAAP_UI_MainForm.java b/src/com/jgaap/ui/JGAAP_UI_MainForm.java index be1cd40..80df3b5 100644 --- a/src/com/jgaap/ui/JGAAP_UI_MainForm.java +++ b/src/com/jgaap/ui/JGAAP_UI_MainForm.java @@ -1,3043 +1,3043 @@ /* * JGAAP -- a graphical program for stylometric authorship attribution * C...
true
true
private void initComponents() { helpDialog = new javax.swing.JDialog(); helpCloseButton = new javax.swing.JButton(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel23 = new javax.swing.JLabel(); ...
private void initComponents() { helpDialog = new javax.swing.JDialog(); helpCloseButton = new javax.swing.JButton(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel23 = new javax.swing.JLabel(); ...
diff --git a/src/GPS.java b/src/GPS.java index 8415a1b..a85f7a8 100644 --- a/src/GPS.java +++ b/src/GPS.java @@ -1,139 +1,139 @@ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author jonathan */ public class GPS extends Mod { /** * * NO...
true
true
protected String generateOrientation(Float degrees) { degrees = (degrees+270)%360; String textDirection = ""; // Determine North/South facing. if( degrees <= 78.75 || degrees > 281.25 ) { textDirection = "N"; } else if( degrees > 101.25 && degrees <= 258.75 ) { textDirection = "S"; } // Determine...
protected String generateOrientation(Float degrees) { degrees = (degrees+270)%360; String textDirection = ""; // Determine North/South facing. if( degrees <= 78.75 || degrees > 281.25 ) { textDirection = "N"; } else if( degrees > 101.25 && degrees <= 258.75 ) { textDirection = "S"; } // Determine...
diff --git a/platform-core/plugins/org.eclipse.core.filesystem.ftp/src/org/eclipse/core/internal/filesystem/ftp/FTPUtil.java b/platform-core/plugins/org.eclipse.core.filesystem.ftp/src/org/eclipse/core/internal/filesystem/ftp/FTPUtil.java index e9439019..ecf5d851 100644 --- a/platform-core/plugins/org.eclipse.core.file...
true
true
public static void run(URL url, IFtpRunnable runnable, IProgressMonitor monitor) throws FtpException { monitor = Policy.monitorFor(monitor); IClient openClient = (IClient) openClients.get(); monitor.beginTask(null, 100); //if the wrong client is connected, disconnect before trying again if (openClient != nul...
public static void run(URL url, IFtpRunnable runnable, IProgressMonitor monitor) throws FtpException { monitor = Policy.monitorFor(monitor); IClient openClient = (IClient) openClients.get(); monitor.beginTask("", 100); //if the wrong client is connected, disconnect before trying again if (openClient != null ...
diff --git a/quaketables2/webapp/WEB-INF/classes/edu/usc/sirlab/kml/KMLMapGenerator.java b/quaketables2/webapp/WEB-INF/classes/edu/usc/sirlab/kml/KMLMapGenerator.java index 6ada126..8614ca3 100644 --- a/quaketables2/webapp/WEB-INF/classes/edu/usc/sirlab/kml/KMLMapGenerator.java +++ b/quaketables2/webapp/WEB-INF/classes...
true
true
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { DatabaseQuery dbQuery; HttpSession session = request.getSession(true); KMLDocument kml = new KMLDocument(); String fileName = DEFAULT_FILENAME_PREFIX + DEFAULT_FILENAME_SUFFIX; int countInSAR...
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { DatabaseQuery dbQuery; HttpSession session = request.getSession(true); KMLDocument kml = new KMLDocument(); String fileName = DEFAULT_FILENAME_PREFIX + DEFAULT_FILENAME_SUFFIX; int countInSAR...
diff --git a/src/amidst/gui/VersionSelectWindow.java b/src/amidst/gui/VersionSelectWindow.java index cd29849..5f2d5c4 100644 --- a/src/amidst/gui/VersionSelectWindow.java +++ b/src/amidst/gui/VersionSelectWindow.java @@ -1,103 +1,102 @@ package amidst.gui; import java.awt.Dimension; import java.awt.GridLayout; im...
true
true
public VersionSelectWindow() { setIconImage(Amidst.icon); File profileJsonFile = new File(Util.minecraftDirectory + "/launcher_profiles.json"); Object[] profileArray = null; try { LauncherProfile profile = Util.readObject(profileJsonFile, LauncherProfile.class); // TODO This should use latest, not ...
public VersionSelectWindow() { setIconImage(Amidst.icon); File profileJsonFile = new File(Util.minecraftDirectory + "/launcher_profiles.json"); Object[] profileArray = null; try { LauncherProfile profile = Util.readObject(profileJsonFile, LauncherProfile.class); // TODO This should use latest, not ...
diff --git a/web/src/test/java/org/mule/galaxy/atom/ArtifactCollectionTest.java b/web/src/test/java/org/mule/galaxy/atom/ArtifactCollectionTest.java index 8cc20bc2..19b236e9 100755 --- a/web/src/test/java/org/mule/galaxy/atom/ArtifactCollectionTest.java +++ b/web/src/test/java/org/mule/galaxy/atom/ArtifactCollectionTes...
true
true
public void testAddWsdl() throws Exception { AbderaClient client = new AbderaClient(abdera); RequestOptions defaultOpts = client.getDefaultRequestOptions(); defaultOpts.setAuthorization("Basic " + Base64.encode("admin:admin".getBytes())); String base = "http://localhost:9002...
public void testAddWsdl() throws Exception { AbderaClient client = new AbderaClient(abdera); RequestOptions defaultOpts = client.getDefaultRequestOptions(); defaultOpts.setAuthorization("Basic " + Base64.encode("admin:admin".getBytes())); String base = "http://localhost:9002...
diff --git a/server/src/main/java/com/metamx/druid/index/v1/IncrementalIndexStorageAdapter.java b/server/src/main/java/com/metamx/druid/index/v1/IncrementalIndexStorageAdapter.java index bf8e0ac965..8ec2cc10f5 100644 --- a/server/src/main/java/com/metamx/druid/index/v1/IncrementalIndexStorageAdapter.java +++ b/server/s...
true
true
public Iterable<Cursor> makeCursors(final Filter filter, final Interval interval, final QueryGranularity gran) { Interval actualIntervalTmp = interval; Interval dataInterval = getInterval(); if (!actualIntervalTmp.overlaps(dataInterval)) { return ImmutableList.of(); } if (actualIntervalTm...
public Iterable<Cursor> makeCursors(final Filter filter, final Interval interval, final QueryGranularity gran) { Interval actualIntervalTmp = interval; Interval dataInterval = getInterval(); if (!actualIntervalTmp.overlaps(dataInterval)) { return ImmutableList.of(); } if (actualIntervalTm...
diff --git a/src/main/java/org/cc/response/CloudInvalidArgsResponse.java b/src/main/java/org/cc/response/CloudInvalidArgsResponse.java index 6c77b46..4d26298 100644 --- a/src/main/java/org/cc/response/CloudInvalidArgsResponse.java +++ b/src/main/java/org/cc/response/CloudInvalidArgsResponse.java @@ -1,32 +1,36 @@ pack...
false
true
public CloudInvalidArgsResponse(BindException e) { super(e); errors = new ArrayList<InvalidField>(e.getErrorCount()); for (FieldError error : e.getFieldErrors()) { errors.add(new InvalidField(error.getField(), error.getDefaultMessage())); } }
public CloudInvalidArgsResponse(BindException e) { super(e); StringBuilder builder = new StringBuilder(); errors = new ArrayList<InvalidField>(e.getErrorCount()); for (FieldError error : e.getFieldErrors()) { errors.add(new InvalidField(error.getField(), error.getDefaultM...
diff --git a/IndexWriter.java b/IndexWriter.java index 1dbe202..809fec6 100644 --- a/IndexWriter.java +++ b/IndexWriter.java @@ -1,469 +1,469 @@ /* This code is part of Freenet. It is distributed under the GNU General * Public License, version 2 (or at your option any later version). See * http://www.gnu.org/ for ...
true
true
private boolean generateXML(PerstRoot perstRoot, String prefix) throws IOException { final Config config = perstRoot.getConfig(); final long MAX_SIZE = config.getIndexSubindexMaxSize(); final int MAX_ENTRIES = config.getIndexMaxEntries(); File outputFile = new File(config.getIndexDir() + "index_" + prefix +...
private boolean generateXML(PerstRoot perstRoot, String prefix) throws IOException { final Config config = perstRoot.getConfig(); final long MAX_SIZE = config.getIndexSubindexMaxSize(); final int MAX_ENTRIES = config.getIndexMaxEntries(); File outputFile = new File(config.getIndexDir() + "index_" + prefix +...
diff --git a/modules/jetty/src/main/java/org/mortbay/jetty/servlet/DefaultServlet.java b/modules/jetty/src/main/java/org/mortbay/jetty/servlet/DefaultServlet.java index 54cb220b7..a398e3779 100644 --- a/modules/jetty/src/main/java/org/mortbay/jetty/servlet/DefaultServlet.java +++ b/modules/jetty/src/main/java/org/mortb...
true
true
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String servletPath=null; String pathInfo=null; Enumeration reqRanges = null; Boolean included =(Boolean)request.getAttribute(Dispatcher.__INCLUDE_JETTY); ...
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String servletPath=null; String pathInfo=null; Enumeration reqRanges = null; Boolean included =(Boolean)request.getAttribute(Dispatcher.__INCLUDE_JETTY); ...
diff --git a/src/java/org/infoglue/cms/util/graphics/ThumbnailGenerator.java b/src/java/org/infoglue/cms/util/graphics/ThumbnailGenerator.java index 12794d55a..dd1b56d54 100755 --- a/src/java/org/infoglue/cms/util/graphics/ThumbnailGenerator.java +++ b/src/java/org/infoglue/cms/util/graphics/ThumbnailGenerator.java @@ ...
true
true
public void transform(String originalFile, String thumbnailFile, int thumbWidth, int thumbHeight, int quality) throws Exception { Image image = javax.imageio.ImageIO.read(new File(originalFile)); double thumbRatio = (double)thumbWidth / (double)thumbHeight; int imageWidth = image.getWidth(null); i...
public void transform(String originalFile, String thumbnailFile, int thumbWidth, int thumbHeight, int quality) throws Exception { Image image = javax.imageio.ImageIO.read(new File(originalFile)); double thumbRatio = (double)thumbWidth / (double)thumbHeight; int imageWidth = image.getWidth(null); i...
diff --git a/src/java/main/ca/nengo/ui/actions/PasteAction.java b/src/java/main/ca/nengo/ui/actions/PasteAction.java index 16742c76..0bc32a9f 100644 --- a/src/java/main/ca/nengo/ui/actions/PasteAction.java +++ b/src/java/main/ca/nengo/ui/actions/PasteAction.java @@ -1,86 +1,90 @@ /* The contents of this file are subj...
true
true
protected void action() throws ActionException { ArrayList<Node> nodes = NengoGraphics.getInstance().getClipboard().getContents(); ArrayList<Point2D> offsets = NengoGraphics.getInstance().getClipboard().getOffsets(); if (nodes != null && nodes.size() > 0) { for (int i = 0; ...
protected void action() throws ActionException { ArrayList<Node> nodes = NengoGraphics.getInstance().getClipboard().getContents(); ArrayList<Point2D> offsets = NengoGraphics.getInstance().getClipboard().getOffsets(); if (nodes != null && nodes.size() > 0) { for (int i = 0; ...
diff --git a/src/com/google/ruvolof/randomsequencegenerator/Rsg_main.java b/src/com/google/ruvolof/randomsequencegenerator/Rsg_main.java index 13fcc74..5608151 100644 --- a/src/com/google/ruvolof/randomsequencegenerator/Rsg_main.java +++ b/src/com/google/ruvolof/randomsequencegenerator/Rsg_main.java @@ -1,118 +1,118 @@...
true
true
public void onClick (View v) { int clicked = v.getId(); switch (clicked) { case R.id.button_create: String chars = "0"; String result = ""; RadioGroup rg = (RadioGroup)findViewById(R.id.radio_group); int selected = rg.getCheckedRadioButtonId(); ...
public void onClick (View v) { int clicked = v.getId(); switch (clicked) { case R.id.button_create: String chars = ""; String result = ""; RadioGroup rg = (RadioGroup)findViewById(R.id.radio_group); int selected = rg.getCheckedRadioButtonId(); ...
diff --git a/src/me/cyberpew/moovr/MoovrBlock.java b/src/me/cyberpew/moovr/MoovrBlock.java index cc830b3..d9a1555 100644 --- a/src/me/cyberpew/moovr/MoovrBlock.java +++ b/src/me/cyberpew/moovr/MoovrBlock.java @@ -1,47 +1,44 @@ package me.cyberpew.moovr; import org.bukkit.Material; import org.bukkit.block.Block; i...
false
true
public void onPlayerMoveEvent(PlayerMoveEvent event) { event.getFrom().getBlock().getLocation() .equals(event.getTo().getBlock().getLocation()); Player player = event.getPlayer(); Block block = player.getLocation().getBlock(); Block blockAbove = block.getRelative(BlockFace.UP); Block blockJump = block.g...
public void onPlayerMoveEvent(PlayerMoveEvent event) { event.getFrom().getBlock().getLocation().equals(event.getTo().getBlock().getLocation()); Player player = event.getPlayer(); Block block = player.getLocation().getBlock(); Block blockAbove = block.getRelative(BlockFace.UP); Block blockJump = block.getRel...
diff --git a/src/main/java/stormpot/benchmark/SingleThreadedBenchmark.java b/src/main/java/stormpot/benchmark/SingleThreadedBenchmark.java index 82b83e8..b87997e 100644 --- a/src/main/java/stormpot/benchmark/SingleThreadedBenchmark.java +++ b/src/main/java/stormpot/benchmark/SingleThreadedBenchmark.java @@ -1,38 +1,38 ...
false
true
public void runSession(Recorder mainRecorder) throws Exception { for (int i = 0; i < 1000 * 1000; i++) { long begin = mainRecorder.begin(); Object obj = pool.claim(); pool.release(obj); mainRecorder.record(begin); } }
public void runSession(Recorder recorder) throws Exception { for (int i = 0; i < 1000 * 1000; i++) { long begin = recorder.begin(); Object obj = pool.claim(); pool.release(obj); recorder.record(begin); } }
diff --git a/src/powercrystals/minefactoryreloaded/block/BlockRubberWood.java b/src/powercrystals/minefactoryreloaded/block/BlockRubberWood.java index c70b7cf4..e7b7c5c5 100644 --- a/src/powercrystals/minefactoryreloaded/block/BlockRubberWood.java +++ b/src/powercrystals/minefactoryreloaded/block/BlockRubberWood.java @...
true
true
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); drops.add(new ItemStack(blockID, 1, 0)); if((metadata & 3) > 0) { drops.add(new ItemStack(MineFactoryReloadedCore.rawRubberItem, 1 + world.r...
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); drops.add(new ItemStack(blockID, 1, 0)); if((metadata & 3) > 0) { drops.add(new ItemStack(MineFactoryReloadedCore.rawRubberItem, fortune <= ...
diff --git a/grails/src/web/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.java b/grails/src/web/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.java index 967fac51b..0fdd433fd 100644 --- a/grails/src/web/org/codehaus/groovy/grails/web/metaclass/RenderDynamicMethod.java +++ b/grails/src/web/o...
true
true
public Object invoke(Object target, Object[] arguments) { if(arguments.length == 0) throw new MissingMethodException(METHOD_SIGNATURE,target.getClass(),arguments); boolean renderView = true; GroovyObject controller = (GroovyObject)target; if((arguments[0] instanceof Stri...
public Object invoke(Object target, Object[] arguments) { if(arguments.length == 0) throw new MissingMethodException(METHOD_SIGNATURE,target.getClass(),arguments); boolean renderView = true; GroovyObject controller = (GroovyObject)target; if((arguments[0] instanceof Stri...
diff --git a/src/app/navigps/gui/ToolBar/NaviToolBar.java b/src/app/navigps/gui/ToolBar/NaviToolBar.java index 91116af..cd7f9ad 100644 --- a/src/app/navigps/gui/ToolBar/NaviToolBar.java +++ b/src/app/navigps/gui/ToolBar/NaviToolBar.java @@ -1,117 +1,118 @@ /* * NaviToolbar.java * * Created on 2009-04-15, 20:45:3...
false
true
private void animationBounds(Component comp,Rectangle newrec){ Rectangle oldrec = comp.getBounds();//current position if(newrec.equals(oldrec)){ //System.out.println("the same rect, return"); return; } comp.setLocation(newrec.x, newrec.y); Dimension ol...
private void animationBounds(Component comp,Rectangle newrec){ Rectangle oldrec = comp.getBounds();//current position if(newrec.equals(oldrec)){ //System.out.println("the same rect, return"); return; } comp.setLocation(newrec.x, newrec.y); Dimension ol...
diff --git a/src/jclustering/metrics/Mahalanobis.java b/src/jclustering/metrics/Mahalanobis.java index 7409c23..7001bc3 100755 --- a/src/jclustering/metrics/Mahalanobis.java +++ b/src/jclustering/metrics/Mahalanobis.java @@ -1,84 +1,84 @@ package jclustering.metrics; import java.util.Arrays; import org.apache.co...
true
true
public double distance(double[] centroid, double[] data) { // Need some data before starting if (!init) { _init(); } // If the arrays are the same, the distance is 0.0 if (Arrays.equals(centroid, data)) { return 0.0; } ...
public double distance(double[] centroid, double[] data) { // Need some data before starting if (!init) { _init(); } // If the arrays are the same, the distance is 0.0 if (Arrays.equals(centroid, data)) { return 0.0; } ...
diff --git a/src/gov/nist/javax/sip/stack/IOHandler.java b/src/gov/nist/javax/sip/stack/IOHandler.java index c5795733..072ec1d9 100755 --- a/src/gov/nist/javax/sip/stack/IOHandler.java +++ b/src/gov/nist/javax/sip/stack/IOHandler.java @@ -1,715 +1,715 @@ /* * Conditions Of Use * * This software was developed by ...
true
true
public Socket sendBytes(InetAddress senderAddress, InetAddress receiverAddress, int contactPort, String transport, byte[] bytes, boolean isClient, MessageChannel messageChannel) throws IOException { int retry_count = 0; int max_retry = isClient ? 2 : 1; //...
public Socket sendBytes(InetAddress senderAddress, InetAddress receiverAddress, int contactPort, String transport, byte[] bytes, boolean isClient, MessageChannel messageChannel) throws IOException { int retry_count = 0; int max_retry = isClient ? 2 : 1; //...
diff --git a/src/com/xabber/android/data/message/MessageManager.java b/src/com/xabber/android/data/message/MessageManager.java index 81d1d015..12a7ccfa 100644 --- a/src/com/xabber/android/data/message/MessageManager.java +++ b/src/com/xabber/android/data/message/MessageManager.java @@ -1,582 +1,584 @@ /** * Copyrigh...
true
true
public File exportChat(String account, String user, String fileName) throws NetworkException { final File file = new File(Environment.getExternalStorageDirectory(), fileName); try { BufferedWriter out = new BufferedWriter(new FileWriter(file)); final String titleName = RosterManager.getInstance().getN...
public File exportChat(String account, String user, String fileName) throws NetworkException { final File file = new File(Environment.getExternalStorageDirectory(), fileName); try { BufferedWriter out = new BufferedWriter(new FileWriter(file)); final String titleName = RosterManager.getInstance().getN...
diff --git a/src/com/android/camera/ImageViewTouchBase.java b/src/com/android/camera/ImageViewTouchBase.java index da2f2c32..bc33827a 100644 --- a/src/com/android/camera/ImageViewTouchBase.java +++ b/src/com/android/camera/ImageViewTouchBase.java @@ -1,377 +1,377 @@ /* * Copyright (C) 2009 The Android Open Source Pr...
true
true
protected void center(boolean vertical, boolean horizontal) { if (mBitmapDisplayed == null) { return; } Matrix m = getImageViewMatrix(); float [] topLeft = new float[] { 0, 0 }; float [] botRight = new float[] { mBitmapDisplayed.getWidth(), ...
protected void center(boolean horizontal, boolean vertical) { if (mBitmapDisplayed == null) { return; } Matrix m = getImageViewMatrix(); float [] topLeft = new float[] { 0, 0 }; float [] botRight = new float[] { mBitmapDisplayed.getWidth(), ...