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/uCars/src/com/useful/ucars/ucars.java b/uCars/src/com/useful/ucars/ucars.java index 5a41440..e442855 100644 --- a/uCars/src/com/useful/ucars/ucars.java +++ b/uCars/src/com/useful/ucars/ucars.java @@ -1,572 +1,579 @@ package com.useful.ucars; import java.io.File; import java.io.FileInputStream; import...
false
true
private Boolean setupProtocol(){ try { this.protocolLib = true; this.protocolManager = ProtocolLibrary.getProtocolManager(); /* ((ProtocolManager)this.protocolManager).addPacketListener(new PacketAdapter(plugin, ConnectionSide.CLIENT_SIDE, ListenerPriority.NORMAL, 0x1b) { ...
private Boolean setupProtocol(){ try { this.protocolLib = true; this.protocolManager = ProtocolLibrary.getProtocolManager(); /* ((ProtocolManager)this.protocolManager).addPacketListener(new PacketAdapter(plugin, ConnectionSide.CLIENT_SIDE, ListenerPriority.NORMAL, 0x1b) { ...
diff --git a/src/main/java/jp/dip/komusubi/lunch/wicket/panel/Header.java b/src/main/java/jp/dip/komusubi/lunch/wicket/panel/Header.java index 59e7949..0727af1 100644 --- a/src/main/java/jp/dip/komusubi/lunch/wicket/panel/Header.java +++ b/src/main/java/jp/dip/komusubi/lunch/wicket/panel/Header.java @@ -1,157 +1,158 @@...
true
true
private Link<Void> getAuthLink(String id, final boolean visible) { Link<Void> link; String label; if (WicketSession.get().isSignedIn()) { link = new Link<Void>(id) { private static final long serialVersionUID = 1L; @Override public void onClick() { logger.info("{} is logout", WicketSess...
private Link<Void> getAuthLink(String id, final boolean visible) { Link<Void> link; String label; if (WicketSession.get().isSignedIn()) { link = new Link<Void>(id) { private static final long serialVersionUID = 1L; @Override public void onClick() { logger.info("{} is logout", WicketSess...
diff --git a/src/main/java/de/dfki/km/json/jsonld/impl/JenaJSONLDSerializer.java b/src/main/java/de/dfki/km/json/jsonld/impl/JenaJSONLDSerializer.java index 848ae59..9d66e23 100644 --- a/src/main/java/de/dfki/km/json/jsonld/impl/JenaJSONLDSerializer.java +++ b/src/main/java/de/dfki/km/json/jsonld/impl/JenaJSONLDSeriali...
true
true
public void importModel(Model model) { // add the prefixes to the context Map<String, String> nsPrefixMap = model.getNsPrefixMap(); for (String prefix : nsPrefixMap.keySet()) { setPrefix(prefix, nsPrefixMap.get(prefix)); } // iterate over the list of subjects an...
public void importModel(Model model) { // add the prefixes to the context Map<String, String> nsPrefixMap = model.getNsPrefixMap(); for (String prefix : nsPrefixMap.keySet()) { setPrefix(nsPrefixMap.get(prefix), prefix); } // iterate over the list of subjects an...
diff --git a/src/main/java/de/cismet/cismap/navigatorplugin/metasearch/SearchTopicsPanel.java b/src/main/java/de/cismet/cismap/navigatorplugin/metasearch/SearchTopicsPanel.java index 1c26b2b..9c2a3cf 100644 --- a/src/main/java/de/cismet/cismap/navigatorplugin/metasearch/SearchTopicsPanel.java +++ b/src/main/java/de/cis...
false
true
public void setSearchTopics(final Collection<SearchTopic> searchTopics) { if ((searchTopics == null) || searchTopics.isEmpty()) { return; } this.searchTopics.clear(); removeAll(); if (LOG.isDebugEnabled()) { LOG.debug("Setting search topics: " + searc...
public void setSearchTopics(final Collection<SearchTopic> searchTopics) { if ((searchTopics == null) || searchTopics.isEmpty()) { return; } this.searchTopics.clear(); removeAll(); if (LOG.isDebugEnabled()) { LOG.debug("Setting search topics: " + searc...
diff --git a/nexus/nexus-plugins/nexus-plugin-manager/src/main/java/org/sonatype/nexus/plugins/DefaultNexusPluginManager.java b/nexus/nexus-plugins/nexus-plugin-manager/src/main/java/org/sonatype/nexus/plugins/DefaultNexusPluginManager.java index 86540d611..e3b3ee454 100644 --- a/nexus/nexus-plugins/nexus-plugin-manage...
false
true
protected PluginResponse doActivatePlugin( PluginRepositoryArtifact pluginArtifact ) { PluginCoordinates pluginCoordinates = new PluginCoordinates( pluginArtifact.getCoordinate() ); PluginResponse result = new PluginResponse( pluginCoordinates ); ClassRealm pluginRealm = null; ...
protected PluginResponse doActivatePlugin( PluginRepositoryArtifact pluginArtifact ) { PluginCoordinates pluginCoordinates = new PluginCoordinates( pluginArtifact.getCoordinate() ); PluginResponse result = new PluginResponse( pluginCoordinates ); ClassRealm pluginRealm = null; ...
diff --git a/native/SalesforceSDK/src/com/salesforce/androidsdk/push/PushService.java b/native/SalesforceSDK/src/com/salesforce/androidsdk/push/PushService.java index f288b82a3..06f847811 100644 --- a/native/SalesforceSDK/src/com/salesforce/androidsdk/push/PushService.java +++ b/native/SalesforceSDK/src/com/salesforce/...
false
true
protected void onHandleIntent(Intent intent) { final Context context = SalesforceSDKManager.getInstance().getAppContext(); /* * Grabs the extras from the intent, and determines based on the * bundle whether to perform the operation for all accounts or * just the specified account that's passed in. */ ...
protected void onHandleIntent(Intent intent) { final Context context = SalesforceSDKManager.getInstance().getAppContext(); /* * Grabs the extras from the intent, and determines based on the * bundle whether to perform the operation for all accounts or * just the specified account that's passed in. */ ...
diff --git a/src/main/java/to/joe/bungee/SQLHandler.java b/src/main/java/to/joe/bungee/SQLHandler.java index fd9c8c6..120bc6d 100644 --- a/src/main/java/to/joe/bungee/SQLHandler.java +++ b/src/main/java/to/joe/bungee/SQLHandler.java @@ -1,160 +1,159 @@ package to.joe.bungee; import java.sql.PreparedStatement; impo...
false
true
public static List<String> iplookup(String username) { final ArrayList<String> list = new ArrayList<String>(); try { final SQLConnection con = SQLHandler.instance().manager.getQueryConnection(); PreparedStatement statement = con.getConnection().prepareStatement("SELECT `IP` F...
public static List<String> iplookup(String username) { final ArrayList<String> list = new ArrayList<String>(); try { final SQLConnection con = SQLHandler.instance().manager.getQueryConnection(); PreparedStatement statement = con.getConnection().prepareStatement("SELECT `IP` F...
diff --git a/src/com/wolvencraft/prison/mines/settings/Settings.java b/src/com/wolvencraft/prison/mines/settings/Settings.java index 3aad285..3b1dde5 100644 --- a/src/com/wolvencraft/prison/mines/settings/Settings.java +++ b/src/com/wolvencraft/prison/mines/settings/Settings.java @@ -1,29 +1,32 @@ package com.wolvencr...
true
true
public Settings(PrisonMine plugin) { super(PrisonMine.getPrisonSuite()); PLAYERS_TP_ON_RESET = plugin.getConfig().getBoolean("players.teleport-players-out-of-the-mine"); RESET_FORCE_TIMER_UPDATE = plugin.getConfig().getBoolean("reset.force-reset-timer-on-mine-reset"); RESET_ALL_MINES_ON_STARTUP = plugin.getCon...
public Settings(PrisonMine plugin) { super(PrisonMine.getPrisonSuite()); PLAYERS_TP_ON_RESET = plugin.getConfig().getBoolean("players.teleport-players-out-of-the-mine"); RESET_FORCE_TIMER_UPDATE = plugin.getConfig().getBoolean("reset.force-reset-timer-on-mine-reset"); RESET_ALL_MINES_ON_STARTUP = plugin.getCon...
diff --git a/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/support/TestUtil.java b/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/support/TestUtil.java index 6f895f752..3a2625758 100644 --- a/org.eclipse.mylyn.context.tests/src/org/eclipse/mylyn/context/tests/support/TestUtil....
true
true
public static Credentials readCredentials(PrivilegeLevel level, String realm) { Properties properties = new Properties(); try { String filename = System.getProperty(KEY_CREDENTIALS_FILE); if (filename == null) { URL localURL = FileLocator.toFileURL(ContextTestsPlugin.getDefault().getBundle().getEntry( ...
public static Credentials readCredentials(PrivilegeLevel level, String realm) { Properties properties = new Properties(); try { String filename = System.getProperty(KEY_CREDENTIALS_FILE); if (filename == null) { if (ContextTestsPlugin.getDefault() != null) { URL localURL = FileLocator.toFileURL(Cont...
diff --git a/twitter4j-core/src/test/java/twitter4j/internal/KryoSerializationTest.java b/twitter4j-core/src/test/java/twitter4j/internal/KryoSerializationTest.java index f19918e9..4670d5ac 100644 --- a/twitter4j-core/src/test/java/twitter4j/internal/KryoSerializationTest.java +++ b/twitter4j-core/src/test/java/twitter...
true
true
protected void setUp() throws Exception { super.setUp(); kryo = new Kryo(); kryo.register(java.lang.String[].class); kryo.register(long[].class); kryo.register(java.util.Date.class); kryo.register(twitter4j.HashtagEntity[].class); kryo.register(twitter4j.URLE...
protected void setUp() throws Exception { super.setUp(); kryo = new Kryo(); kryo.register(java.lang.String[].class); kryo.register(long[].class); kryo.register(java.util.Date.class); kryo.register(twitter4j.HashtagEntity[].class); kryo.register(twitter4j.URLE...
diff --git a/fap/app/models/RegistroModificacion.java b/fap/app/models/RegistroModificacion.java index 345e3483..9a021af9 100644 --- a/fap/app/models/RegistroModificacion.java +++ b/fap/app/models/RegistroModificacion.java @@ -1,79 +1,79 @@ package models; import java.util.*; import javax.persistence.*; import pl...
false
true
public String getEstado() { if (this.registro.fasesRegistro.registro) return EstadosModificacionEnum.registrada.value(); // Registrada correctamente (Presentada en tiempo y forma) else if ((this.fechaCancelacion == null) && (this.fechaRegistro == null) && (this.fechaLimite != null) && (this.fechaLimite.isBefore...
public String getEstado() { if (this.registro.fasesRegistro.registro) return EstadosModificacionEnum.registrada.name(); // Registrada correctamente (Presentada en tiempo y forma) else if ((this.fechaCancelacion == null) && (this.fechaRegistro == null) && (this.fechaLimite != null) && (this.fechaLimite.isBeforeN...
diff --git a/src/main/java/org/jasig/portlet/calendar/processor/ICalendarContentProcessorImpl.java b/src/main/java/org/jasig/portlet/calendar/processor/ICalendarContentProcessorImpl.java index 1fe0541..d164f39 100644 --- a/src/main/java/org/jasig/portlet/calendar/processor/ICalendarContentProcessorImpl.java +++ b/src/m...
true
true
protected final Set<CalendarEvent> convertCalendarToEvents(Long calendarId, net.fortuna.ical4j.model.Calendar calendar, Period period) throws CalendarException { Set<CalendarEvent> events = new HashSet<CalendarEvent>(); // if the calendar is null, return empty set if (calendar == null) { log.warn("cal...
protected final Set<CalendarEvent> convertCalendarToEvents(Long calendarId, net.fortuna.ical4j.model.Calendar calendar, Period period) throws CalendarException { Set<CalendarEvent> events = new HashSet<CalendarEvent>(); // if the calendar is null, return empty set if (calendar == null) { log.warn("cal...
diff --git a/judge_server/src/main/cn/edu/zju/acm/onlinejudge/action/EditRoleAction.java b/judge_server/src/main/cn/edu/zju/acm/onlinejudge/action/EditRoleAction.java index 5576d92..a4e79a4 100644 --- a/judge_server/src/main/cn/edu/zju/acm/onlinejudge/action/EditRoleAction.java +++ b/judge_server/src/main/cn/edu/zju/ac...
true
true
public ActionForward execute(ActionMapping mapping, ActionForm form, ContextAdapter context) throws Exception { // check admin ActionForward forward = this.checkAdmin(mapping, context); if (forward != null) { return forward; } RoleForm roleForm = (RoleForm) form...
public ActionForward execute(ActionMapping mapping, ActionForm form, ContextAdapter context) throws Exception { // check admin ActionForward forward = this.checkAdmin(mapping, context); if (forward != null) { return forward; } RoleForm roleForm = (RoleForm) form...
diff --git a/dsd-maven-plugin/src/main/java/org/melati/poem/prepro/TableDef.java b/dsd-maven-plugin/src/main/java/org/melati/poem/prepro/TableDef.java index a6ec10b9f..61e9203d5 100644 --- a/dsd-maven-plugin/src/main/java/org/melati/poem/prepro/TableDef.java +++ b/dsd-maven-plugin/src/main/java/org/melati/poem/prepro/T...
false
true
public void generateTableBaseJava(Writer w) throws IOException { w.write("public class " + tableBaseClass + " extends " + (superclass == null ? "" : superclass) + "Table {\n" + "\n"); for (Enumeration f = data.elements(); f.hasMoreElements();) { w.write(" private "); ...
public void generateTableBaseJava(Writer w) throws IOException { w.write("public class " + tableBaseClass + " extends " + (superclass == null ? "" : superclass) + "Table {\n" + "\n"); for (Enumeration f = data.elements(); f.hasMoreElements();) { w.write(" private "); ...
diff --git a/simulator/Board.java b/simulator/Board.java index fa0af72..3a2c0ce 100644 --- a/simulator/Board.java +++ b/simulator/Board.java @@ -1,566 +1,542 @@ import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.awt.Shape; im...
true
true
public void movePerson(Visitor visitor) { Point p = searchNearestDestination(visitor.getDestination(), visitor); Point space = getAvailableSpace((int)(p.getX()), (int)(p.getY())); int x = (int) (space.getX()/4 * 4); int y = (int) (space.getY()/4 * 4); // Visitor otherPersonLeft = new Visitor(visitor.getX()...
public void movePerson(Visitor visitor) { Point p = searchNearestDestination(visitor.getDestination(), visitor); Point space = getAvailableSpace((int)(p.getX()), (int)(p.getY())); int x = (int) (space.getX()/4 * 4); int y = (int) (space.getY()/4 * 4); // Visitor otherPersonLeft = new Visitor(visitor.getX()...
diff --git a/java/src/org/broadinstitute/sting/alignment/bwa/BWACAligner.java b/java/src/org/broadinstitute/sting/alignment/bwa/BWACAligner.java index 1e3ace84d..1aff4b8b6 100644 --- a/java/src/org/broadinstitute/sting/alignment/bwa/BWACAligner.java +++ b/java/src/org/broadinstitute/sting/alignment/bwa/BWACAligner.java...
false
true
public static void main(String[] args) { String prefix = "/Users/mhanna/reference/Ecoli/Escherichia_coli_K12_MG1655.fasta"; BWACAligner thunk = new BWACAligner(prefix + ".ann", prefix + ".amb", prefix + ".pac", ...
public static void main(String[] args) { String prefix = "/Users/mhanna/reference/Ecoli/Escherichia_coli_K12_MG1655.fasta"; BWACAligner thunk = new BWACAligner(prefix + ".ann", prefix + ".amb", prefix + ".pac", ...
diff --git a/cucumber/src/org/jetbrains/plugins/cucumber/inspections/GherkinBrokenTableInspection.java b/cucumber/src/org/jetbrains/plugins/cucumber/inspections/GherkinBrokenTableInspection.java index 995a5918e4..aff41194df 100644 --- a/cucumber/src/org/jetbrains/plugins/cucumber/inspections/GherkinBrokenTableInspectio...
true
true
public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) { return new GherkinElementVisitor() { @Override public void visitScenarioOutline(GherkinScenarioOutline outline) { final List<GherkinExamplesBlock> examples = outline.getExamplesBlocks(); i...
public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, boolean isOnTheFly) { return new GherkinElementVisitor() { @Override public void visitScenarioOutline(GherkinScenarioOutline outline) { final List<GherkinExamplesBlock> examples = outline.getExamplesBlocks(); f...
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java index f34f57ae..10b46bd7 100644 --- a/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java +++ b/src/org/apache/xerces/impl/xs/traversers/XSDSimpleType...
false
true
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XST...
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XST...
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java index 4ad44aca6..bd408abe9 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/intern...
true
true
private void createAttachmentTable(FormToolkit toolkit, final Composite attachmentsComposite) { Table attachmentsTable = toolkit.createTable(attachmentsComposite, SWT.MULTI | SWT.FULL_SELECTION); attachmentsTable.setLinesVisible(true); attachmentsTable.setHeaderVisible(true); attachmentsTable.setLayout(new Gri...
private void createAttachmentTable(FormToolkit toolkit, final Composite attachmentsComposite) { Table attachmentsTable = toolkit.createTable(attachmentsComposite, SWT.MULTI | SWT.FULL_SELECTION); attachmentsTable.setLinesVisible(true); attachmentsTable.setHeaderVisible(true); attachmentsTable.setLayout(new Gri...
diff --git a/carrot2/components/carrot2-input-yahooapi/src-test/org/carrot2/input/yahooapi/YahooApiInputComponentTest.java b/carrot2/components/carrot2-input-yahooapi/src-test/org/carrot2/input/yahooapi/YahooApiInputComponentTest.java index 4871eeb3f..0ca7f3368 100644 --- a/carrot2/components/carrot2-input-yahooapi/src...
true
true
public void testApacheAntQuery() throws Exception { final LocalComponentFactory inputFactory = new LocalComponentFactory() { public LocalComponent getInstance() { return new YahooApiInputComponent(); } }; LocalControllerBase controller = setUpController(...
public void testApacheAntQuery() throws Exception { final LocalComponentFactory inputFactory = new LocalComponentFactory() { public LocalComponent getInstance() { return new YahooApiInputComponent(); } }; LocalControllerBase controller = setUpController(...
diff --git a/source/de/anomic/server/serverSystem.java b/source/de/anomic/server/serverSystem.java index b69fa5f84..ba08e88dd 100644 --- a/source/de/anomic/server/serverSystem.java +++ b/source/de/anomic/server/serverSystem.java @@ -1,443 +1,442 @@ // serverSystem.java // ------------------------------------------- ...
false
true
public static void openBrowser(final String url, final String app) { try { String cmd; Process p; if (systemOS != systemUnknown) { if (systemOS == systemMacOSC) { if ((isMacArchitecture) && (macMRJFileUtils != null)) { macOpenURL.invoke(null, new Object[] {url}); } } else if (systemO...
public static void openBrowser(final String url, final String app) { try { String cmd; Process p; if (systemOS != systemUnknown) { if (systemOS == systemMacOSC) { if ((isMacArchitecture) && (macMRJFileUtils != null)) { macOpenURL.invoke(null, new Object[] {url}); } } else if (systemO...
diff --git a/frost-wot/source/frost/fcp/fcp07/FcpRequest.java b/frost-wot/source/frost/fcp/fcp07/FcpRequest.java index d71ce483..ca63244f 100644 --- a/frost-wot/source/frost/fcp/fcp07/FcpRequest.java +++ b/frost-wot/source/frost/fcp/fcp07/FcpRequest.java @@ -1,165 +1,165 @@ /* FcpRequest.java / Frost Copyright (...
true
true
private static FcpResultGet getKey(int type, String key, File target, FrostDownloadItem dlItem) { if( key == null || key.length() == 0 || key.startsWith("null") ) { System.out.println("getKey: KEY IS NULL!"); return FcpResultGet.RESULT_FAILED; } FcpResultGet results...
private static FcpResultGet getKey(int type, String key, File target, FrostDownloadItem dlItem) { if( key == null || key.length() == 0 || key.startsWith("null") ) { System.out.println("getKey: KEY IS NULL!"); return FcpResultGet.RESULT_FAILED; } FcpResultGet results...
diff --git a/src/utils/FastaFileSpliter.java b/src/utils/FastaFileSpliter.java index dfb6150..71355da 100644 --- a/src/utils/FastaFileSpliter.java +++ b/src/utils/FastaFileSpliter.java @@ -1,38 +1,38 @@ package utils; import java.io.File; import java.io.IOException; import java.util.List; import javax.swing....
false
true
public static void main(String[] arg) { FastaMultipleReader fmr = new FastaMultipleReader(); FastaWriter fw = new FastaWriter(); String infile = JOptionPane.showInputDialog(null, "Input File: ", "Enter Input File", 1); String outdir = JOptionPane.showInputDialog(null, "Output Dir: ", "Enter Output Dir", 1);...
public static void main(String[] arg) { FastaMultipleReader fmr = new FastaMultipleReader(); FastaWriter fw = new FastaWriter(); String infile = JOptionPane.showInputDialog(null, "Input File: ", "Enter Input File", 1); String outdir = JOptionPane.showInputDialog(null, "Output Dir: ", "Enter Output Dir", 1);...
diff --git a/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/webservice/BottomUpWSTest.java b/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/webservice/BottomUpWSTest.java index 36a049082..5b37641d3 100644 --- a/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws...
true
true
protected void bottomUpJbossWebService() { bottomUpJbossWebService(BottomUpWSTest.class.getResourceAsStream("/resources/jbossws/ClassA.java.ws")); switch (getLevel()) { case DEVELOP: case ASSEMBLE: // case DEPLOY: deploymentHelper.runProject(getEarProjectName()); break; } deploymentHelper.assertServ...
protected void bottomUpJbossWebService() { bottomUpJbossWebService(BottomUpWSTest.class.getResourceAsStream("/resources/jbossws/ClassA.java.ws")); switch (getLevel()) { case DEVELOP: case ASSEMBLE: deploymentHelper.runProject(getEarProjectName()); break; } deploymentHelper.assertServiceDeployed(deplo...
diff --git a/src/org/byu/cs/gen/SearchResults.java b/src/org/byu/cs/gen/SearchResults.java index 56f9db6..1d8fbb6 100644 --- a/src/org/byu/cs/gen/SearchResults.java +++ b/src/org/byu/cs/gen/SearchResults.java @@ -1,370 +1,370 @@ package org.byu.cs.gen; import java.io.IOException; import java.util.ArrayList; imp...
true
true
private void init(Bundle savedInstanceState){ this_intent = getIntent(); extras = this_intent.getExtras(); searchIntent = new Intent(this, SearchResults.class); //Use this Intent for any searches, just change the extras. homeScreenIntent = new Intent(this, TwentyMinuteGen.class...
private void init(Bundle savedInstanceState){ this_intent = getIntent(); extras = this_intent.getExtras(); searchIntent = new Intent(this, SearchResults.class); //Use this Intent for any searches, just change the extras. homeScreenIntent = new Intent(this, TwentyMinuteGen.class...
diff --git a/mdiss-core/src/main/java/org/mdissjava/mdisscore/view/photo/PhotoDetailsBean.java b/mdiss-core/src/main/java/org/mdissjava/mdisscore/view/photo/PhotoDetailsBean.java index b2929cc..b80b2f7 100644 --- a/mdiss-core/src/main/java/org/mdissjava/mdisscore/view/photo/PhotoDetailsBean.java +++ b/mdiss-core/src/ma...
true
true
public PhotoDetailsBean() { ParamsBean pb = getPrettyfacesParams(); this.userNick = pb.getUserId(); this.photoId = pb.getPhotoId(); this.loggedUserNick = this.retrieveSessionUserNick(); //TODO: check if isn't detailed to redirect to /user/xxx/upload/details/yyy-yyyyyy-yyyy-yyy try { //get morphia ...
public PhotoDetailsBean() { ParamsBean pb = getPrettyfacesParams(); this.userNick = pb.getUserId(); this.photoId = pb.getPhotoId(); this.loggedUserNick = this.retrieveSessionUserNick(); //TODO: check if isn't detailed to redirect to /user/xxx/upload/details/yyy-yyyyyy-yyyy-yyy try { //get morphia ...
diff --git a/tools/freedomotic-marketplace/src/it/freedomotic/marketplace/util/DrupalRestHelper.java b/tools/freedomotic-marketplace/src/it/freedomotic/marketplace/util/DrupalRestHelper.java index 8f4dd3c2..3d73c7e2 100644 --- a/tools/freedomotic-marketplace/src/it/freedomotic/marketplace/util/DrupalRestHelper.java +++...
true
true
protected static void fillPluginPackage(PluginPackage pp, String json) { try { JsonReader reader = new JsonReader(new StringReader(json)); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("ti...
protected static void fillPluginPackage(PluginPackage pp, String json) { try { JsonReader reader = new JsonReader(new StringReader(json)); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("ti...
diff --git a/java/gmod_api/src/gmod/Entities.java b/java/gmod_api/src/gmod/Entities.java index 916ae42..0c6299d 100644 --- a/java/gmod_api/src/gmod/Entities.java +++ b/java/gmod_api/src/gmod/Entities.java @@ -1,23 +1,23 @@ package gmod; import gmod.objects.Entity; public class Entities { public static Entity...
true
true
public static Entity create(String className) { Entity ret_val; Lua.lock(); { Lua.getglobal("ents"); Lua.getfield(-1, "Create"); Lua.pushstring(className); Lua.call(1, 0); ret_val = new Entity(); } Lua.unlock(); return ret_val; }
public static Entity create(String className) { Entity ret_val; Lua.lock(); { Lua.getglobal("ents"); Lua.getfield(-1, "Create"); Lua.pushstring(className); Lua.call(1, 1); ret_val = new Entity(); } Lua.unlock(); return ret_val; }
diff --git a/TMF-source/slimevoid/tmf/core/TMFCore.java b/TMF-source/slimevoid/tmf/core/TMFCore.java index 27b5764..5f44de1 100644 --- a/TMF-source/slimevoid/tmf/core/TMFCore.java +++ b/TMF-source/slimevoid/tmf/core/TMFCore.java @@ -1,265 +1,265 @@ package slimevoid.tmf.core; import java.io.File; import net.mine...
false
true
private static void addDustRecipes() { GameRegistry.addRecipe( new ItemStack(dustMixed).splitStack(2), new Object[] { "XY", Character.valueOf('X'), dustAcxium, Character.valueOf('Y'), dustBisogen } ); GameRegistry.addRecipe( new ItemStack(dustMixed).splitStack(2), new...
private static void addDustRecipes() { GameRegistry.addRecipe( new ItemStack(dustMixed,2), new Object[] { "XY", Character.valueOf('X'), dustAcxium, Character.valueOf('Y'), dustBisogen } ); GameRegistry.addRecipe( new ItemStack(dustMixed,2), new Object[] { "XY", ...
diff --git a/annotator/src/main/java/com/miravtech/annotator/SymbolList.java b/annotator/src/main/java/com/miravtech/annotator/SymbolList.java index 430d01a..e5d4443 100644 --- a/annotator/src/main/java/com/miravtech/annotator/SymbolList.java +++ b/annotator/src/main/java/com/miravtech/annotator/SymbolList.java @@ -1,5...
true
true
public SymbolList(InputStream is) throws Exception { Reader isr = new InputStreamReader(is); LineNumberReader lnr = new LineNumberReader(isr); while (true) { String line = lnr.readLine(); if (line == null) break; Matcher m = lineFormat.matcher(line); if (!m.matches()) throw new Exception("Ca...
public SymbolList(InputStream is) throws Exception { Reader isr = new InputStreamReader(is); LineNumberReader lnr = new LineNumberReader(isr); while (true) { String line = lnr.readLine(); if (line == null) break; Matcher m = lineFormat.matcher(line); if (!m.matches()) { System.err.println("Wa...
diff --git a/core/src/main/java/edu/northwestern/bioinformatics/studycalendar/xml/writers/PlannedActivityXmlSerializer.java b/core/src/main/java/edu/northwestern/bioinformatics/studycalendar/xml/writers/PlannedActivityXmlSerializer.java index ef275d322..4cd2713b9 100644 --- a/core/src/main/java/edu/northwestern/bioinfo...
false
true
public String validateElement(MutableDomainObject planTreeNode, Element element) { StringBuffer errorMessageStringBuffer = new StringBuffer(super.validateElement(planTreeNode, element)); PlannedActivity plannedActivity = (PlannedActivity) planTreeNode; if (element.element(XsdElement.ACTIVI...
public String validateElement(MutableDomainObject planTreeNode, Element element) { StringBuffer errorMessageStringBuffer = new StringBuffer(super.validateElement(planTreeNode, element)); PlannedActivity plannedActivity = (PlannedActivity) planTreeNode; if (element.element(XsdElement.ACTIVI...
diff --git a/src/main/java/org/elasticsearch/index/analysis/HashSplitterTokenFilter.java b/src/main/java/org/elasticsearch/index/analysis/HashSplitterTokenFilter.java index e98ec7b..909b4af 100644 --- a/src/main/java/org/elasticsearch/index/analysis/HashSplitterTokenFilter.java +++ b/src/main/java/org/elasticsearch/ind...
true
true
public final boolean incrementToken() throws IOException { if (curTermBuffer == null) { if (!input.incrementToken()) { return false; } else { curTermBuffer = termAtt.buffer().clone(); curTermLength = termAtt.length(); curPos = 0; curPrefix = 0; tokStart ...
public final boolean incrementToken() throws IOException { if (curTermBuffer == null) { if (!input.incrementToken()) { return false; } else { curTermBuffer = termAtt.buffer().clone(); curTermLength = termAtt.length(); curPos = 0; curPrefix = 0; tokStart ...
diff --git a/src/main/java/com/tyzoid/jailr/serialization/LocationSerializer.java b/src/main/java/com/tyzoid/jailr/serialization/LocationSerializer.java index 82a791a..2b12dc7 100644 --- a/src/main/java/com/tyzoid/jailr/serialization/LocationSerializer.java +++ b/src/main/java/com/tyzoid/jailr/serialization/LocationSer...
true
true
public Location getLocation() { String[] splitLocation = this.string.split(","); String world = splitLocation[3]; double x = Double.parseDouble(splitLocation[0]); double y = Double.parseDouble(splitLocation[1]); double z = Double.parseDouble(splitLocation[2]); float y...
public Location getLocation() { String[] splitLocation = this.string.split(","); String world = splitLocation[0]; double x = Double.parseDouble(splitLocation[1]); double y = Double.parseDouble(splitLocation[2]); double z = Double.parseDouble(splitLocation[3]); float y...
diff --git a/ProjectDragon/src/client/event/EventBus.java b/ProjectDragon/src/client/event/EventBus.java index 2e19552..82ea1fb 100644 --- a/ProjectDragon/src/client/event/EventBus.java +++ b/ProjectDragon/src/client/event/EventBus.java @@ -1,47 +1,47 @@ package client.event; import java.util.ArrayList; import j...
true
true
public static void publish( Event evt ) { // Tracking all events System.out.println(evt); for( EventHandler evh : handlers){ evh.onEvent(evt); } }
public static void publish( Event evt ) { // Tracking all events System.out.println(evt); for( EventHandler evh : handlers){ evh.onEvent(evt); } }
diff --git a/src/ams/appmanager_ui/reference/classes/com/sun/midp/appmanager/MIDletSelector.java b/src/ams/appmanager_ui/reference/classes/com/sun/midp/appmanager/MIDletSelector.java index e3318369..dd4a95ec 100644 --- a/src/ams/appmanager_ui/reference/classes/com/sun/midp/appmanager/MIDletSelector.java +++ b/src/ams/a...
true
true
public void commandAction(Command c, Item item) { if (c == launchCmd) { synchronized (this) { if (selectedMidlet != -1) { // the previous selected MIDlet is being launched return; } selectedMidlet = ...
public void commandAction(Command c, Item item) { if (c == launchCmd) { synchronized (this) { if (selectedMidlet != -1) { // the previous selected MIDlet is being launched return; } selectedMidlet = ...
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java index b46f75a8f..40c8eddcf 100644 --- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eva...
false
true
public boolean visit(InfixExpression node) { if (!isActive()) { return false; } String opToken = node.getOperator().toString(); int opTokenLength = opToken.length(); char char0 = opToken.charAt(0); char char1 = '\0'; char char2 = '\0'; if (opTokenLength > 1) { char1 = opToken.charAt(1); if (o...
public boolean visit(InfixExpression node) { if (!isActive()) { return false; } String opToken = node.getOperator().toString(); int opTokenLength = opToken.length(); char char0 = opToken.charAt(0); char char1 = '\0'; char char2 = '\0'; if (opTokenLength > 1) { char1 = opToken.charAt(1); if (o...
diff --git a/scheduler-component-shared/src/java/org/sakaiproject/component/app/scheduler/jobs/SakaiEventArchiveJob.java b/scheduler-component-shared/src/java/org/sakaiproject/component/app/scheduler/jobs/SakaiEventArchiveJob.java index ce8afc5..5677e77 100644 --- a/scheduler-component-shared/src/java/org/sakaiproject/...
true
true
public void execute(JobExecutionContext arg0) throws JobExecutionException { boolean archiveEnabled = ServerConfigurationService.getBoolean("scheduler.event.archive.enabled", ARCHIVE_ENABLED); long archiveLength = Long.parseLong( ServerConfigurationService.getString("scheduler.event.archive.length",...
public void execute(JobExecutionContext arg0) throws JobExecutionException { boolean archiveEnabled = ServerConfigurationService.getBoolean("scheduler.event.archive.enabled", ARCHIVE_ENABLED); long archiveLength = Long.parseLong( ServerConfigurationService.getString("scheduler.event.archive.length",...
diff --git a/src/com/tictactoe/main/Main.java b/src/com/tictactoe/main/Main.java index a5e66a7..f092a92 100644 --- a/src/com/tictactoe/main/Main.java +++ b/src/com/tictactoe/main/Main.java @@ -1,28 +1,31 @@ package com.tictactoe.main; import java.util.Scanner; import com.tictactoe.game.*; public class Main { /...
true
true
public static void main(String[] args) { Scanner inputStream=new Scanner(System.in); System.out.println("Enter your name:"); String userName=inputStream.nextLine(); System.out.println("Welcome to KenTacToe, "+userName+"!"); System.out.println("Please enter valid inputs, as the lazy author did" + "not im...
public static void main(String[] args) { Scanner inputStream=new Scanner(System.in); System.out.println("Enter your name:"); String userName=inputStream.nextLine(); System.out.println("Welcome to KenTacToe, "+userName+"!"); System.out.println("Please enter valid inputs, as the lazy author did" + "not im...
diff --git a/vraptor-core/src/main/java/br/com/caelum/vraptor/util/test/MockResult.java b/vraptor-core/src/main/java/br/com/caelum/vraptor/util/test/MockResult.java index 3116bfcd..df2bcfd8 100644 --- a/vraptor-core/src/main/java/br/com/caelum/vraptor/util/test/MockResult.java +++ b/vraptor-core/src/main/java/br/com/ca...
true
true
protected <T> MethodInvocation<T> returnOnFinalMethods(final Class<T> view) { return new MethodInvocation<T>() { @Override public Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod) { Class type = method.getReturnType(); if (type == void.class) { return null; } ...
protected <T> MethodInvocation<T> returnOnFinalMethods(final Class<T> view) { return new MethodInvocation<T>() { @Override public Object intercept(T proxy, Method method, Object[] args, SuperMethod superMethod) { Class type = method.getReturnType(); if (type == void.class) { return null; } ...
diff --git a/dev/core/test/com/google/gwt/dev/shell/BrowserChannelTest.java b/dev/core/test/com/google/gwt/dev/shell/BrowserChannelTest.java index 82c109502..bd6722c06 100644 --- a/dev/core/test/com/google/gwt/dev/shell/BrowserChannelTest.java +++ b/dev/core/test/com/google/gwt/dev/shell/BrowserChannelTest.java @@ -1,3...
false
true
public void testLoadModuleMessage() throws IOException, BrowserChannelException { String url = "http://www.google.com"; String sessionKey = "asdkfjklAI*23ja"; String tabKey = "372F4"; String moduleName = "org.example.Hello"; String userAgent = "Firefox"; new LoadModuleMessage(channel, ur...
public void testLoadModuleMessage() throws IOException, BrowserChannelException { String url = "http://www.google.com"; String sessionKey = "asdkfjklAI*23ja"; String tabKey = "372F4"; String moduleName = "org.example.Hello"; String userAgent = "Firefox"; new LoadModuleMessage(channel, ur...
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranchSelectionDialog.java index eb08249c..8fd2e69c 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/AbstractBranch...
true
true
protected final Composite createDialogArea(Composite base) { Composite parent = (Composite) super.createDialogArea(base); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.m...
protected final Composite createDialogArea(Composite base) { Composite parent = (Composite) super.createDialogArea(base); Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.m...
diff --git a/scm-webapp/src/main/java/sonia/scm/web/security/DefaultAdministrationContext.java b/scm-webapp/src/main/java/sonia/scm/web/security/DefaultAdministrationContext.java index 57434346d..34517fab7 100644 --- a/scm-webapp/src/main/java/sonia/scm/web/security/DefaultAdministrationContext.java +++ b/scm-webapp/sr...
true
true
private void doRunAsInWebSessionContext(PrivilegedAction action) { Subject subject = SecurityUtils.getSubject(); String principal = (String) subject.getPrincipal(); if (logger.isInfoEnabled()) { String username = null; if (subject.isAuthenticated()) { username = principa...
private void doRunAsInWebSessionContext(PrivilegedAction action) { Subject subject = SecurityUtils.getSubject(); String principal = (String) subject.getPrincipal(); if (logger.isInfoEnabled()) { String username = null; if (subject.isAuthenticated()) { username = principa...
diff --git a/src/main/java/de/viadee/translator/RuleTranslatorFacade.java b/src/main/java/de/viadee/translator/RuleTranslatorFacade.java index a1d7cfc..7d483d8 100644 --- a/src/main/java/de/viadee/translator/RuleTranslatorFacade.java +++ b/src/main/java/de/viadee/translator/RuleTranslatorFacade.java @@ -1,80 +1,80 @@ ...
true
true
public File createSkeleton(final String language, final File pmmlFile) throws TransformerException { File ruleSkeleton = null; boolean pmmlValid = false; pmmlValid = this.validatePMML(pmmlFile); if (!pmmlValid) { System.out.println("The PMML document is invalid"); ...
public File createSkeleton(final String language, final File pmmlFile) throws TransformerException { File ruleSkeleton = null; boolean pmmlValid = false; pmmlValid = this.validatePMML(pmmlFile); if (!pmmlValid) { System.out.println("The PMML document is invalid"); ...
diff --git a/src/java/com/idega/content/presentation/WebDAVList.java b/src/java/com/idega/content/presentation/WebDAVList.java index db9d92ca..9f925124 100644 --- a/src/java/com/idega/content/presentation/WebDAVList.java +++ b/src/java/com/idega/content/presentation/WebDAVList.java @@ -1,67 +1,71 @@ package com.idega....
false
true
protected void initializeContent() { // startPath = (String) this.getAttributes().get("startFolder"); // rootPath = (String) this.getAttributes().get("rootFolder"); String startFolder = (String) this.getAttributes().get("startFolder"); String rootFolder = (String) this.getAttributes().get("rootFolder"); if...
protected void initializeContent() { // startPath = (String) this.getAttributes().get("startFolder"); // rootPath = (String) this.getAttributes().get("rootFolder"); String startFolder = (String) this.getAttributes().get("startFolder"); String rootFolder = (String) this.getAttributes().get("rootFolder"); if...
diff --git a/src/main/java/com/minecraftdimensions/bungeesuiteteleports/commands/TPCommand.java b/src/main/java/com/minecraftdimensions/bungeesuiteteleports/commands/TPCommand.java index ecd22da..b35b514 100644 --- a/src/main/java/com/minecraftdimensions/bungeesuiteteleports/commands/TPCommand.java +++ b/src/main/java/...
true
true
public boolean onCommand( CommandSender sender, Command command, String label, String[] args ) { if ( args.length == 1 ) { TeleportsManager.teleportToPlayer( sender, sender.getName(), args[0] ); return true; } else if ( args.length == 2 ) { TeleportsManager.telep...
public boolean onCommand( CommandSender sender, Command command, String label, String[] args ) { if ( args.length == 1 ) { TeleportsManager.teleportToPlayer( sender, sender.getName(), args[0] ); return true; } else if ( args.length == 2 ) { TeleportsManager.telep...
diff --git a/coreplugins/BioPAX/src/test/java/cytoscape/coreplugins/biopax/util/TestWebFileConnect.java b/coreplugins/BioPAX/src/test/java/cytoscape/coreplugins/biopax/util/TestWebFileConnect.java index 6c7fbb932..e55e93833 100644 --- a/coreplugins/BioPAX/src/test/java/cytoscape/coreplugins/biopax/util/TestWebFileConne...
true
true
public void testWebConnect() throws Exception { String str = WebFileConnect.retrieveDocument("http://www.google.com"); // This page may not actually start with <html>, so just look for the string. // It should, however be present. assertTrue(str.indexOf("<html><head>") >= 0 ); }
public void testWebConnect() throws Exception { String str = WebFileConnect.retrieveDocument("http://www.google.com"); // This page may not actually start with <html>, so just look for the string. // It should, however be present. assertTrue(str.indexOf("<html") >= 0 ); }
diff --git a/Android/KitKatPrintPlugin.java b/Android/KitKatPrintPlugin.java index f3c7a3d..dc13855 100644 --- a/Android/KitKatPrintPlugin.java +++ b/Android/KitKatPrintPlugin.java @@ -1,87 +1,88 @@ package com.phonegap.plugins; import android.print.PrintDocumentAdapter; import android.print.PrintManager; import ...
true
true
public PluginResult execute(String action, final JSONArray args, final String callbackId) { if (action.equals("supported")) { boolean supported = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; return new PluginResult(PluginResult.Status.OK, supported); } if (action.equals("print")) { f...
public PluginResult execute(String action, final JSONArray args, final String callbackId) { if (action.equals("supported")) { boolean supported = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; return new PluginResult(PluginResult.Status.OK, supported); } if (action.equals("print")) { f...
diff --git a/src/yapl/Program.java b/src/yapl/Program.java index 96bc788..70be9ea 100644 --- a/src/yapl/Program.java +++ b/src/yapl/Program.java @@ -1,75 +1,76 @@ package yapl; /**** YAPL Compiler * * Copyright 2010 Daniel H�lbling, Klagenfurt University * * Licensed under the Apache License, Version 2.0 (the "Li...
false
true
public static void main(String[] args) { if (args.length != 1) { writeUsage(); return; } String programName = args[0]; try { FileInputStream fis = new FileInputStream(programName); BackendMJ backend = new BackendMJ(); parser.init(backend); parser.ReInit(new StringReader(PREDEFINED_PR...
public static void main(String[] args) { if (args.length < 1) { writeUsage(); return; } String programName = args[0]; String outputName = args[1]; try { FileInputStream fis = new FileInputStream(programName); BackendMJ backend = new BackendMJ(); parser.init(backend); parser.ReInit(...
diff --git a/src/org/openstreetmap/josm/plugins/notes/NotesLayer.java b/src/org/openstreetmap/josm/plugins/notes/NotesLayer.java index f01c2ea..4690c3e 100644 --- a/src/org/openstreetmap/josm/plugins/notes/NotesLayer.java +++ b/src/org/openstreetmap/josm/plugins/notes/NotesLayer.java @@ -1,290 +1,290 @@ /* Copyright (...
true
true
public void paint(Graphics2D g, MapView mv, Bounds bounds) { // This loop renders all the bug icons for (Note note : data) { // don't paint deleted nodes Point p = mv.getPoint(note.getLatLon()); ImageIcon icon = null; switch(note.getState()) { ...
public void paint(Graphics2D g, MapView mv, Bounds bounds) { // This loop renders all the bug icons for (Note note : data) { // don't paint deleted nodes Point p = mv.getPoint(note.getLatLon()); ImageIcon icon = null; switch(note.getState()) { ...
diff --git a/2.0.0/src/com/simonmacdonald/prefs/AppPreferences.java b/2.0.0/src/com/simonmacdonald/prefs/AppPreferences.java index 152f55d..e7e2146 100644 --- a/2.0.0/src/com/simonmacdonald/prefs/AppPreferences.java +++ b/2.0.0/src/com/simonmacdonald/prefs/AppPreferences.java @@ -1,87 +1,87 @@ package com.simonmacdona...
false
true
public PluginResult execute(String action, JSONArray args, String callbackId) { PluginResult.Status status = PluginResult.Status.OK; String result = ""; SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.cordova.getActivity()); try { if (...
public PluginResult execute(String action, JSONArray args, String callbackId) { PluginResult.Status status = PluginResult.Status.OK; String result = ""; SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this.cordova.getActivity()); try { if (...
diff --git a/src/com/bergerkiller/bukkit/tc/Listeners/TCPlayerListener.java b/src/com/bergerkiller/bukkit/tc/Listeners/TCPlayerListener.java index e37e0ed..5e12146 100644 --- a/src/com/bergerkiller/bukkit/tc/Listeners/TCPlayerListener.java +++ b/src/com/bergerkiller/bukkit/tc/Listeners/TCPlayerListener.java @@ -1,77 +1...
true
true
public void onPlayerInteract(PlayerInteractEvent event) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { if (BlockUtil.isRails(event.getClickedBlock())) { ItemStack item = event.getPlayer().getItemInHand(); if (item != null) { if (item.getType() == Material.MINECART || item.getType() ==...
public void onPlayerInteract(PlayerInteractEvent event) { if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { if (BlockUtil.isRails(event.getClickedBlock())) { ItemStack item = event.getPlayer().getItemInHand(); if (item != null) { if (item.getType() == Material.MINECART || item.getType() ==...
diff --git a/fog.routing.hrm/src/de/tuilmenau/ics/fog/routing/hierarchical/management/Coordinator.java b/fog.routing.hrm/src/de/tuilmenau/ics/fog/routing/hierarchical/management/Coordinator.java index 61bb369e..cfedf9b7 100644 --- a/fog.routing.hrm/src/de/tuilmenau/ics/fog/routing/hierarchical/management/Coordinator.ja...
false
true
private void shareRouteToClusterMember(ComChannel pClusterMemberChannel) { // determine the HRMID of the cluster member HRMID tMemberHRMID = pClusterMemberChannel.getPeerHRMID(); // are we on base hierarchy level? if (getHierarchyLevel().getValue() == 1){ // TODO: isBaseLevel()){ // create the new routi...
private void shareRouteToClusterMember(ComChannel pClusterMemberChannel) { // determine the HRMID of the cluster member HRMID tMemberHRMID = pClusterMemberChannel.getPeerHRMID(); // are we on base hierarchy level? if (getHierarchyLevel().getValue() == 1){ // TODO: isBaseLevel()){ // create the new routi...
diff --git a/src/magiccopier/MagicCopierPreferencesModel.java b/src/magiccopier/MagicCopierPreferencesModel.java index 76668da..ea5bceb 100644 --- a/src/magiccopier/MagicCopierPreferencesModel.java +++ b/src/magiccopier/MagicCopierPreferencesModel.java @@ -1,263 +1,263 @@ /* * To change this template, choose Tools |...
true
true
public MagicCopierPreferencesModel() { try { Files.createDirectories(new File(System.getProperty("user.home"), "Magic Copier").toPath()); } catch (IOException ex) { Logger.getLogger(MagicCopierPreferencesModel.class.getName()).log(Level.SEVERE, null, ex); } de...
public MagicCopierPreferencesModel() { try { Files.createDirectories(new File(System.getProperty("user.home"), "Magic Copier").toPath()); } catch (IOException ex) { Logger.getLogger(MagicCopierPreferencesModel.class.getName()).log(Level.SEVERE, null, ex); } de...
diff --git a/crunch-contrib/src/main/java/org/apache/crunch/contrib/text/AbstractSimpleExtractor.java b/crunch-contrib/src/main/java/org/apache/crunch/contrib/text/AbstractSimpleExtractor.java index 9959b447..b0dc494d 100644 --- a/crunch-contrib/src/main/java/org/apache/crunch/contrib/text/AbstractSimpleExtractor.java ...
true
true
public T extract(String input) { errorOnLast = false; T res = defaultValue; try { res = doExtract(scannerFactory.create(input)); } catch (Exception e) { errorOnLast = true; errors++; if (errors < LOG_ERROR_LIMIT) { String msg = String.format("Error occurred parsing inpu...
public T extract(String input) { errorOnLast = false; T res = defaultValue; try { res = doExtract(scannerFactory.create(input)); } catch (Exception e) { errorOnLast = true; errors++; if (errors < LOG_ERROR_LIMIT) { String msg = String.format("Error occurred parsing inpu...
diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerCommand.java index b2acb9af..1db02d8f 100644 --- a/backend/manager/modules/vdsbroker/src/main/...
false
true
protected void ExecuteVDSCommand() { try { ExecuteVdsBrokerCommand(); } catch (VDSExceptionBase ex) { PrintReturnValue(); throw ex; } catch (ApplicationException ex) { log.errorFormat("Failed in {0} method", getCommandName()); log.e...
protected void ExecuteVDSCommand() { try { ExecuteVdsBrokerCommand(); } catch (VDSExceptionBase ex) { PrintReturnValue(); throw ex; } catch (ApplicationException ex) { log.errorFormat("Failed in {0} method", getCommandName()); log.e...
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/auth/ldap/LdapRealm.java b/gerrit-server/src/main/java/com/google/gerrit/server/auth/ldap/LdapRealm.java index fc1102e16..ac47cb556 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/auth/ldap/LdapRealm.java +++ b/gerrit-server/src/main/ja...
true
true
public AuthRequest authenticate(final AuthRequest who) throws AccountException { if (config.getBoolean("ldap", "localUsernameToLowerCase", false)) { who.setLocalUser(who.getLocalUser().toLowerCase(Locale.US)); } final String username = who.getLocalUser(); try { final DirContext ctx;...
public AuthRequest authenticate(final AuthRequest who) throws AccountException { if (config.getBoolean("ldap", "localUsernameToLowerCase", false)) { who.setLocalUser(who.getLocalUser().toLowerCase(Locale.US)); } final String username = who.getLocalUser(); try { final DirContext ctx;...
diff --git a/x10.compiler/src/x10/emitter/RuntimeTypeExpander.java b/x10.compiler/src/x10/emitter/RuntimeTypeExpander.java index 2f6cc71c1..a0147b5da 100644 --- a/x10.compiler/src/x10/emitter/RuntimeTypeExpander.java +++ b/x10.compiler/src/x10/emitter/RuntimeTypeExpander.java @@ -1,258 +1,261 @@ /* * This file is p...
true
true
public void expand(Translator tr) { String s = typeof(at); if (s != null) { er.w.write(s); return; } if (at instanceof ParameterType) { ParameterType pt = (ParameterType) at; er.w.write(Emitter.mangleParameterType(pt)); ...
public void expand(Translator tr) { String s = typeof(at); if (s != null) { er.w.write(s); return; } if (at instanceof ParameterType) { ParameterType pt = (ParameterType) at; er.w.write(Emitter.mangleParameterType(pt)); ...
diff --git a/src/com/ferg/awful/thread/AwfulPost.java b/src/com/ferg/awful/thread/AwfulPost.java index c7eccb42..2bc4425c 100644 --- a/src/com/ferg/awful/thread/AwfulPost.java +++ b/src/com/ferg/awful/thread/AwfulPost.java @@ -1,502 +1,505 @@ /***************************************************************************...
false
true
public static ArrayList<AwfulPost> parsePosts(TagNode aThread, int aPage, int postPerPage, AwfulThread aThreadObject, AwfulPreferences prefs){ ArrayList<AwfulPost> result = new ArrayList<AwfulPost>(); int lastReadPage = aThreadObject.getLastReadPage(postPerPage); int lastReadPost = ...
public static ArrayList<AwfulPost> parsePosts(TagNode aThread, int aPage, int postPerPage, AwfulThread aThreadObject, AwfulPreferences prefs){ ArrayList<AwfulPost> result = new ArrayList<AwfulPost>(); int lastReadPage = aThreadObject.getLastReadPage(postPerPage); int lastReadPost = ...
diff --git a/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java b/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java index ffef9f77c..29f98784f 100644 --- a/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/DefaultEnterpriseBeanLookup.java +++ b/webbeans-ri/s...
false
true
public static <T> T lookup(EjbDescriptor<T> ejbDescriptor) { if (!ejbDescriptor.getLocalBusinessInterfaces().iterator().hasNext()) { throw new RuntimeException("EJB must have local interface " + ejbDescriptor); } String jndiName = ejbDescriptor.getLocalBusinessInterfaces().iterato...
public static <T> T lookup(EjbDescriptor<T> ejbDescriptor) { if (!ejbDescriptor.getLocalBusinessInterfaces().iterator().hasNext()) { throw new RuntimeException("EJB must have local interface " + ejbDescriptor); } String jndiName = ejbDescriptor.getLocalBusinessInterfaces().iterato...
diff --git a/src/main/java/org/jbpm/ee/service/RuntimeServiceBean.java b/src/main/java/org/jbpm/ee/service/RuntimeServiceBean.java index 6fc9d98..29ae270 100644 --- a/src/main/java/org/jbpm/ee/service/RuntimeServiceBean.java +++ b/src/main/java/org/jbpm/ee/service/RuntimeServiceBean.java @@ -1,65 +1,65 @@ package org....
false
true
public boolean runtimeIsSet() { if (runtimeEngine == null) { return true; } return false; }
public boolean runtimeIsSet() { if (runtimeEngine == null) { return false; } return true; }
diff --git a/java/tools/src/com/jopdesign/wcet/WCETAnalysis.java b/java/tools/src/com/jopdesign/wcet/WCETAnalysis.java index edf1d622..693d6733 100644 --- a/java/tools/src/com/jopdesign/wcet/WCETAnalysis.java +++ b/java/tools/src/com/jopdesign/wcet/WCETAnalysis.java @@ -1,220 +1,221 @@ /* This file is part of JOP, ...
false
true
private boolean run(ExecHelper exec) { project = null; ProjectConfig pConfig = new ProjectConfig(config); /* Initialize */ try { project = new Project(pConfig); project.setTopLevelLooger(tlLogger); Report.initVelocity(config); /* Initialize velocity engine */ tlLogger.info("Loading project"); ...
private boolean run(ExecHelper exec) { project = null; ProjectConfig pConfig = new ProjectConfig(config); /* Initialize */ try { project = new Project(pConfig); project.setTopLevelLooger(tlLogger); Report.initVelocity(config); /* Initialize velocity engine */ tlLogger.info("Loading project"); ...
diff --git a/src/main/java/net/LoadingChunks/SyncingFeeling/util/SQLWrapper.java b/src/main/java/net/LoadingChunks/SyncingFeeling/util/SQLWrapper.java index 4d11391..210dd1c 100644 --- a/src/main/java/net/LoadingChunks/SyncingFeeling/util/SQLWrapper.java +++ b/src/main/java/net/LoadingChunks/SyncingFeeling/util/SQLWrap...
false
true
static public void commitSlots(Player p, SerializableInventory inv) { try { reconnect(); String sqlstring = "REPLACE INTO `inv_slots` (`server`,`player`,`json`,`slot`) VALUES "; if(inv.getSlots().size() == 0) return; for(int i = 0; i < inv.getSlots().size(); i++) { sqlstring = sqlstring.c...
static public void commitSlots(Player p, SerializableInventory inv) { try { reconnect(); String sqlstring = "REPLACE INTO `inv_slots` (`server`,`player`,`json`,`slot`) VALUES "; if(inv.getSlots().size() == 0) return; for(int i = 0; i < inv.getSlots().size(); i++) { sqlstring = sqlstring.c...
diff --git a/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java b/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java index 5071d950..426813f7 100644 --- a/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java +++ b/examples/src/main/java/org/apache/mahout/g...
true
true
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || !(obj instanceof CDFitness)) return false; CDFitness f = (CDFitness) obj; return tp == f.getFp() && fp == f.getFp() && tn == f.getTn() && fn == f.getTn(); }
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || !(obj instanceof CDFitness)) return false; CDFitness f = (CDFitness) obj; return tp == f.getTp() && fp == f.getFp() && tn == f.getTn() && fn == f.getFn(); }
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/NewViolationsDecorator.java index f9c62d786e..d3bc967772 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins...
true
true
private void saveNewViolationsByRule(DecoratorContext context) { ArrayListMultimap<Rule, Measure> childrenByRule = ArrayListMultimap.create(); Collection<Measure> children = context.getChildrenMeasures(MeasuresFilters.rules(CoreMetrics.NEW_VIOLATIONS)); for (Measure childMeasure : children) { RuleMe...
private void saveNewViolationsByRule(DecoratorContext context) { ArrayListMultimap<Rule, Measure> childrenByRule = ArrayListMultimap.create(); Collection<Measure> children = context.getChildrenMeasures(MeasuresFilters.rules(CoreMetrics.NEW_VIOLATIONS)); for (Measure childMeasure : children) { RuleMe...
diff --git a/webui/portal/src/main/java/org/exoplatform/portal/webui/UIWelcomeComponent.java b/webui/portal/src/main/java/org/exoplatform/portal/webui/UIWelcomeComponent.java index c4d212c1d3..9033e4621d 100644 --- a/webui/portal/src/main/java/org/exoplatform/portal/webui/UIWelcomeComponent.java +++ b/webui/portal/src/...
true
true
public UIWelcomeComponent() throws Exception { WebuiRequestContext rcontext = Util.getPortalRequestContext(); // int accessibility = prContext.getAccessPath() ; // if(accessibility == PortalRequestContext.PUBLIC_ACCESS) { // addChild(UILoginForm.class, null, "LoginWelcomeComponent"); // return ; /...
public UIWelcomeComponent() throws Exception { WebuiRequestContext rcontext = Util.getPortalRequestContext(); // int accessibility = prContext.getAccessPath() ; // if(accessibility == PortalRequestContext.PUBLIC_ACCESS) { // addChild(UILoginForm.class, null, "LoginWelcomeComponent"); // return ; /...
diff --git a/src/org/python/core/PyTableCode.java b/src/org/python/core/PyTableCode.java index 43cd4011..48496a6d 100644 --- a/src/org/python/core/PyTableCode.java +++ b/src/org/python/core/PyTableCode.java @@ -1,434 +1,441 @@ // Copyright (c) Corporation for National Research Initiatives package org.python.core; ...
true
true
public PyObject call(PyFrame frame, PyObject closure) { // System.err.println("tablecode call: "+co_name); ThreadState ts = Py.getThreadState(); if (ts.systemState == null) { ts.systemState = Py.defaultSystemState; } //System.err.println("got ts: "+ts+", "+ts.syst...
public PyObject call(PyFrame frame, PyObject closure) { // System.err.println("tablecode call: "+co_name); ThreadState ts = Py.getThreadState(); if (ts.systemState == null) { ts.systemState = Py.defaultSystemState; } //System.err.println("got ts: "+ts+", "+ts.syst...
diff --git a/src/com/roman/romcontrol/fragments/StatusBarGeneral.java b/src/com/roman/romcontrol/fragments/StatusBarGeneral.java index 1016e6d..d7925c5 100644 --- a/src/com/roman/romcontrol/fragments/StatusBarGeneral.java +++ b/src/com/roman/romcontrol/fragments/StatusBarGeneral.java @@ -1,136 +1,136 @@ package com....
true
true
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext = getActivity().getApplicationContext(); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.prefs_statusbar_general); mDefaultSettingsButtonBehavior = ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext = getActivity().getApplicationContext(); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.prefs_statusbar_general); mDefaultSettingsButtonBehavior = ...
diff --git a/feedreader-webapp/src/main/java/feedreader/web/rest/RestAuthorizationFilter.java b/feedreader-webapp/src/main/java/feedreader/web/rest/RestAuthorizationFilter.java index f78c26b..0bc8d5e 100644 --- a/feedreader-webapp/src/main/java/feedreader/web/rest/RestAuthorizationFilter.java +++ b/feedreader-webapp/sr...
false
true
protected int getSessionId(HttpServletRequest httpRequest) throws ServletException { String authorizationHeader = httpRequest.getHeader("Authorization"); if(authorizationHeader == null) { throw new ServletException("Authorization header must be specified"); } if(!authorizationHeader.startsWith(AUTH_HEADER_S...
protected int getSessionId(HttpServletRequest httpRequest) throws ServletException { String authorizationHeader = httpRequest.getHeader("Authorization"); if(authorizationHeader == null) { return -1; } if(!authorizationHeader.startsWith(AUTH_HEADER_STARTS_WITH)) { return -1; } String sidValue = author...
diff --git a/src/main/java/org/bouncycastle/crypto/tls/DTLSReliableHandshake.java b/src/main/java/org/bouncycastle/crypto/tls/DTLSReliableHandshake.java index 773542e3b..cc38a10ac 100644 --- a/src/main/java/org/bouncycastle/crypto/tls/DTLSReliableHandshake.java +++ b/src/main/java/org/bouncycastle/crypto/tls/DTLSReliab...
true
true
Message receiveMessage() throws IOException { sending = false; // Check if we already have the next message waiting { DTLSReassembler next = (DTLSReassembler)incomingQueue.get(Integer.valueOf(next_receive_seq)); if (next != null) { byte[]...
Message receiveMessage() throws IOException { sending = false; // Check if we already have the next message waiting { DTLSReassembler next = (DTLSReassembler)incomingQueue.get(Integer.valueOf(next_receive_seq)); if (next != null) { byte[]...
diff --git a/sonar/src/main/java/com/hp/it/sonar/access/impl/PortalDataAccessor.java b/sonar/src/main/java/com/hp/it/sonar/access/impl/PortalDataAccessor.java index 99dfc8f..b57911e 100755 --- a/sonar/src/main/java/com/hp/it/sonar/access/impl/PortalDataAccessor.java +++ b/sonar/src/main/java/com/hp/it/sonar/access/impl...
false
true
public void retrieveRecentChange(Project root, Collection<Violation> violations, int period, String violationPriority) { String urlStr = VIOLATION_DRILLDOWN.replaceFirst("::portalURL", this.portalURL) .replaceFirst("::projectId", String.valueOf(root.getId())) .replaceFirst("::periodPhase", String.valueOf(...
public void retrieveRecentChange(Project root, Collection<Violation> violations, int period, String violationPriority) { String urlStr = VIOLATION_DRILLDOWN.replaceFirst("::portalURL", this.portalURL) .replaceFirst("::projectId", String.valueOf(root.getId())) .replaceFirst("::periodPhase", String.valueOf(...
diff --git a/android/src/com/artifex/mupdf/MuPDFActivity.java b/android/src/com/artifex/mupdf/MuPDFActivity.java index fb3c4552..c530b01b 100644 --- a/android/src/com/artifex/mupdf/MuPDFActivity.java +++ b/android/src/com/artifex/mupdf/MuPDFActivity.java @@ -1,756 +1,756 @@ package com.artifex.mupdf; import android...
true
true
public void createUI(Bundle savedInstanceState) { if (core == null) return; // Now create the UI. // First create the document view making use of the ReaderView's internal // gesture recognition mDocView = new ReaderView(this) { private boolean showButtonsDisabled; public boolean onSingleTapUp(Moti...
public void createUI(Bundle savedInstanceState) { if (core == null) return; // Now create the UI. // First create the document view making use of the ReaderView's internal // gesture recognition mDocView = new ReaderView(this) { private boolean showButtonsDisabled; public boolean onSingleTapUp(Moti...
diff --git a/rwiki-tool/tool/src/java/uk/ac/cam/caret/sakai/rwiki/tool/RWikiServlet.java b/rwiki-tool/tool/src/java/uk/ac/cam/caret/sakai/rwiki/tool/RWikiServlet.java index 44e6ad5c..79e30149 100644 --- a/rwiki-tool/tool/src/java/uk/ac/cam/caret/sakai/rwiki/tool/RWikiServlet.java +++ b/rwiki-tool/tool/src/java/uk/ac/ca...
true
true
public void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (wac == null) { wac = WebApplicationContextUtils .getRequiredWebApplicationContext(this.getServletContext()); if (wac == null) { response.sendError(HttpServletResponse.S...
public void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (wac == null) { wac = WebApplicationContextUtils .getRequiredWebApplicationContext(this.getServletContext()); if (wac == null) { response.sendError(HttpServletResponse.S...
diff --git a/src/web/org/openmrs/web/controller/encounter/EncounterFormController.java b/src/web/org/openmrs/web/controller/encounter/EncounterFormController.java index 3e49d51b..488378e8 100644 --- a/src/web/org/openmrs/web/controller/encounter/EncounterFormController.java +++ b/src/web/org/openmrs/web/controller/enco...
false
true
protected Map<String, Object> referenceData(HttpServletRequest request, Object obj, Errors error) throws Exception { Encounter encounter = (Encounter)obj; // the generic returned key-value pair mapping Map<String, Object> map = new HashMap<String, Object>(); // obsIds of obs that were edited List<In...
protected Map<String, Object> referenceData(HttpServletRequest request, Object obj, Errors error) throws Exception { Encounter encounter = (Encounter)obj; // the generic returned key-value pair mapping Map<String, Object> map = new HashMap<String, Object>(); // obsIds of obs that were edited List<In...
diff --git a/grails/src/java/org/codehaus/groovy/grails/web/converters/marshaller/json/MapMarshaller.java b/grails/src/java/org/codehaus/groovy/grails/web/converters/marshaller/json/MapMarshaller.java index 266baab50..1984ef137 100644 --- a/grails/src/java/org/codehaus/groovy/grails/web/converters/marshaller/json/MapMa...
true
true
public void marshalObject(Object o, JSON converter) throws ConverterException { JSONWriter writer = converter.getWriter(); writer.object(); Map<Object,Object> map = (Map<Object,Object>) o; for (Map.Entry<Object,Object> entry : map.entrySet()) { Object key = entry.getKey()...
public void marshalObject(Object o, JSON converter) throws ConverterException { JSONWriter writer = converter.getWriter(); writer.object(); Map<Object,Object> map = (Map<Object,Object>) o; for (Map.Entry<Object,Object> entry : map.entrySet()) { Object key = entry.getKey()...
diff --git a/src/main/java/org/candlepin/resource/DistributorVersionResource.java b/src/main/java/org/candlepin/resource/DistributorVersionResource.java index 37d265274..4cfefdd37 100644 --- a/src/main/java/org/candlepin/resource/DistributorVersionResource.java +++ b/src/main/java/org/candlepin/resource/DistributorVers...
true
true
public DistributorVersion create(DistributorVersion dv, @Context Principal principal) { DistributorVersion existing = curator.findByName(dv.getName()); if (existing != null) { throw new BadRequestException( i18n.tr("A distributor version with name {0}" + ...
public DistributorVersion create(DistributorVersion dv, @Context Principal principal) { DistributorVersion existing = curator.findByName(dv.getName()); if (existing != null) { throw new BadRequestException( i18n.tr("A distributor version with name {0} " + ...
diff --git a/src/NerualNet/NeuralNet.java b/src/NerualNet/NeuralNet.java index 9557ce0..9b75bc3 100644 --- a/src/NerualNet/NeuralNet.java +++ b/src/NerualNet/NeuralNet.java @@ -1,216 +1,215 @@ package NerualNet; import java.util.Scanner; import java.io.File; import java.io.IOException; // Main driver class fo...
true
true
public static void main(String[] args) throws IOException, InterruptedException { int type, trainingStrategy, inputs, samples, epochs, correct, error, fail; int outputs = 1; int layers = 0; int centers = 0; int numLabels = 0; int numClasses = 26; double rate = 0.01; boolean classFirst = true; /**...
public static void main(String[] args) throws IOException, InterruptedException { int type, trainingStrategy, inputs, samples, epochs, correct, error, fail; int outputs = 1; int layers = 0; int centers = 0; int numLabels = 0; int numClasses = 26; double rate = 0.01; boolean classFirst = true; /**...
diff --git a/freeplane/src/org/freeplane/features/link/LinkController.java b/freeplane/src/org/freeplane/features/link/LinkController.java index 69e5172b7..9b96e12d1 100644 --- a/freeplane/src/org/freeplane/features/link/LinkController.java +++ b/freeplane/src/org/freeplane/features/link/LinkController.java @@ -1,780 +...
true
true
public static URI toRelativeURI(final File map, final File input, final int linkType) { if (linkType == LINK_ABSOLUTE) { return null; } try { URI mapUri = null; if (map != null) { mapUri = map.getAbsoluteFile().toURI(); } if (linkType == LINK_RELATIVE_TO_WORKSPACE) { URI workspaceLoca...
public static URI toRelativeURI(final File map, final File input, final int linkType) { if (linkType == LINK_ABSOLUTE) { return null; } try { URI mapUri = null; if (map != null) { mapUri = map.getAbsoluteFile().toURI(); } if (linkType == LINK_RELATIVE_TO_WORKSPACE) { URI workspaceLoca...
diff --git a/grails/src/java/grails/converters/JSON.java b/grails/src/java/grails/converters/JSON.java index f36179074..fc460bc15 100644 --- a/grails/src/java/grails/converters/JSON.java +++ b/grails/src/java/grails/converters/JSON.java @@ -1,586 +1,586 @@ /* Copyright 2006-2007 Graeme Rocher * * Licensed under th...
true
true
public void value(Object o) throws ConverterException { try { if (o == null) { writer.value(null); } else if (o instanceof String) { writer.value(o); } else if (o instanceof Class) { writer.value(((Class) o).getName()); ...
public void value(Object o) throws ConverterException { try { if (o == null || o.equals(JSONObject.NULL)) { writer.value(null); } else if (o instanceof String) { writer.value(o); } else if (o instanceof Class) { writer.value...
diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 1d31d2f3..5e7da39e 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -1,737 +1,737 @@ package net.osmand.plus....
false
true
public void setCurrentLocation(Location currentLocation) { if(finalLocation == null || currentLocation == null){ makeUturnWhenPossible = false; turnImminent = false; return; } makeUturnWhenPossible = false; boolean calculateRoute = false; boolean suppressTurnPrompt = false; synchronized (this...
public void setCurrentLocation(Location currentLocation) { if(finalLocation == null || currentLocation == null){ makeUturnWhenPossible = false; turnImminent = false; return; } makeUturnWhenPossible = false; boolean calculateRoute = false; boolean suppressTurnPrompt = false; synchronized (this...
diff --git a/tests/gdx-tests-lwjgl/src/com/badlogic/gdx/tests/lwjgl/LwjglDebugStarter.java b/tests/gdx-tests-lwjgl/src/com/badlogic/gdx/tests/lwjgl/LwjglDebugStarter.java index 55f7e91b7..99d291a38 100644 --- a/tests/gdx-tests-lwjgl/src/com/badlogic/gdx/tests/lwjgl/LwjglDebugStarter.java +++ b/tests/gdx-tests-lwjgl/src...
true
true
public static void main (String[] argv) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); // config.useGL20 = true; new LwjglApplication(new TextureAtlasTest(), config); }
public static void main (String[] argv) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); // config.useGL20 = true; config.vSyncEnabled = true; new LwjglApplication(new FlickScrollPaneTest(), config); }
diff --git a/src/test/org/apache/hadoop/hdfs/TestHDFSServerPorts.java b/src/test/org/apache/hadoop/hdfs/TestHDFSServerPorts.java index e9ce5e4d3..29bab98cb 100644 --- a/src/test/org/apache/hadoop/hdfs/TestHDFSServerPorts.java +++ b/src/test/org/apache/hadoop/hdfs/TestHDFSServerPorts.java @@ -1,219 +1,220 @@ /** * Li...
true
true
public void testDataNodePorts() throws Exception { NameNode nn = null; try { nn = startNameNode(); // start data-node on the same port as name-node Configuration conf2 = new Configuration(config); conf2.set("dfs.data.dir", new File(hdfsDir, "data").getPath()); conf2.set("dfs.dat...
public void testDataNodePorts() throws Exception { NameNode nn = null; try { nn = startNameNode(); // start data-node on the same port as name-node Configuration conf2 = new Configuration(config); conf2.set("dfs.data.dir", new File(hdfsDir, "data").getPath()); conf2.set("dfs.dat...
diff --git a/src/net/sf/freecol/server/ai/AIUnit.java b/src/net/sf/freecol/server/ai/AIUnit.java index 23c2b8571..4db722673 100644 --- a/src/net/sf/freecol/server/ai/AIUnit.java +++ b/src/net/sf/freecol/server/ai/AIUnit.java @@ -1,585 +1,588 @@ /** * Copyright (C) 2002-2012 The FreeCol Team * * This file is ...
true
true
protected void readFromXMLImpl(XMLStreamReader in) throws XMLStreamException { final String inID = in.getAttributeValue(null, ID_ATTRIBUTE); unit = (Unit) getAIMain().getFreeColGameObject(inID); if (unit == null) { logger.warning("Could not find unit: " + inID); ...
protected void readFromXMLImpl(XMLStreamReader in) throws XMLStreamException { final String inID = in.getAttributeValue(null, ID_ATTRIBUTE); unit = (Unit) getAIMain().getFreeColGameObject(inID); if (unit == null) { logger.warning("Could not find unit: " + inID); ...
diff --git a/src/com/android/settings/inputmethod/InputMethodPreference.java b/src/com/android/settings/inputmethod/InputMethodPreference.java index 4b926e227..f222b88ae 100644 --- a/src/com/android/settings/inputmethod/InputMethodPreference.java +++ b/src/com/android/settings/inputmethod/InputMethodPreference.java @@ ...
true
true
protected void onBindView(View view) { super.onBindView(view); mInputMethodPref = view.findViewById(R.id.inputmethod_pref); mInputMethodPref.setOnClickListener(mPrefOnclickListener); mInputMethodSettingsButton = (ImageView)view.findViewById(R.id.inputmethod_settings); mTitleT...
protected void onBindView(View view) { super.onBindView(view); mInputMethodPref = view.findViewById(R.id.inputmethod_pref); mInputMethodPref.setOnClickListener(mPrefOnclickListener); mInputMethodSettingsButton = (ImageView)view.findViewById(R.id.inputmethod_settings); mTitleT...
diff --git a/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java b/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java index 7f252225..69bc241a 100644 --- a/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java +++ b/src/java/org/apache/cassandra/db/column...
false
true
public SSTableSliceIterator(SSTableReader ssTable, FileDataInput file, DecoratedKey key, byte[] startColumn, byte[] finishColumn, boolean reversed) { this.file = file; this.decoratedKey = key; if (file == null) { closeFileWhenDone = true; //if we create it, we close ...
public SSTableSliceIterator(SSTableReader ssTable, FileDataInput file, DecoratedKey key, byte[] startColumn, byte[] finishColumn, boolean reversed) { this.decoratedKey = key; if (file == null) { closeFileWhenDone = true; //if we create it, we close it file = ssTa...
diff --git a/blackjack/src/drexel/edu/blackjack/server/commands/BlackjackCommand.java b/blackjack/src/drexel/edu/blackjack/server/commands/BlackjackCommand.java index a22584b..0e62fa3 100644 --- a/blackjack/src/drexel/edu/blackjack/server/commands/BlackjackCommand.java +++ b/blackjack/src/drexel/edu/blackjack/server/co...
true
true
public String processCommand( BlackjackProtocol protocol, CommandMetadata cm ) { // The default implementation should be overridden! StringBuilder str = new StringBuilder( "Someone needs to implement the " ); str.append( this.getClass().toString() ); str.append( " class." ); return str.toString(); }
public String processCommand( BlackjackProtocol protocol, CommandMetadata cm ) { // The default implementation should be overridden! StringBuilder str = new StringBuilder( "500 Someone needs to implement the " ); str.append( this.getClass().toString() ); str.append( " class." ); return str.toString(); ...
diff --git a/roo/classpath/src/main/java/org/springframework/roo/classpath/itd/ItdSourceFileComposer.java b/roo/classpath/src/main/java/org/springframework/roo/classpath/itd/ItdSourceFileComposer.java index 9d7b046c..914d8cac 100644 --- a/roo/classpath/src/main/java/org/springframework/roo/classpath/itd/ItdSourceFileCo...
true
true
private void appendInnerTypes() { List<ClassOrInterfaceTypeDetails> innerTypes = itdTypeDetails.getInnerTypes(); for (ClassOrInterfaceTypeDetails innerType: innerTypes) { content = true; this.appendIndent(); if (innerType.getModifier() != 0) { this.append(Modifier.toString(innerType.getModifier()))...
private void appendInnerTypes() { List<ClassOrInterfaceTypeDetails> innerTypes = itdTypeDetails.getInnerTypes(); for (ClassOrInterfaceTypeDetails innerType: innerTypes) { content = true; this.appendIndent(); if (innerType.getModifier() != 0) { this.append(Modifier.toString(innerType.getModifier()))...
diff --git a/uk.ac.diamond.scisoft/src/uk/ac/diamond/scisoft/JythonCreator.java b/uk.ac.diamond.scisoft/src/uk/ac/diamond/scisoft/JythonCreator.java index d782227..b39a0b0 100644 --- a/uk.ac.diamond.scisoft/src/uk/ac/diamond/scisoft/JythonCreator.java +++ b/uk.ac.diamond.scisoft/src/uk/ac/diamond/scisoft/JythonCreator....
false
true
private void initialiseInterpreter(IProgressMonitor monitor) throws CoreException { logger.debug("Initialising the Jython interpreter setup"); if (isRunningInEclipse == null) { String runProp = System.getProperty(RUN_IN_ECLIPSE); isRunningInEclipse = runProp != null && runProp.equalsIgnoreCase("true"); ...
private void initialiseInterpreter(IProgressMonitor monitor) throws CoreException { logger.debug("Initialising the Jython interpreter setup"); if (isRunningInEclipse == null) { String runProp = System.getProperty(RUN_IN_ECLIPSE); isRunningInEclipse = runProp != null && runProp.equalsIgnoreCase("true"); ...
diff --git a/tools/collect-view/src/se/sics/contiki/collect/UDPConnection.java b/tools/collect-view/src/se/sics/contiki/collect/UDPConnection.java index 61b1fe2c..7dd602be 100644 --- a/tools/collect-view/src/se/sics/contiki/collect/UDPConnection.java +++ b/tools/collect-view/src/se/sics/contiki/collect/UDPConnection.ja...
false
true
public void open(String comPort) { close(); this.comPort = comPort == null ? "" : comPort; isClosed = false; try { serverSocket = new DatagramSocket(port); System.out.println("Opened UDP port: " + port); /* Start thread listening on UDP */ Thread readInput = new Thread(new Run...
public void open(String comPort) { close(); this.comPort = comPort == null ? "" : comPort; isClosed = false; try { serverSocket = new DatagramSocket(port); System.out.println("Opened UDP port: " + port); /* Start thread listening on UDP */ Thread readInput = new Thread(new Run...
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java index f7deec769..b4ce6e0a2 100644 --- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.jav...
false
true
public static IStatus toStatus(Throwable e) { if (e instanceof TracLoginException) { throw new RuntimeException("Invoke TracCorePlugin.toStatus(Throwable, TaskRepository)"); } else if (e instanceof TracPermissionDeniedException) { throw new RuntimeException("Invoke TracCorePlugin.toStatus(Throwable, TaskRepo...
public static IStatus toStatus(Throwable e) { if (e instanceof TracLoginException) { throw new RuntimeException("Invoke TracCorePlugin.toStatus(Throwable, TaskRepository)", e); } else if (e instanceof TracPermissionDeniedException) { throw new RuntimeException("Invoke TracCorePlugin.toStatus(Throwable, TaskR...
diff --git a/geoserver/src/org/vfny/geoserver/form/DemoRequestForm.java b/geoserver/src/org/vfny/geoserver/form/DemoRequestForm.java index a34bac9d9b..ba6148110f 100644 --- a/geoserver/src/org/vfny/geoserver/form/DemoRequestForm.java +++ b/geoserver/src/org/vfny/geoserver/form/DemoRequestForm.java @@ -1,146 +1,147 @@ ...
true
true
public void reset(ActionMapping arg0, HttpServletRequest request) { super.reset(arg0, request); ServletContext context = getServlet().getServletContext(); //DJB: changed this for geoserver_data_dir // this.dir = new File(context.getRealPath("/data/demo")); this.dir =...
public void reset(ActionMapping arg0, HttpServletRequest request) { super.reset(arg0, request); ServletContext context = getServlet().getServletContext(); //DJB: changed this for geoserver_data_dir // this.dir = new File(context.getRealPath("/data/demo")); this.dir =...
diff --git a/src/com/android/camera/Switcher.java b/src/com/android/camera/Switcher.java index 342f0d68..c88ddb8a 100644 --- a/src/com/android/camera/Switcher.java +++ b/src/com/android/camera/Switcher.java @@ -1,184 +1,184 @@ /* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache ...
true
true
protected void onDraw(Canvas canvas) { Drawable drawable = getDrawable(); int drawableHeight = drawable.getIntrinsicHeight(); int drawableWidth = drawable.getIntrinsicWidth(); if (drawableWidth == 0 || drawableHeight == 0) { return; // nothing to draw (empty bounds)...
protected void onDraw(Canvas canvas) { Drawable drawable = getDrawable(); int drawableHeight = drawable.getIntrinsicHeight(); int drawableWidth = drawable.getIntrinsicWidth(); if (drawableWidth == 0 || drawableHeight == 0) { return; // nothing to draw (empty bounds)...
diff --git a/QuizServerTomcat/src/com/servlets/CreateServlet.java b/QuizServerTomcat/src/com/servlets/CreateServlet.java index f66a025..e858ef2 100644 --- a/QuizServerTomcat/src/com/servlets/CreateServlet.java +++ b/QuizServerTomcat/src/com/servlets/CreateServlet.java @@ -1,63 +1,63 @@ package com.servlets; import ...
true
true
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //HttpSession session = request.getSession(); PrintWriter writer = response.getWriter(); MySQLHelper mySQLHelper = MySQLHelper.getInstance(); Gson gson = new Gson(); String method = req...
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //HttpSession session = request.getSession(); PrintWriter writer = response.getWriter(); MySQLHelper mySQLHelper = MySQLHelper.getInstance(); Gson gson = new Gson(); String method = req...
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index b51a27bce..be9cb660f 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -1,204 +1,205 @@ /* * Copyright (C) 2011 The Andr...
true
true
public void setPhoneCallDetails(PhoneCallDetailsViews views, PhoneCallDetails details, boolean isHighlighted) { // Display up to a given number of icons. views.callTypeIcons.clear(); int count = details.callTypes.length; for (int index = 0; index < count && index < MAX_CA...
public void setPhoneCallDetails(PhoneCallDetailsViews views, PhoneCallDetails details, boolean isHighlighted) { // Display up to a given number of icons. views.callTypeIcons.clear(); int count = details.callTypes.length; for (int index = 0; index < count && index < MAX_CA...
diff --git a/src/search/search34/ZMap4.java b/src/search/search34/ZMap4.java index 0620232..79a6dfc 100644 --- a/src/search/search34/ZMap4.java +++ b/src/search/search34/ZMap4.java @@ -1,61 +1,63 @@ package search.search34; public final class ZMap4 implements Hash{ private final CuckooHash2 alwaysReplace; pri...
true
true
public void put(final long zkey, final TTEntry e){ TTEntry t = get(zkey); if(t != null && t.depth <= e.depth){ TTEntry.swap(t, e); } else{ final int index = (int)(zkey >>> (64-size)); final int seq = e.seq; final TTEntry d = depthReplace[index]; if(d.seq != seq || e.depth >= d.depth){ temp.fil...
public void put(final long zkey, final TTEntry e){ TTEntry t = get(zkey); if(t != null){ if(t.depth <= e.depth){ TTEntry.swap(t, e); } } else{ final int index = (int)(zkey >>> (64-size)); final int seq = e.seq; final TTEntry d = depthReplace[index]; if(d.seq != seq || e.depth >= d.depth){ ...
diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index e6fbe4d37..9c360371a 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -1,416 +1,417 @@ package hudson.model; import hudson.FilePath; import hudson.La...
true
true
private void launch(final Slave slave) { closeChannel(); OutputStream os; try { os = new FileOutputStream(getLogFile()); } catch (FileNotFoundException e) { logger.log(Level.SEVERE, "Failed to create log file "+getLogFile(),e); ...
private void launch(final Slave slave) { closeChannel(); OutputStream os; try { os = new FileOutputStream(getLogFile()); } catch (FileNotFoundException e) { logger.log(Level.SEVERE, "Failed to create log file "+getLogFile(),e); ...
diff --git a/us7638/sapisync/src/main/java/com/funambol/sapisync/SapiSyncHandler.java b/us7638/sapisync/src/main/java/com/funambol/sapisync/SapiSyncHandler.java index 2a25a43f..1e366a50 100755 --- a/us7638/sapisync/src/main/java/com/funambol/sapisync/SapiSyncHandler.java +++ b/us7638/sapisync/src/main/java/com/funambol...
false
true
public String uploadItem(SyncItem item, String remoteUri, SyncListener listener) throws SyncException { if (Log.isLoggable(Log.INFO)) { Log.info(TAG_LOG, "Uploading item: " + item.getKey()); } if(!(item instanceof JSONSyncItem)) { throw new UnsupportedOperationExcepti...
public String uploadItem(SyncItem item, String remoteUri, SyncListener listener) throws SyncException { if (Log.isLoggable(Log.INFO)) { Log.info(TAG_LOG, "Uploading item: " + item.getKey()); } if(!(item instanceof JSONSyncItem)) { throw new UnsupportedOperationExcepti...
diff --git a/src/main/java/ditl/JarStore.java b/src/main/java/ditl/JarStore.java index 0ea83ed..f8cd0bd 100644 --- a/src/main/java/ditl/JarStore.java +++ b/src/main/java/ditl/JarStore.java @@ -1,67 +1,66 @@ /******************************************************************************* * This file is part of DITL. ...
true
true
private Set<File> getInfoFiles() throws IOException { final Set<File> infoFiles = new HashSet<File>(); final Enumeration<JarEntry> entries = jar_file.entries(); while (entries.hasMoreElements()) { final JarEntry entry = entries.nextElement(); if (entry.getName().endsW...
private Set<File> getInfoFiles() throws IOException { final Set<File> infoFiles = new HashSet<File>(); final Enumeration<JarEntry> entries = jar_file.entries(); while (entries.hasMoreElements()) { final JarEntry entry = entries.nextElement(); if (entry.getName().endsW...
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtend/parser/antlr/TreeTestLanguageParser.java b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtend/parser/antlr/TreeTestLanguageParser.java index 2e63ac07c..b6eeeaf5d 100644 --- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org...
true
true
protected IParseResult parse(String ruleName, ANTLRInputStream in) { TokenSource tokenSource = createLexer(in); XtextTokenStream tokenStream = createTokenStream(tokenSource); tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); org.eclipse.xtext.xtend.parser.antlr.internal.Inter...
protected IParseResult parse(String ruleName, ANTLRInputStream in) { TokenSource tokenSource = createLexer(in); XtextTokenStream tokenStream = createTokenStream(tokenSource); tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); org.eclipse.xtext.xtend.parser.antlr.internal.Inter...
diff --git a/mx.itesm.model2roo/src/mx/itesm/model2roo/handlers/Util.java b/mx.itesm.model2roo/src/mx/itesm/model2roo/handlers/Util.java index a99e9ce..abc7a26 100644 --- a/mx.itesm.model2roo/src/mx/itesm/model2roo/handlers/Util.java +++ b/mx.itesm.model2roo/src/mx/itesm/model2roo/handlers/Util.java @@ -1,398 +1,399 @@...
true
true
public static void ecore2Roo(final Object currentObject, final File ecoreFile, final MessageConsoleStream consoleStream) throws IOException, InterruptedException { URL atlQuery; File rooFile; File pomFile; Handler rooHandler; ModelLoader modelLoader; ...
public static void ecore2Roo(final Object currentObject, final File ecoreFile, final MessageConsoleStream consoleStream) throws IOException, InterruptedException { URL atlQuery; File rooFile; File pomFile; Handler rooHandler; ModelLoader modelLoader; ...
diff --git a/org.sonar.ide.eclipse/src/org/sonar/ide/eclipse/internal/EclipseSonar.java b/org.sonar.ide.eclipse/src/org/sonar/ide/eclipse/internal/EclipseSonar.java index f34775bd..dac3e01e 100644 --- a/org.sonar.ide.eclipse/src/org/sonar/ide/eclipse/internal/EclipseSonar.java +++ b/org.sonar.ide.eclipse/src/org/sonar/...
true
true
public SourceCode search(IResource resource) { if (resource instanceof IProject) { String key = EclipseResourceUtils.getInstance().getProjectKey(resource); return search(key); } else if (resource instanceof IFolder) { String projectKey = EclipseResourceUtils.getInstance().getProjectKey(resou...
public SourceCode search(IResource resource) { if (resource instanceof IProject) { String key = EclipseResourceUtils.getInstance().getProjectKey(resource); return search(key); } else if (resource instanceof IFolder) { String projectKey = EclipseResourceUtils.getInstance().getProjectKey(resou...