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/graylog2-server/src/main/java/org/graylog2/security/ShiroSecurityContextFactory.java b/graylog2-server/src/main/java/org/graylog2/security/ShiroSecurityContextFactory.java index 0d94c28e9..93ad7b3b1 100644 --- a/graylog2-server/src/main/java/org/graylog2/security/ShiroSecurityContextFactory.java +++ b/gray...
true
true
public ShiroSecurityContextFactory(Core core) { final GraylogSimpleAccountRealm inMemoryRealm = new GraylogSimpleAccountRealm(); inMemoryRealm.setCachingEnabled(false); final Configuration config = core.getConfiguration(); inMemoryRealm.addRootAccount( config.getRootU...
public ShiroSecurityContextFactory(Core core) { final GraylogSimpleAccountRealm inMemoryRealm = new GraylogSimpleAccountRealm(); inMemoryRealm.setCachingEnabled(false); final Configuration config = core.getConfiguration(); inMemoryRealm.addRootAccount( config.getRootU...
diff --git a/src/com/redhat/ceylon/compiler/java/tools/LanguageCompiler.java b/src/com/redhat/ceylon/compiler/java/tools/LanguageCompiler.java index 839d81b5b..77b9fc451 100755 --- a/src/com/redhat/ceylon/compiler/java/tools/LanguageCompiler.java +++ b/src/com/redhat/ceylon/compiler/java/tools/LanguageCompiler.java @@ ...
true
true
private JCCompilationUnit ceylonParse(JavaFileObject filename, CharSequence readSource) { if(ceylonEnter.hasRun()) throw new RuntimeException("Trying to load new source file after CeylonEnter has been called: "+filename); try { ModuleManager moduleManager = phasedUnits.getMod...
private JCCompilationUnit ceylonParse(JavaFileObject filename, CharSequence readSource) { if(ceylonEnter.hasRun()) throw new RuntimeException("Trying to load new source file after CeylonEnter has been called: "+filename); try { ModuleManager moduleManager = phasedUnits.getMod...
diff --git a/src/no/runsafe/ItemControl/trading/commands/CreateTrader.java b/src/no/runsafe/ItemControl/trading/commands/CreateTrader.java index 1c0740a..5117e89 100644 --- a/src/no/runsafe/ItemControl/trading/commands/CreateTrader.java +++ b/src/no/runsafe/ItemControl/trading/commands/CreateTrader.java @@ -1,58 +1,63 ...
true
true
public void OnPlayerInteractEntityEvent(RunsafePlayerInteractEntityEvent event) { IPlayer player = event.getPlayer(); String playerName = player.getName(); if (interactTrack.contains(playerName)) { RunsafeEntity entity = event.getRightClicked(); if (entity.getEntityType() == LivingEntity.Villager) {...
public void OnPlayerInteractEntityEvent(RunsafePlayerInteractEntityEvent event) { IPlayer player = event.getPlayer(); String playerName = player.getName(); if (interactTrack.contains(playerName)) { RunsafeEntity entity = event.getRightClicked(); if (entity.getEntityType() == LivingEntity.Villager) {...
diff --git a/ReactorEE/swing/GameTypeSelectionGUI.java b/ReactorEE/swing/GameTypeSelectionGUI.java index 29a425a..7c681a6 100644 --- a/ReactorEE/swing/GameTypeSelectionGUI.java +++ b/ReactorEE/swing/GameTypeSelectionGUI.java @@ -1,93 +1,92 @@ package ReactorEE.swing; import java.awt.Color; import java.awt.EventQue...
true
true
private void initialize() { Music.changeGameContext("Menu"); frmErr = new JFrame(); frmErr.setTitle("Game type selection"); frmErr.setBounds(100, 100, 450, 300); frmErr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLayeredPane layeredPane = new JLayeredPane(); frmErr.getContentPane().add(layeredPan...
private void initialize() { frmErr = new JFrame(); frmErr.setTitle("Game type selection"); frmErr.setBounds(100, 100, 450, 300); frmErr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLayeredPane layeredPane = new JLayeredPane(); frmErr.getContentPane().add(layeredPane, BorderLayout.CENTER); java....
diff --git a/src/test/UberTestCase2.java b/src/test/UberTestCase2.java index 86712589b..767755d41 100644 --- a/src/test/UberTestCase2.java +++ b/src/test/UberTestCase2.java @@ -1,120 +1,117 @@ /** * to prevent a JVM startup-shutdown time per test, it should be more efficient to * collect the tests together into a ...
false
true
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(groovy.bugs.ArrayMethodCallBug.class); suite.addTestSuite(groovy.bugs.ClassGeneratorFixesTest.class); suite.addTestSuite(groovy.bugs.ClassInScriptBug.class); suite.addTestSuite(groovy.bugs.Clos...
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(groovy.bugs.ArrayMethodCallBug.class); suite.addTestSuite(groovy.bugs.ClassGeneratorFixesTest.class); suite.addTestSuite(groovy.bugs.ClassInScriptBug.class); suite.addTestSuite(groovy.bugs.Clos...
diff --git a/src/org/zeroxlab/util/tscal/TSCalibrationStartup.java b/src/org/zeroxlab/util/tscal/TSCalibrationStartup.java index 31d26c0..dfb220e 100644 --- a/src/org/zeroxlab/util/tscal/TSCalibrationStartup.java +++ b/src/org/zeroxlab/util/tscal/TSCalibrationStartup.java @@ -1,56 +1,57 @@ /* Copyright (C) 2010 0xlab....
false
true
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); File calFile = new File(cal_path); if (!calFile.exists()) { Intent starterIntent = new Intent(this, TSCalibration.class); startActivityForResult(starterIntent, 0); } ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); File calFile = new File(cal_path); if (!calFile.exists()) { Intent starterIntent = new Intent(this, TSCalibration.class); startActivityForResult(starterIntent, 0); } else { ...
diff --git a/src/main/java/org/jinglenodes/custom/FakeRingPreparation.java b/src/main/java/org/jinglenodes/custom/FakeRingPreparation.java index 6cb9193..3204121 100644 --- a/src/main/java/org/jinglenodes/custom/FakeRingPreparation.java +++ b/src/main/java/org/jinglenodes/custom/FakeRingPreparation.java @@ -1,98 +1,100...
true
true
public JingleIQ proceedSIPInitiate(JingleIQ iq, CallSession session, SipChannel channel) { try { log.debug("Fake Ring on IQ:" + iq.toXML()); final JingleIQ ring = JingleProcessor.createJingleSessionInfo(new JID(iq.getJingle().getSid()), new JID(iq.getJingle().getInitiator()), iq.get...
public JingleIQ proceedSIPInitiate(JingleIQ iq, CallSession session, SipChannel channel) { try { log.debug("Fake Ring on IQ:" + iq.toXML()); final JingleIQ ring = JingleProcessor.createJingleSessionInfo(new JID(iq.getJingle().getResponder()), new JID(iq.getJingle...
diff --git a/gr.sch.ira.minoas/src/main/java/gr/sch/ira/minoas/seam/components/management/SchoolYearManagement.java b/gr.sch.ira.minoas/src/main/java/gr/sch/ira/minoas/seam/components/management/SchoolYearManagement.java index 60f8ca1f..89fc462c 100644 --- a/gr.sch.ira.minoas/src/main/java/gr/sch/ira/minoas/seam/compon...
false
true
public void doUpgrade() { if (getSchoolYearHome().isManaged()) { EntityManager em = getEntityManager(); try { SchoolYear sourceSchoolYear = coreSearching .getActiveSchoolYear(em); SchoolYear targetSchoolYear = getSchoolYearHome().getInstance(); info("upgrading school year #0 to #1", sourceSc...
public void doUpgrade() { if (getSchoolYearHome().isManaged()) { EntityManager em = getEntityManager(); try { SchoolYear sourceSchoolYear = coreSearching .getActiveSchoolYear(em); SchoolYear targetSchoolYear = getSchoolYearHome().getInstance(); info("upgrading school year #0 to #1", sourceSc...
diff --git a/lilith/src/main/java/de/huxhorn/lilith/Lilith.java b/lilith/src/main/java/de/huxhorn/lilith/Lilith.java index 47be7b97..7d1c9577 100644 --- a/lilith/src/main/java/de/huxhorn/lilith/Lilith.java +++ b/lilith/src/main/java/de/huxhorn/lilith/Lilith.java @@ -1,692 +1,692 @@ /* * Lilith - a log event viewer. ...
true
true
public static void main(String args[]) { final Logger logger = LoggerFactory.getLogger(Lilith.class); { // initialize java.util.logging to use slf4j... Handler handler = new Slf4JHandler(); java.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger(""); rootLogger.addHandler(handler); ...
public static void main(String args[]) { final Logger logger = LoggerFactory.getLogger(Lilith.class); { // initialize java.util.logging to use slf4j... Handler handler = new Slf4JHandler(); java.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger(""); rootLogger.addHandler(handler); ...
diff --git a/src/main/java/hudson/plugins/dry/DryPlugin.java b/src/main/java/hudson/plugins/dry/DryPlugin.java index a10ac49..988839a 100644 --- a/src/main/java/hudson/plugins/dry/DryPlugin.java +++ b/src/main/java/hudson/plugins/dry/DryPlugin.java @@ -1,17 +1,19 @@ package hudson.plugins.dry; import hudson.Plugin;...
true
true
public void start() { DetailFactory.addDetailBuilder(DryResultAction.class, new DryDetailBuilder()); }
public void start() { DryDetailBuilder detailBuilder = new DryDetailBuilder(); DetailFactory.addDetailBuilder(DryResultAction.class, detailBuilder); DetailFactory.addDetailBuilder(DryMavenResultAction.class, detailBuilder); }
diff --git a/src/com/ifsoft/redfire/servlets/JnlpServlet.java b/src/com/ifsoft/redfire/servlets/JnlpServlet.java index ebd2d86..3780b1a 100644 --- a/src/com/ifsoft/redfire/servlets/JnlpServlet.java +++ b/src/com/ifsoft/redfire/servlets/JnlpServlet.java @@ -1,100 +1,100 @@ package com.ifsoft.redfire.servlets; import...
true
true
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("application/x-java-jnlp-file"); response.setHeader("Content-Disposition","Inline; filename=screencast.jnlp"); try { ServletOutputStream out = response.getOutputS...
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("application/x-java-jnlp-file"); response.setHeader("Content-Disposition","Inline; filename=screencast.jnlp"); try { ServletOutputStream out = response.getOutputS...
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java index 51c9eeb1a..56fbc906c 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher....
false
true
private IRegion findEnclosingPeers(IDocument document, DocumentPartitionAccessor doc, int offset, int length, int lowerBoundary, int upperBoundary) throws BadLocationException { char[] pairs= fPairs.fPairs; int start; int end; if (length >= 0) { start= offset; end= offset + length; } else { end= o...
private IRegion findEnclosingPeers(IDocument document, DocumentPartitionAccessor doc, int offset, int length, int lowerBoundary, int upperBoundary) throws BadLocationException { char[] pairs= fPairs.fPairs; int start; int end; if (length >= 0) { start= offset; end= offset + length; } else { end= o...
diff --git a/src/ru/spbau/bioinf/tagfinder/Scan.java b/src/ru/spbau/bioinf/tagfinder/Scan.java index 27b70d0..e3cb510 100644 --- a/src/ru/spbau/bioinf/tagfinder/Scan.java +++ b/src/ru/spbau/bioinf/tagfinder/Scan.java @@ -1,98 +1,100 @@ package ru.spbau.bioinf.tagfinder; import ru.spbau.bioinf.tagfinder.util.ReaderU...
true
true
public Scan(Properties prop, BufferedReader input, int scanId) throws IOException { id = scanId; precursorCharge = ReaderUtil.getIntValue(prop, "CHARGE"); precursorMass = ReaderUtil.getDoubleValue(prop, "MONOISOTOPIC_MASS"); List<String[]> datas; while ((datas = ReaderUtil.re...
public Scan(Properties prop, BufferedReader input, int scanId) throws IOException { id = scanId; precursorCharge = ReaderUtil.getIntValue(prop, "CHARGE"); precursorMass = ReaderUtil.getDoubleValue(prop, "MONOISOTOPIC_MASS"); List<String[]> datas; while ((datas = ReaderUtil.re...
diff --git a/ecologylab/appframework/ApplicationEnvironment.java b/ecologylab/appframework/ApplicationEnvironment.java index 97082ce2..4412b429 100644 --- a/ecologylab/appframework/ApplicationEnvironment.java +++ b/ecologylab/appframework/ApplicationEnvironment.java @@ -1,885 +1,885 @@ package ecologylab.appframework;...
false
true
private void processPrefs(Class baseClass, TranslationSpace translationSpace, Stack<String> argStack) throws XmlTranslationException { LaunchType launchType = LaunchType.ECLIPSE; // current default // look for launch method identifier in upper case String arg = pop(argStack); if (arg != null) { S...
private void processPrefs(Class baseClass, TranslationSpace translationSpace, Stack<String> argStack) throws XmlTranslationException { LaunchType launchType = LaunchType.ECLIPSE; // current default // look for launch method identifier in upper case String arg = pop(argStack); if (arg != null) { S...
diff --git a/src/test/java/FailedTests.java b/src/test/java/FailedTests.java index 0a14af359..077b09fb2 100644 --- a/src/test/java/FailedTests.java +++ b/src/test/java/FailedTests.java @@ -1,43 +1,39 @@ import java.io.IOException; import org.junit.Test; import suite.Suite; import suite.fp.eval.FunRbTreeTest; i...
true
true
public void test3() { Suite.evaluateFunType("" // + "using STANDARD >> \n" // + "define grp = (list0 => \n" // + " if-bind (list0 = ($v0;)) then (v0;); else list0 \n" // + ") >> \n" // + "grp {} \n" // ); }
public void test3() { Suite.evaluateFunType("" // + "define grp = (list0 => (list0;) = list0) >> grp" // ); }
diff --git a/tizzit-richclient/src/main/java/de/juwimm/cms/content/panel/PanSimpleDate.java b/tizzit-richclient/src/main/java/de/juwimm/cms/content/panel/PanSimpleDate.java index 5f0fa3bc..8a87b250 100644 --- a/tizzit-richclient/src/main/java/de/juwimm/cms/content/panel/PanSimpleDate.java +++ b/tizzit-richclient/src/ma...
true
true
public void setDateTextField(String date){ if(date == null || date.isEmpty()){ dateChooser.setDate((Date)null); return; } try { dateChooser.setDate(new SimpleDateFormat().parse(date)); } catch (ParseException e) { e.printStackTrace(); } }
public void setDateTextField(String date){ if(date == null || date.isEmpty()){ dateChooser.setDate((Date)null); return; } try { dateChooser.setDate(new SimpleDateFormat("dd.MM.yyyy").parse(date)); } catch (ParseException e) { e.printStackTrace(); } }
diff --git a/source/RMG/jing/rxnSys/JDASSL.java b/source/RMG/jing/rxnSys/JDASSL.java index 61bbc6f9..5ea48d02 100644 --- a/source/RMG/jing/rxnSys/JDASSL.java +++ b/source/RMG/jing/rxnSys/JDASSL.java @@ -1,797 +1,795 @@ //////////////////////////////////////////////////////////////////////////////// // // RMG - React...
true
true
public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged, TerminationTester tt, int p_iterationNum) { ...
public SystemSnapshot solve(boolean p_initialization, ReactionModel p_reactionModel, boolean p_reactionChanged, SystemSnapshot p_beginStatus, ReactionTime p_beginTime, ReactionTime p_endTime, Temperature p_temperature, Pressure p_pressure, boolean p_conditionChanged, TerminationTester tt, int p_iterationNum) { ...
diff --git a/v9t9/v9t9-java/v9t9-base/src/v9t9/base/settings/XMLSettingStorage.java b/v9t9/v9t9-java/v9t9-base/src/v9t9/base/settings/XMLSettingStorage.java index d8ac54f2d..392f0eb47 100644 --- a/v9t9/v9t9-java/v9t9-base/src/v9t9/base/settings/XMLSettingStorage.java +++ b/v9t9/v9t9-java/v9t9-base/src/v9t9/base/setting...
true
true
private void loadSection(ISettingSection section, Element sectionElement) { NodeList nodeList = sectionElement.getChildNodes(); Node node = nodeList.item(0); while (node != null) { if (node instanceof Element) { Element element = (Element) node; node = node.getNextSibling(); String type = eleme...
private void loadSection(ISettingSection section, Element sectionElement) { NodeList nodeList = sectionElement.getChildNodes(); Node node = nodeList.item(0); while (node != null) { if (node instanceof Element) { Element element = (Element) node; node = node.getNextSibling(); String type = eleme...
diff --git a/src/main/java/net/sf/katta/Katta.java b/src/main/java/net/sf/katta/Katta.java index 40c664f..6bcd34e 100644 --- a/src/main/java/net/sf/katta/Katta.java +++ b/src/main/java/net/sf/katta/Katta.java @@ -1,520 +1,523 @@ /** * Copyright 2008 the original author or authors. * * Licensed under the Apache L...
true
true
public static void main(final String[] args) throws KattaException, InterruptedException { if (args.length < 1) { printUsageAndExit(); } final String command = args[0]; // static methods first if (command.endsWith("startNode")) { startNode(); } else if (command.endsWith("startMaste...
public static void main(final String[] args) throws KattaException, InterruptedException { if (args.length < 1) { printUsageAndExit(); } final String command = args[0]; // static methods first if (command.endsWith("startNode")) { startNode(); } else if (command.endsWith("startMaste...
diff --git a/trunk/java/com/tigervnc/vncviewer/DesktopWindow.java b/trunk/java/com/tigervnc/vncviewer/DesktopWindow.java index 2f3e48c4..02cb5a7c 100644 --- a/trunk/java/com/tigervnc/vncviewer/DesktopWindow.java +++ b/trunk/java/com/tigervnc/vncviewer/DesktopWindow.java @@ -1,551 +1,551 @@ /* Copyright (C) 2002-2005 R...
true
true
public void setCursor(int w, int h, Point hotspot, int[] data, byte[] mask) { // strictly we should use a mutex around this test since useLocalCursor // might be being altered by the GUI thread. However it's only a single // boolean and it doesn't matter if we get the wrong value...
public void setCursor(int w, int h, Point hotspot, int[] data, byte[] mask) { // strictly we should use a mutex around this test since useLocalCursor // might be being altered by the GUI thread. However it's only a single // boolean and it doesn't matter if we get the wrong value...
diff --git a/src/jp/muo/smsproxy/SmsProxyManager.java b/src/jp/muo/smsproxy/SmsProxyManager.java index 7100a3b..506b80a 100644 --- a/src/jp/muo/smsproxy/SmsProxyManager.java +++ b/src/jp/muo/smsproxy/SmsProxyManager.java @@ -1,92 +1,92 @@ package jp.muo.smsproxy; import java.util.ArrayList; import android.conten...
true
true
public boolean send(Mode smsMode, String msgText) { if (this.ctx == null || prefs == null || msgText.equals("")) { return false; } this.sendMode = smsMode; String msgSucceeded = ""; String msgFailed = ""; switch (this.sendMode) { case SMS: msgSucceeded = this.ctx.getString(R.string.forward_sm...
public boolean send(Mode smsMode, String msgText) { if (this.ctx == null || prefs == null || msgText.equals("")) { return false; } this.sendMode = smsMode; String msgSucceeded = ""; String msgFailed = ""; switch (this.sendMode) { case SMS: msgSucceeded = this.ctx.getString(R.string.forward_sm...
diff --git a/src/main/java/net/syamn/sakuracmd/commands/other/MfmfCommand.java b/src/main/java/net/syamn/sakuracmd/commands/other/MfmfCommand.java index a0a3b52..4875980 100644 --- a/src/main/java/net/syamn/sakuracmd/commands/other/MfmfCommand.java +++ b/src/main/java/net/syamn/sakuracmd/commands/other/MfmfCommand.java...
true
true
public void execute() throws CommandException { if (args.size() == 0) { Util.message(sender, " &aもふもふ...?&7 /もふもふ <プレイヤー名>"); if (isPlayer){ Util.message(sender, " &aあなたは今までに" + PlayerManager.getPlayer(player).getData().getMofCount() + "回もふもふされました!"); } ...
public void execute() throws CommandException { if (args.size() == 0) { Util.message(sender, " &aもふもふ...?&7 /もふもふ <プレイヤー名>"); if (isPlayer){ Util.message(sender, " &aあなたは今までに" + PlayerManager.getPlayer(player).getData().getMofCount() + "回もふもふされました!"); } ...
diff --git a/org/python/util/InteractiveInterpreter.java b/org/python/util/InteractiveInterpreter.java index 73f5d41e..28ce9680 100644 --- a/org/python/util/InteractiveInterpreter.java +++ b/org/python/util/InteractiveInterpreter.java @@ -1,156 +1,152 @@ // Copyright (c) Corporation for National Research Initiatives ...
false
true
public boolean runsource(String source, String filename, String symbol) { PyObject code; try { cflags.interactive = true; code = org.python.modules.codeop.compile_command_flags( source, filename, symbol,cflags); } catch (PyException exc) { ...
public boolean runsource(String source, String filename, String symbol) { PyObject code; try { code = Py.compile_command_flags(source, filename, symbol,cflags,true); } catch (PyException exc) { if (Py.matchException(exc, Py.SyntaxError)) { // Case 1 ...
diff --git a/src/main/java/de/minestar/castaway/data/Dungeon.java b/src/main/java/de/minestar/castaway/data/Dungeon.java index a58e9d6..7b52382 100644 --- a/src/main/java/de/minestar/castaway/data/Dungeon.java +++ b/src/main/java/de/minestar/castaway/data/Dungeon.java @@ -1,340 +1,343 @@ /* * Copyright (C) 2012 Mine...
false
true
public void playerFinished(PlayerData playerData) { long time = System.currentTimeMillis() - playerData.getStartTime(); // get the player Player player = playerData.getPlayer(); // send info PlayerUtils.sendMessage(player, ChatColor.DARK_AQUA, "------------------------------...
public void playerFinished(PlayerData playerData) { long time = System.currentTimeMillis() - playerData.getStartTime(); // get the player Player player = playerData.getPlayer(); // send info PlayerUtils.sendMessage(player, ChatColor.DARK_AQUA, "------------------------------...
diff --git a/ttt2/src/java/nz/ac/massey/cs/capstone/server/GetBots.java b/ttt2/src/java/nz/ac/massey/cs/capstone/server/GetBots.java index 4bf564c..98bd2f1 100644 --- a/ttt2/src/java/nz/ac/massey/cs/capstone/server/GetBots.java +++ b/ttt2/src/java/nz/ac/massey/cs/capstone/server/GetBots.java @@ -1,72 +1,78 @@ /* * T...
false
true
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/event-stream"); response.setCharacterEncoding ("UTF-8"); PrintWriter out = response.getWriter(); out.append("data: "); ...
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/event-stream"); response.setCharacterEncoding ("UTF-8"); PrintWriter out = response.getWriter(); out.append("retry: 5000\n"); o...
diff --git a/src/com/example/tracker/AggregateMessages.java b/src/com/example/tracker/AggregateMessages.java index 459d363..af71c13 100644 --- a/src/com/example/tracker/AggregateMessages.java +++ b/src/com/example/tracker/AggregateMessages.java @@ -1,80 +1,80 @@ package com.example.tracker; import Client.TestClient...
true
true
public static synchronized void addMessages(String message, boolean isEnd, boolean isOnline) { /**Check corner case */ if(messages == null) { messages = new StringBuffer(); } if(isEnd && message == null) { if(isOnline && messages.length() != 0) { messages.append("END" + '\n'); String[] message...
public static synchronized void addMessages(String message, boolean isEnd, boolean isOnline) { /**Check corner case */ if(messages == null) { messages = new StringBuffer(); } if(isEnd && message == null) { if(isOnline && count != 0) { messages.append("END" + '\n'); String[] messages = new Stri...
diff --git a/parser/src/main/java/org/batoo/jpa/parser/impl/metadata/attribute/IdAttributeMetadataImpl.java b/parser/src/main/java/org/batoo/jpa/parser/impl/metadata/attribute/IdAttributeMetadataImpl.java index 56f7e741..a34f2fc0 100644 --- a/parser/src/main/java/org/batoo/jpa/parser/impl/metadata/attribute/IdAttribute...
true
true
public IdAttributeMetadataImpl(Member member, String name, Set<Class<? extends Annotation>> parsed) { super(member, name, parsed); final TableGenerator tableGenerator = ReflectHelper.getAnnotation(member, TableGenerator.class); final SequenceGenerator sequenceGenerator = ReflectHelper.getAnnotation(member, Sequ...
public IdAttributeMetadataImpl(Member member, String name, Set<Class<? extends Annotation>> parsed) { super(member, name, parsed); final TableGenerator tableGenerator = ReflectHelper.getAnnotation(member, TableGenerator.class); final SequenceGenerator sequenceGenerator = ReflectHelper.getAnnotation(member, Sequ...
diff --git a/src/sg/edu/nus/ami/wifilocation/api/NUSGeoloc.java b/src/sg/edu/nus/ami/wifilocation/api/NUSGeoloc.java index 2fdb255..b36c093 100644 --- a/src/sg/edu/nus/ami/wifilocation/api/NUSGeoloc.java +++ b/src/sg/edu/nus/ami/wifilocation/api/NUSGeoloc.java @@ -1,88 +1,87 @@ package sg.edu.nus.ami.wifilocation.api;...
false
true
public Vector<APLocation> getLocationBasedOnAP(Vector<String> mac, Vector<Double> strength) { Vector<APLocation> apLocation = new Vector<APLocation>(); try { RestClient client = new RestClient(url); int n = mac.size(); client.AddParam("number", String.valueOf(n)); for (int i = 0; i < n; i++) { ...
public Vector<APLocation> getLocationBasedOnAP(Vector<String> mac, Vector<Double> strength) { Vector<APLocation> apLocation = new Vector<APLocation>(); try { RestClient client = new RestClient(url); int n = mac.size(); client.AddParam("number", String.valueOf(n)); for (int i = 0; i < n; i++) { ...
diff --git a/beam-visat-rcp/src/main/java/org/esa/beam/visat/toolviews/stat/ScatterPlotPanel.java b/beam-visat-rcp/src/main/java/org/esa/beam/visat/toolviews/stat/ScatterPlotPanel.java index a416d2f60..e6392a2f0 100644 --- a/beam-visat-rcp/src/main/java/org/esa/beam/visat/toolviews/stat/ScatterPlotPanel.java +++ b/beam...
false
true
private void computeScatterPlotImpl(boolean useROI) throws IOException { final RasterDataNode rasterX = getRaster(X_VAR); final RasterDataNode rasterY = getRaster(Y_VAR); if (rasterX == null || rasterY == null) { return; } final ROI roi = useROI ? rasterX.creat...
private void computeScatterPlotImpl(boolean useROI) throws IOException { final RasterDataNode rasterX = getRaster(X_VAR); final RasterDataNode rasterY = getRaster(Y_VAR); if (rasterX == null || rasterY == null) { return; } final ROI roi = useROI ? rasterX.creat...
diff --git a/frost-wot/source/frost/identities/Identity.java b/frost-wot/source/frost/identities/Identity.java index 902fa19f..79164f56 100644 --- a/frost-wot/source/frost/identities/Identity.java +++ b/frost-wot/source/frost/identities/Identity.java @@ -1,96 +1,105 @@ package frost.identities; import java.lang.*; ...
false
true
public Identity(String name, String keyaddress) throws IllegalArgumentException { this.name=name; this.keyaddress = keyaddress; try { con = new FcpConnection(frame1.frostSettings.getValue("nodeAddress"), frame1.frostSettings.getValue("nodeP...
public Identity(String name, String keyaddress) throws IllegalArgumentException { this.name=name; this.keyaddress = keyaddress; try { con = new FcpConnection(frame1.frostSettings.getValue("nodeAddress"), frame1.frostSettings.getValue("nodeP...
diff --git a/src/main/java/net/minecraftforge/client/MinecraftForgeClient.java b/src/main/java/net/minecraftforge/client/MinecraftForgeClient.java index 4a114ad4b..34bdb2ffc 100644 --- a/src/main/java/net/minecraftforge/client/MinecraftForgeClient.java +++ b/src/main/java/net/minecraftforge/client/MinecraftForgeClient....
true
true
public static IItemRenderer getItemRenderer(ItemStack item, ItemRenderType type) { IItemRenderer renderer = customItemRenderers.get(item); if (renderer != null && renderer.handleRenderType(item, type)) { return renderer; } return null; }
public static IItemRenderer getItemRenderer(ItemStack item, ItemRenderType type) { IItemRenderer renderer = customItemRenderers.get(item.getItem()); if (renderer != null && renderer.handleRenderType(item, type)) { return renderer; } return null; }
diff --git a/framework/src/play/Play.java b/framework/src/play/Play.java index 84b808ef..603a8075 100644 --- a/framework/src/play/Play.java +++ b/framework/src/play/Play.java @@ -1,564 +1,564 @@ package play; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStre...
true
true
public static void init(File root, String id) { // Simple things Play.id = id; Play.started = false; Play.applicationPath = root; initStaticStuff(); // Guess the framework path try { URL versionUrl = Play.class.getResource("/play/version"); ...
public static void init(File root, String id) { // Simple things Play.id = id; Play.started = false; Play.applicationPath = root; initStaticStuff(); // Guess the framework path try { URL versionUrl = Play.class.getResource("/play/version"); ...
diff --git a/src/com/utilis/game/obj/Screen.java b/src/com/utilis/game/obj/Screen.java index daf0a19..df940d3 100644 --- a/src/com/utilis/game/obj/Screen.java +++ b/src/com/utilis/game/obj/Screen.java @@ -1,156 +1,160 @@ package com.utilis.game.obj; /** * A class for storing and managing a two-dimensiona array of...
false
true
private void updateTiles(){ Tile[][] t = new Tile[numOfTilesX][numOfTilesY]; for(int x=0; x<numOfTilesX; x++){ for(int y=0; y<numOfTilesY; y++){ if(t[x][y] == null){ t[x][y] = new Tile(tileWidth, tileHeight, x*tileWidth, y*tileHeight); }else{ t[x][y] = tiles[x][y]; } } } ti...
private void updateTiles(){ Tile[][] t = new Tile[numOfTilesX][numOfTilesY]; for(int x=0; x<numOfTilesX; x++){ for(int y=0; y<numOfTilesY; y++){ if(x>tiles.length && y>tiles[0].length){ t[x][y] = new Tile(tileWidth, tileHeight, x*tileWidth, y*tileHeight); }else{ t[x][y] = tiles[x][y]; ...
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 3cf8788a..58837591 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/an...
true
true
public SuggestionsInfo onGetSuggestions(final TextInfo textInfo, final int suggestionsLimit) { final String text = textInfo.getText(); if (TextUtils.isEmpty(text)) return EMPTY_SUGGESTIONS_INFO; final SuggestionsGatherer suggestionsGatherer = ...
public SuggestionsInfo onGetSuggestions(final TextInfo textInfo, final int suggestionsLimit) { final String text = textInfo.getText(); if (TextUtils.isEmpty(text) || text.length() <= 1) return EMPTY_SUGGESTIONS_INFO; final SuggestionsGatherer suggestionsGath...
diff --git a/src/net/milkycraft/Config.java b/src/net/milkycraft/Config.java index 2f92dee..53d0286 100644 --- a/src/net/milkycraft/Config.java +++ b/src/net/milkycraft/Config.java @@ -1,281 +1,281 @@ package net.milkycraft; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import org...
true
true
public Config(Banlisting plugin) { // Set plugin to be used in other methods this.plugin = plugin; // Initialize config file from the base plugin. ConfigurationSection config = plugin.getConfig(); /** * These are your default values. For each key, there is an associated * object. Allows for the typica...
public Config(Banlisting plugin) { // Set plugin to be used in other methods this.plugin = plugin; // Initialize config file from the base plugin. ConfigurationSection config = plugin.getConfig(); /** * These are your default values. For each key, there is an associated * object. Allows for the typica...
diff --git a/org/postgresql/jdbc1/ResultSet.java b/org/postgresql/jdbc1/ResultSet.java index 467476f8..aae8cf6f 100644 --- a/org/postgresql/jdbc1/ResultSet.java +++ b/org/postgresql/jdbc1/ResultSet.java @@ -1,829 +1,829 @@ package org.postgresql.jdbc1; // IMPORTANT NOTE: This file implements the JDBC 1 version of t...
false
true
public Timestamp getTimestamp(int columnIndex) throws SQLException { String s = getString(columnIndex); if(s==null) return null; boolean subsecond; //if string contains a '.' we have fractional seconds if (s.indexOf('.') == -1) { subsecond = false; } else { subsecond = true; ...
public Timestamp getTimestamp(int columnIndex) throws SQLException { String s = getString(columnIndex); if(s==null) return null; boolean subsecond; //if string contains a '.' we have fractional seconds if (s.indexOf('.') == -1) { subsecond = false; } else { subsecond = true; ...
diff --git a/src/Stargate.java b/src/Stargate.java index c7af118..3f8d1fc 100644 --- a/src/Stargate.java +++ b/src/Stargate.java @@ -1,141 +1,141 @@ /** * Stargate.java - Plug-in for hey0's minecraft mod. * @author Shaun (sturmeh) * @author Dinnerbone */ public class Stargate extends SuperPlugin { public fi...
true
true
private void onButtonPressed(Player player, Portal gate) { Portal destination = gate.getDestination(); if (!gate.isOpen()) { if ((destination == null) || (destination == gate)) { if (!unselectMessage.isEmpty()) player.sendMessage(Colors.Red + unselectMessage); } else if (destination.isOpe...
private void onButtonPressed(Player player, Portal gate) { Portal destination = gate.getDestination(); if (!gate.isOpen()) { if ((destination == null) || (destination == gate)) { if (!unselectMessage.isEmpty()) player.sendMessage(Colors.Red + unselectMessage); } else if ((destination.isOp...
diff --git a/src/main/java/suite/Main.java b/src/main/java/suite/Main.java index 3f29adf04..d6c4d37b1 100644 --- a/src/main/java/suite/Main.java +++ b/src/main/java/suite/Main.java @@ -1,356 +1,356 @@ package suite; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import...
true
true
private boolean run(List<String> importFilenames) throws IOException { Builder builderL2 = null; RuleSet ruleSet = proverConfig.ruleSet(); Suite.importResource(ruleSet, "auto.sl"); for (String importFilename : importFilenames) Suite.importFile(ruleSet, importFilename); BufferedReader br = new BufferedRe...
private boolean run(List<String> importFilenames) throws IOException { Builder builderL2 = null; RuleSet ruleSet = proverConfig.ruleSet(); Suite.importResource(ruleSet, "auto.sl"); for (String importFilename : importFilenames) Suite.importFile(ruleSet, importFilename); BufferedReader br = new BufferedRe...
diff --git a/core/src/main/java/com/datasalt/pangool/tuplemr/MapOnlyJobBuilder.java b/core/src/main/java/com/datasalt/pangool/tuplemr/MapOnlyJobBuilder.java index 24f15d85..663bc884 100644 --- a/core/src/main/java/com/datasalt/pangool/tuplemr/MapOnlyJobBuilder.java +++ b/core/src/main/java/com/datasalt/pangool/tuplemr/...
true
true
public Job createJob() throws IOException, TupleMRException, URISyntaxException { Job job; if (jobName != null) { job = new Job(conf); } else { job = new Job(conf, jobName); } job.setNumReduceTasks(0); String uniqueName = UUID.randomUUID().toString() + '.' + "out-format.dat"; try { ...
public Job createJob() throws IOException, TupleMRException, URISyntaxException { Job job; if (jobName == null) { job = new Job(conf); } else { job = new Job(conf, jobName); } job.setNumReduceTasks(0); String uniqueName = UUID.randomUUID().toString() + '.' + "out-format.dat"; try { ...
diff --git a/easysoa-registry-v1/easysoa-registry-rest-server/src/main/java/org/easysoa/registry/context/rest/ContextController.java b/easysoa-registry-v1/easysoa-registry-rest-server/src/main/java/org/easysoa/registry/context/rest/ContextController.java index e9b20378..9b6f3ad5 100644 --- a/easysoa-registry-v1/easysoa...
false
true
public Template doGetHtml(@QueryParam("subprojectId") String subprojectId, @QueryParam("visibility") String visibility) throws Exception { CoreSession session = SessionFactory.getSession(request); Template view = getView("context"); // Get the projects DocumentModelList projectsList...
public Template doGetHtml(@QueryParam("subprojectId") String subprojectId, @QueryParam("visibility") String visibility) throws Exception { CoreSession session = SessionFactory.getSession(request); Template view = getView("context"); // Get the projects DocumentModelList projectsList...
diff --git a/src/com/twt/xtreme/AvailViewActivity.java b/src/com/twt/xtreme/AvailViewActivity.java index e744e81..161d6bc 100644 --- a/src/com/twt/xtreme/AvailViewActivity.java +++ b/src/com/twt/xtreme/AvailViewActivity.java @@ -1,102 +1,102 @@ package com.twt.xtreme; import android.app.Activity; import android.co...
true
true
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); loc = ( locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null ? locationManager.getLastK...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); loc = ( locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null ? locationManager.getLastK...
diff --git a/WeCharades/src/com/example/wecharades/model/DataController.java b/WeCharades/src/com/example/wecharades/model/DataController.java index d57f4b0..7e9d135 100644 --- a/WeCharades/src/com/example/wecharades/model/DataController.java +++ b/WeCharades/src/com/example/wecharades/model/DataController.java @@ -1,5...
false
true
private ArrayList<Game> parseUpdatedGameList(TreeMap<Game, ArrayList<Turn>> dbGames) { Game localGame; for(Map.Entry<Game, ArrayList<Turn>> gameMap : dbGames.entrySet()){ localGame = m.getGame(gameMap.getKey().getGameId()); if(localGame == null || m.getTurns(localGame) == null){ //If the local game does ...
private ArrayList<Game> parseUpdatedGameList(TreeMap<Game, ArrayList<Turn>> dbGames) { Game localGame; for(Map.Entry<Game, ArrayList<Turn>> gameMap : dbGames.entrySet()){ localGame = m.getGame(gameMap.getKey().getGameId()); if(localGame == null || m.getTurns(localGame) == null){ //If the local game does ...
diff --git a/src/main/java/huisken/projection/processing/Register_.java b/src/main/java/huisken/projection/processing/Register_.java index eb67602..3a18731 100644 --- a/src/main/java/huisken/projection/processing/Register_.java +++ b/src/main/java/huisken/projection/processing/Register_.java @@ -1,198 +1,198 @@ packag...
true
true
public void registerTimepoint(int tp) throws IOException { String basename = String.format("tp%04d", tp); File outputfile = new File(outputDirectory, basename + ".vertices"); File contributionsfile = new File(contributionsDirectory, basename + ".vertices"); System.out.println("reg: src = " + new File(dataDirec...
public void registerTimepoint(int tp) throws IOException { String basename = String.format("tp%04d", tp); File outputfile = new File(outputDirectory, basename + "_00.vertices"); File contributionsfile = new File(contributionsDirectory, basename + ".vertices"); System.out.println("reg: src = " + new File(dataDi...
diff --git a/src/tux2/MonsterBox/MonsterBoxPlayerListener.java b/src/tux2/MonsterBox/MonsterBoxPlayerListener.java index e2fac9d..e30dfe5 100644 --- a/src/tux2/MonsterBox/MonsterBoxPlayerListener.java +++ b/src/tux2/MonsterBox/MonsterBoxPlayerListener.java @@ -1,102 +1,100 @@ package tux2.MonsterBox; import org.buk...
true
true
public void onPlayerInteract(PlayerInteractEvent event) { if(!event.isCancelled()) { ItemStack is = event.getPlayer().getItemInHand(); Player player = event.getPlayer(); if(is.getTypeId() == 383 && event.getClickedBlock() != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().g...
public void onPlayerInteract(PlayerInteractEvent event) { if(!event.isCancelled()) { ItemStack is = event.getPlayer().getItemInHand(); Player player = event.getPlayer(); if(is.getTypeId() == 383 && event.getClickedBlock() != null && event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock().g...
diff --git a/source/com/mucommander/ui/action/OpenInBothPanelsAction.java b/source/com/mucommander/ui/action/OpenInBothPanelsAction.java index 33acf460..3f5a0b5b 100644 --- a/source/com/mucommander/ui/action/OpenInBothPanelsAction.java +++ b/source/com/mucommander/ui/action/OpenInBothPanelsAction.java @@ -1,110 +1,110 ...
true
true
public void performAction() { Thread openThread; AbstractFile file; AbstractFile otherFile; // Retrieves the current selection, aborts if none. if((file = mainFrame.getActiveTable().getSelectedFile(true)) == null || !file.isBrowsable()) return; try...
public void performAction() { Thread openThread; AbstractFile file; AbstractFile otherFile; // Retrieves the current selection, aborts if none. if((file = mainFrame.getActiveTable().getSelectedFile(true)) == null || !file.isBrowsable()) return; try...
diff --git a/Event.java b/Event.java index 95a8fe2..a36084b 100644 --- a/Event.java +++ b/Event.java @@ -1,214 +1,214 @@ /* * Event.java * Author: Nick Grauel * Group: Nick Grauel, Tyler Janowski, Nick DeRossi * LAST UPDATED 12/1 * This class represents a generic event. It is the basis for the ActivityEvent...
false
true
public Event(String n, int d, GregorianCalendar s, GregorianCalendar e, Providers provs, String serv, String loc) { location = loc; service = serv; hasProvider = false; name = n; dayOfTour = d; startTime = s; endTime = e; availableProviders = new Provi...
public Event(String n, int d, GregorianCalendar s, GregorianCalendar e, Providers provs, String serv, String loc) { location = loc; service = serv; hasProvider = false; name = n; dayOfTour = d; startTime = s; endTime = e; availableProviders = new Provi...
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 ee27e5131..2c61413a1 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; if(ajaxBehavior.isDisabled()) { return null; } FacesContext context = behaviorContext.getFacesContext(); UICompo...
public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) { AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior; if(ajaxBehavior.isDisabled()) { return null; } FacesContext context = behaviorContext.getFacesContext(); UICompo...
diff --git a/Distnct_SubSequences/Solution.java b/Distnct_SubSequences/Solution.java index 0feb474..4b31f73 100644 --- a/Distnct_SubSequences/Solution.java +++ b/Distnct_SubSequences/Solution.java @@ -1,35 +1,35 @@ public class Solution { public int numDistinct(String S, String T) { if(S == null || T == ...
false
true
public int numDistinct(String S, String T) { if(S == null || T == null || S.isEmpty() || T.isEmpty()) return 0; int m = S.length(); int n = T.length(); int[] prev = new int[m+1]; int[] next = new int[m+1]; prev[0] = 1; for(int i = 1; i<= n; ++i){ ...
public int numDistinct(String S, String T) { if(S == null || T == null || S.isEmpty() || T.isEmpty()) return 0; int m = S.length(); int n = T.length(); int[] prev = new int[m+1]; int[] next = new int[m+1]; int[] sumPrev= new int[m+1]; prev[0] = 1; ...
diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java b/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java index 8fb655d30..e84fcddf1 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/filters/VariantFiltrationWalker.java +++ b/java/sr...
true
true
private void filter() { // get the current context Pair<RefMetaDataTracker, RodVCF> context = variantContextWindow.getContext(); if ( context == null ) return; StringBuilder filterString = new StringBuilder(); // test for SNP mask, if present RODRecordLi...
private void filter() { // get the current context Pair<RefMetaDataTracker, RodVCF> context = variantContextWindow.getContext(); if ( context == null ) return; StringBuilder filterString = new StringBuilder(); // test for SNP mask, if present RODRecordLi...
diff --git a/src/org/protege/editor/owl/ui/library/EditActiveOntologyLibraryAction.java b/src/org/protege/editor/owl/ui/library/EditActiveOntologyLibraryAction.java index 6bfbb044..0ea01bb2 100644 --- a/src/org/protege/editor/owl/ui/library/EditActiveOntologyLibraryAction.java +++ b/src/org/protege/editor/owl/ui/librar...
true
true
public void actionPerformed(ActionEvent e) { try { OntologyCatalogManager catalogManager = getOWLModelManager().getOntologyCatalogManager(); XMLCatalog activeCatalog = catalogManager.getActiveCatalog(); if (activeCatalog == null) { return; } File catalo...
public void actionPerformed(ActionEvent e) { try { OntologyCatalogManager catalogManager = getOWLModelManager().getOntologyCatalogManager(); XMLCatalog activeCatalog = catalogManager.getActiveCatalog(); if (activeCatalog == null) { return; } File catalo...
diff --git a/src/biz/bokhorst/xprivacy/XIoBridge.java b/src/biz/bokhorst/xprivacy/XIoBridge.java index 7ec787ec..ea03ff76 100644 --- a/src/biz/bokhorst/xprivacy/XIoBridge.java +++ b/src/biz/bokhorst/xprivacy/XIoBridge.java @@ -1,31 +1,31 @@ package biz.bokhorst.xprivacy; import java.io.FileNotFoundException; imp...
true
true
protected void before(MethodHookParam param) throws Throwable { String fileName = (String) param.args[0]; if (fileName != null && fileName.startsWith(mFileName)) if (isRestricted(null)) param.setResult(new FileNotFoundException()); }
protected void before(MethodHookParam param) throws Throwable { String fileName = (String) param.args[0]; if (fileName != null && fileName.startsWith(mFileName)) if (isRestricted(param)) param.setResult(new FileNotFoundException()); }
diff --git a/intro/assignment_1/Ex5.java b/intro/assignment_1/Ex5.java index 560a8b0..5286883 100755 --- a/intro/assignment_1/Ex5.java +++ b/intro/assignment_1/Ex5.java @@ -1,23 +1,23 @@ import java.util.Scanner; public class Ex5 { public static void main(String[] args) { Scanner scan = new Scanner(Sy...
true
true
public static void main(String[] args) { Scanner scan = new Scanner(System.in); int input = scan.nextInt(); // Dismantles the current integer given as input to its primes, and prints them. for (int i=2; i<input; i++) { while(input%i == 0) { System.out.pr...
public static void main(String[] args) { Scanner scan = new Scanner(System.in); int input = scan.nextInt(); // Dismantles the current integer given as input to its primes, and prints them. for (int i=2; i<input; i++) { while(input%i == 0) { System.out.pr...
diff --git a/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CopyAction.java b/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CopyAction.java index 8f4a12fa5..ba6afa2d7 100644 --- a/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions...
true
true
public void run() { Connection[] connections = getSelectedConnections(); ConnectionFolder[] connectionFolders = getSelectedConnectionFolders(); List<Object> objects = new ArrayList<Object>(); objects.addAll( Arrays.asList( connections ) ); objects.addAll( Arrays.asList( c...
public void run() { Connection[] connections = getSelectedConnections(); ConnectionFolder[] connectionFolders = getSelectedConnectionFolders(); List<Object> objects = new ArrayList<Object>(); objects.addAll( Arrays.asList( connections ) ); objects.addAll( Arrays.asList( c...
diff --git a/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java b/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java index 6041e6d99..e83cfb377 100644 --- a/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java +++ b/pmd/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java @@ -1,1359 ...
false
true
public void testAllPMDBuiltInRulesMeetConventions() throws IOException, RuleSetNotFoundException, ParserConfigurationException, SAXException { int invalidSinceAttributes = 0; int invalidExternalInfoURL = 0; int invalidClassName = 0; int invalidRegexSuppress = 0; int invalidXPathSuppress = 0; String m...
public void testAllPMDBuiltInRulesMeetConventions() throws IOException, RuleSetNotFoundException, ParserConfigurationException, SAXException { int invalidSinceAttributes = 0; int invalidExternalInfoURL = 0; int invalidClassName = 0; int invalidRegexSuppress = 0; int invalidXPathSuppress = 0; String m...
diff --git a/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisDispatcher.java b/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisDispatcher.java index 0bf7a9b46..fb8146a47 100644 --- a/axis2/src/main/java/org/apache/ode/axis2/hooks/ODEAxisDispatcher.java +++ b/axis2/src/main/java/org/apache/ode/axis2/hooks/OD...
false
true
public AxisOperation findOperation(AxisService service, MessageContext messageContext) throws AxisFault { AxisOperation operation; // Start with the wsaAction. We assume wsaAction is the more reliable // way to identify the operation. String action = messageContext.getWS...
public AxisOperation findOperation(AxisService service, MessageContext messageContext) throws AxisFault { AxisOperation operation; // Start with the wsaAction. We assume wsaAction is the more reliable // way to identify the operation. String action = messageContext.getWS...
diff --git a/selenium/src/java/org/openqa/selenium/internal/seleniumemulation/FunctionDeclaration.java b/selenium/src/java/org/openqa/selenium/internal/seleniumemulation/FunctionDeclaration.java index 73e0aa168..a71233833 100644 --- a/selenium/src/java/org/openqa/selenium/internal/seleniumemulation/FunctionDeclaration....
true
true
public FunctionDeclaration(String raw, String result) { String base = raw.replace(".", "\\s*\\.\\s*"); pattern = Pattern.compile(".*" + base + "\\s*\\(\\s*\\).*"); function = raw + " = function() { " + result + " }"; }
public FunctionDeclaration(String raw, String result) { String base = raw.replace(".", "\\s*\\.\\s*"); pattern = Pattern.compile(".*" + base + "\\s*\\(\\s*\\).*"); function = raw + " = function() { " + result + " }; "; }
diff --git a/src/uk/me/graphe/shared/Edge.java b/src/uk/me/graphe/shared/Edge.java index 279d451..659b93c 100644 --- a/src/uk/me/graphe/shared/Edge.java +++ b/src/uk/me/graphe/shared/Edge.java @@ -1,121 +1,121 @@ package uk.me.graphe.shared; public class Edge { private Vertex mVertex1; private Vertex mVer...
true
true
public boolean equals(Object o) { if (o instanceof Edge) { Edge cmp = (Edge) o; return cmp.mVertex1.equals(mVertex1) && cmp.mVertex2.equals(mVertex2) && cmp.mDir == mDir; } else return false; }
public boolean equals(Object o) { if (o instanceof Edge) { Edge cmp = (Edge) o; return cmp.mVertex1.equals(mVertex1) && cmp.mVertex2.equals(mVertex2); } else return false; }
diff --git a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/messaging/AddressingDetails.java b/gui/src/main/java/org/jboss/as/console/client/shared/subsys/messaging/AddressingDetails.java index 510e356e..8314c2c4 100644 --- a/gui/src/main/java/org/jboss/as/console/client/shared/subsys/messaging/AddressingD...
false
true
Widget asWidget() { addrTable = new DefaultCellTable<AddressingPattern>(8, new ProvidesKey<AddressingPattern>() { @Override public Object getKey(AddressingPattern item) { return item.getPattern(); } }); addrProvider = new ListDataProvider<...
Widget asWidget() { addrTable = new DefaultCellTable<AddressingPattern>(8, new ProvidesKey<AddressingPattern>() { @Override public Object getKey(AddressingPattern item) { return item.getPattern(); } }); addrProvider = new ListDataProvider<...
diff --git a/src/niagara/client/TracingConnectionReader.java b/src/niagara/client/TracingConnectionReader.java index c165bd2..2be54f9 100755 --- a/src/niagara/client/TracingConnectionReader.java +++ b/src/niagara/client/TracingConnectionReader.java @@ -1,130 +1,130 @@ package niagara.client; import gnu.regexp.RE; ...
true
true
public void run() { try { if (writer != null) { // put the data to a file char[] buf = new char[4096]; int start; int count = 0; boolean stop = false; while (!stop) { start = 0; ...
public void run() { try { if (writer != null) { // put the data to a file char[] buf = new char[4096]; int start; int count = 0; boolean stop = false; while (!stop) { start = 0; ...
diff --git a/src/main/java/de/cismet/tools/gui/javakit/JavaKitTest.java b/src/main/java/de/cismet/tools/gui/javakit/JavaKitTest.java index e91f053..bdba11b 100644 --- a/src/main/java/de/cismet/tools/gui/javakit/JavaKitTest.java +++ b/src/main/java/de/cismet/tools/gui/javakit/JavaKitTest.java @@ -1,85 +1,85 @@ package ...
false
true
public static void main(String[] args) { if (args.length != 1) { System.err.println("need filename argument"); System.exit(1); } try { JEditorPane editor = new JEditorPane(); JavaEditorKit kit = new JavaEditorKit(); editor.setEditorKitForContentType("text/java", kit); editor.setCont...
public static void main(String[] args) { if (args.length != 1) { System.err.println("need filename argument"); //NOI18N System.exit(1); } try { JEditorPane editor = new JEditorPane(); JavaEditorKit kit = new JavaEditorKit(); editor.setEditorKitForContentType("text/java", kit); //NOI18N...
diff --git a/nuxeo-platform-webapp-base/src/main/java/org/nuxeo/ecm/webapp/search/DocumentSearchActions.java b/nuxeo-platform-webapp-base/src/main/java/org/nuxeo/ecm/webapp/search/DocumentSearchActions.java index 7ff4911f..4ddbb496 100644 --- a/nuxeo-platform-webapp-base/src/main/java/org/nuxeo/ecm/webapp/search/Docume...
false
true
public void validateSimpleSearchKeywords(FacesContext context, UIComponent component, Object value) { if (!(value instanceof String) || StringUtils.isEmpty(((String) value).trim())) { FacesMessage message = new FacesMessage( FacesMessage.SEVERITY_E...
public void validateSimpleSearchKeywords(FacesContext context, UIComponent component, Object value) { if (!(value instanceof String) || StringUtils.isEmpty(((String) value).trim())) { FacesMessage message = new FacesMessage( FacesMessage.SEVERITY_E...
diff --git a/spring-integration-jmx/src/main/java/org/springframework/integration/monitor/SimpleMessageSourceMonitor.java b/spring-integration-jmx/src/main/java/org/springframework/integration/monitor/SimpleMessageSourceMonitor.java index c54508eda1..863b00caba 100644 --- a/spring-integration-jmx/src/main/java/org/spri...
false
true
public Object invoke(MethodInvocation invocation) throws Throwable { String method = invocation.getMethod().getName(); if ("receive".equals(method)) { messageCount.incrementAndGet(); } return invocation.proceed(); }
public Object invoke(MethodInvocation invocation) throws Throwable { String method = invocation.getMethod().getName(); Object result = invocation.proceed(); if ("receive".equals(method) && result!=null) { messageCount.incrementAndGet(); } return result; }
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 4da0668a..1bc0f772 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -1,595 +1,595 @@ /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache ...
true
true
void hideNavScreen(int position, boolean animate) { if (!showingNavScreen()) return; final Tab tab = mUiController.getTabControl().getTab(position); if ((tab == null) || !animate) { if (tab != null) { setActiveTab(tab); } else if (mTabControl.getTabCou...
void hideNavScreen(int position, boolean animate) { if (!showingNavScreen()) return; final Tab tab = mUiController.getTabControl().getTab(position); if ((tab == null) || !animate) { if (tab != null) { setActiveTab(tab); } else if (mTabControl.getTabCou...
diff --git a/src/java/org/jivesoftware/spark/ui/status/StatusBar.java b/src/java/org/jivesoftware/spark/ui/status/StatusBar.java index 743fb268..a3d3e72c 100644 --- a/src/java/org/jivesoftware/spark/ui/status/StatusBar.java +++ b/src/java/org/jivesoftware/spark/ui/status/StatusBar.java @@ -1,651 +1,649 @@ /** * $RCS...
false
true
public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List<CustomStatusItem> custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList<CustomStatusItem>(); } // Sort Custom Messages Collections.sort( ...
public void showPopup(MouseEvent e) { final JPopupMenu popup = new JPopupMenu(); List<CustomStatusItem> custom = CustomMessages.load(); if (custom == null) { custom = new ArrayList<CustomStatusItem>(); } // Sort Custom Messages Collections.sort( ...
diff --git a/src/org/eclipse/core/internal/resources/Container.java b/src/org/eclipse/core/internal/resources/Container.java index 07063b5c..5e73fd68 100644 --- a/src/org/eclipse/core/internal/resources/Container.java +++ b/src/org/eclipse/core/internal/resources/Container.java @@ -1,238 +1,236 @@ /*******************...
false
true
public IResource[] members(int memberFlags) throws CoreException { final boolean phantom = (memberFlags & INCLUDE_PHANTOMS) != 0; ResourceInfo info = getResourceInfo(phantom, false); checkExists(getFlags(info), true); IResource[] allMembers = getChildren(this, phantom); if ((memberFlags & INCLUDE_TEAM_PRIVATE_MEMB...
public IResource[] members(int memberFlags) throws CoreException { final boolean phantom = (memberFlags & INCLUDE_PHANTOMS) != 0; ResourceInfo info = getResourceInfo(phantom, false); checkExists(getFlags(info), true); IResource[] allMembers = getChildren(this, phantom); if ((memberFlags & INCLUDE_TEAM_PRIVATE_MEMB...
diff --git a/src/main/java/org/odlabs/wiquery/ui/selectable/SelectableAjaxBehavior.java b/src/main/java/org/odlabs/wiquery/ui/selectable/SelectableAjaxBehavior.java index eda8e4da..5b09a0c4 100644 --- a/src/main/java/org/odlabs/wiquery/ui/selectable/SelectableAjaxBehavior.java +++ b/src/main/java/org/odlabs/wiquery/ui/...
true
true
public JsStatement statement() { selectableBehavior.setInnerStopEvent(new JsScopeUiEvent() { private static final long serialVersionUID = 1L; /** * {@inheritDoc} * @see org.odlabs.wiquery.core.javascript.JsScope#execute(org.odlabs.wiquery.core.javascript.JsScopeContext) */ @Override ...
public JsStatement statement() { selectableBehavior.setInnerStopEvent(new JsScopeUiEvent() { private static final long serialVersionUID = 1L; /** * {@inheritDoc} * @see org.odlabs.wiquery.core.javascript.JsScope#execute(org.odlabs.wiquery.core.javascript.JsScopeContext) */ @Override ...
diff --git a/software/cagwas/src/gov/nih/nci/cagwas/web/action/LoginAction.java b/software/cagwas/src/gov/nih/nci/cagwas/web/action/LoginAction.java index b61de9e..9d9bb8c 100644 --- a/software/cagwas/src/gov/nih/nci/cagwas/web/action/LoginAction.java +++ b/software/cagwas/src/gov/nih/nci/cagwas/web/action/LoginAction....
false
true
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages errors = new ActionMessages(); ActionForward forward = null; // Figure out the state of the form LoginForm lForm = (LoginForm)form; String use...
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages errors = new ActionMessages(); ActionForward forward = null; // Figure out the state of the form LoginForm lForm = (LoginForm)form; String use...
diff --git a/src/org/jimhopp/GPSvsNetwork/provider/LocationsContentProvider.java b/src/org/jimhopp/GPSvsNetwork/provider/LocationsContentProvider.java index 0f3bc31..003dc97 100644 --- a/src/org/jimhopp/GPSvsNetwork/provider/LocationsContentProvider.java +++ b/src/org/jimhopp/GPSvsNetwork/provider/LocationsContentProvi...
false
true
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { String orderBy; if (TextUtils.isEmpty(sortOrder)) { orderBy = BaseColumns._ID + " ASC"; } else { orderBy = sortOrder; } int match = sURI...
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { String orderBy; if (TextUtils.isEmpty(sortOrder)) { orderBy = BaseColumns._ID + " ASC"; } else { orderBy = sortOrder; } int match = sURI...
diff --git a/luni/src/main/java/java/text/SimpleDateFormat.java b/luni/src/main/java/java/text/SimpleDateFormat.java index 46ecc1af3..19855b5d0 100644 --- a/luni/src/main/java/java/text/SimpleDateFormat.java +++ b/luni/src/main/java/java/text/SimpleDateFormat.java @@ -1,1302 +1,1302 @@ /* * Licensed to the Apache So...
true
true
private void append(StringBuffer buffer, FieldPosition position, List<FieldPosition> fields, char format, int count) { int field = -1; int index = PATTERN_CHARS.indexOf(format); if (index == -1) { throw new IllegalArgumentException("Unknown pattern character '" + form...
private void append(StringBuffer buffer, FieldPosition position, List<FieldPosition> fields, char format, int count) { int field = -1; int index = PATTERN_CHARS.indexOf(format); if (index == -1) { throw new IllegalArgumentException("Unknown pattern character '" + form...
diff --git a/HttpRequest.java b/HttpRequest.java index 914f2c3..f6f826d 100644 --- a/HttpRequest.java +++ b/HttpRequest.java @@ -1,286 +1,286 @@ import java.io.* ; import java.net.* ; import java.util.* ; import com.google.gson.*; final class HttpRequest implements Runnable { Socket socket; Map<String...
true
true
private void processRequest() { try { // Get a reference to the socket's input stream. is = new DataInputStream(socket.getInputStream()); br = new BufferedReader(new InputStreamReader(is, "UTF8")); // Process the request try { String headerLine; S...
private void processRequest() { try { // Get a reference to the socket's input stream. is = new DataInputStream(socket.getInputStream()); br = new BufferedReader(new InputStreamReader(is, "UTF8")); // Process the request try { String headerLine; S...
diff --git a/trunk/Bicing/src/IA/Bicing/BicingGenerator.java b/trunk/Bicing/src/IA/Bicing/BicingGenerator.java index 32b70e0..0d13754 100644 --- a/trunk/Bicing/src/IA/Bicing/BicingGenerator.java +++ b/trunk/Bicing/src/IA/Bicing/BicingGenerator.java @@ -1,286 +1,291 @@ package IA.Bicing; import java.util.Random; ...
false
true
private void generaProximaDemanda() { int numMB = (numBicicletas / numEstaciones); double var[] = new double[2]; int nBvar[]=new int[2]; int sign = 0; if (modoDem == EQUILIBRIUM) { var[0] = VAR_DEMAND_EQ; var[1] = 1- VAR_DEMAND_EQ; } else { ...
private void generaProximaDemanda() { int numMB = (int)(numBicicletas / numEstaciones); double var[] = new double[2]; int nBvar[]=new int[2]; int sign = 0; int r; if (modoDem == EQUILIBRIUM) { var[0] = VAR_DEMAND_EQ; var[1] = 1- VAR_DEMAND_EQ;...
diff --git a/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java b/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService.java index 1bbfc294f..0e8846324 100644 --- a/tests/webcrawler/src/test/java/org/apache/manifoldcf/webcrawler_tests/MockWebService....
false
true
public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { try { String resourceName = null; String site = req.getParameter("site"); // Site ID if (site == null) throw new IOException("Site ID parameter must be set"); String ...
public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { try { String resourceName = null; String site = req.getParameter("site"); // Site ID if (site == null) throw new IOException("Site ID parameter must be set"); String ...
diff --git a/SeriesGuide/src/com/battlelancer/seriesguide/ui/BaseNavDrawerActivity.java b/SeriesGuide/src/com/battlelancer/seriesguide/ui/BaseNavDrawerActivity.java index 139e10230..9ce6f66fb 100644 --- a/SeriesGuide/src/com/battlelancer/seriesguide/ui/BaseNavDrawerActivity.java +++ b/SeriesGuide/src/com/battlelancer/s...
true
true
private void setupNavDrawer() { mMenuDrawer = getAttachedMenuDrawer(); mMenuDrawer.setTouchMode(MenuDrawer.TOUCH_MODE_BEZEL); // setting size in pixels, oh come on... int menuSize = (int) getResources().getDimension(R.dimen.slidingmenu_width); mMenuDrawer.setMenuSize(menuSiz...
private void setupNavDrawer() { mMenuDrawer = getAttachedMenuDrawer(); mMenuDrawer.setTouchMode(MenuDrawer.TOUCH_MODE_BEZEL); // setting size in pixels, oh come on... int menuSize = (int) getResources().getDimension(R.dimen.slidingmenu_width); mMenuDrawer.setMenuSize(menuSiz...
diff --git a/src/com/android/settings/SoundSettings.java b/src/com/android/settings/SoundSettings.java index 5ba03d4a9..3c1a3ce8f 100644 --- a/src/com/android/settings/SoundSettings.java +++ b/src/com/android/settings/SoundSettings.java @@ -1,690 +1,690 @@ /* * Copyright (C) 2007 The Android Open Source Project * ...
true
true
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ContentResolver resolver = getContentResolver(); int activePhoneType = TelephonyManager.getDefault().getCurrentPhoneType(); mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); ...
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ContentResolver resolver = getContentResolver(); int activePhoneType = TelephonyManager.getDefault().getCurrentPhoneType(); mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); ...
diff --git a/contrib/j2ee/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/j2ee/EntityBeanEjbHomeCheck.java b/contrib/j2ee/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/j2ee/EntityBeanEjbHomeCheck.java index 1cd9b524..546b0953 100644 --- a/contrib/j2ee/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/...
true
true
public void visitToken(DetailAST aAST) { final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT); final String name = nameAST.getText(); if (name.startsWith("ejbHome") && Utils.implementsEntityBean(aAST)) { checkMethod(aAST); if (Utils....
public void visitToken(DetailAST aAST) { final DetailAST nameAST = aAST.findFirstToken(TokenTypes.IDENT); final String name = nameAST.getText(); if (name.startsWith("ejbHome") && Utils.implementsEntityBean(aAST)) { checkMethod(aAST); if (Utils....
diff --git a/src/com/barroncraft/sce/ExtensionsCommand.java b/src/com/barroncraft/sce/ExtensionsCommand.java index 95949ad..0b7a5c9 100644 --- a/src/com/barroncraft/sce/ExtensionsCommand.java +++ b/src/com/barroncraft/sce/ExtensionsCommand.java @@ -1,162 +1,162 @@ package com.barroncraft.sce; import java.util.Array...
false
true
public void CommandSurrender(Player player) { String playerName = player.getName(); Clan currentClan = plugin.clanManager.getCreateClanPlayer(playerName).getClan(); if (currentClan == null) { player.sendMessage(ChatColor.RED + "You can't surrender until you join a team"); return; } if (!surre...
public void CommandSurrender(Player player) { String playerName = player.getName(); Clan currentClan = plugin.clanManager.getCreateClanPlayer(playerName).getClan(); if (currentClan == null) { player.sendMessage(ChatColor.RED + "You can't surrender until you join a team"); return; } if (!surre...
diff --git a/src/main/java/fr/xebia/confluence2wordpress/core/converter/visitors/NewCodeMacroProcessor.java b/src/main/java/fr/xebia/confluence2wordpress/core/converter/visitors/NewCodeMacroProcessor.java index bbe82a0..5eb4baa 100644 --- a/src/main/java/fr/xebia/confluence2wordpress/core/converter/visitors/NewCodeMacr...
false
true
public boolean visit(TagNode parentNode, HtmlNode htmlNode) { if (htmlNode instanceof TagNode) { TagNode divCodePanel = (TagNode) htmlNode; String tagName = divCodePanel.getName(); if ("div".equals(tagName) && divCodePanel.getAttributeByName("class").contains("code panel"...
public boolean visit(TagNode parentNode, HtmlNode htmlNode) { if (htmlNode instanceof TagNode) { TagNode divCodePanel = (TagNode) htmlNode; String tagName = divCodePanel.getName(); if ("div".equals(tagName) && divCodePanel.getAttributeByName("class") != null && divCodePan...
diff --git a/aura-impl/src/test/java/org/auraframework/impl/root/DependencyDefImplTest.java b/aura-impl/src/test/java/org/auraframework/impl/root/DependencyDefImplTest.java index ad5375e694..4e8acd7565 100644 --- a/aura-impl/src/test/java/org/auraframework/impl/root/DependencyDefImplTest.java +++ b/aura-impl/src/test/j...
false
true
public void testAppendDependencies() throws Exception { DependencyDef testDependencyDef; Set<DefDescriptor<?>> deps = new HashSet<DefDescriptor<?>>(); // Check for a couple dependencies present in a namespace testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescri...
public void testAppendDependencies() throws Exception { DependencyDef testDependencyDef; Set<DefDescriptor<?>> deps = new HashSet<DefDescriptor<?>>(); // Check for a couple dependencies present in a namespace testDependencyDef = vendor.makeDependencyDef(vendor.makeComponentDefDescri...
diff --git a/src/java/soc/util/SOCStringManager.java b/src/java/soc/util/SOCStringManager.java index 5be03f6f..441d453b 100644 --- a/src/java/soc/util/SOCStringManager.java +++ b/src/java/soc/util/SOCStringManager.java @@ -1,427 +1,427 @@ /** * Java Settlers - An online multiplayer version of the game Settlers of Ca...
true
true
public String getSpecial(final SOCGame game, final String key, Object ... arguments) throws MissingResourceException, IllegalArgumentException { String txtfmt = bundle.getString(key); /** Clone of arguments, with specials replaced with their localized strings */ Object[] argsLoc...
public String getSpecial(final SOCGame game, final String key, Object ... arguments) throws MissingResourceException, IllegalArgumentException { String txtfmt = bundle.getString(key); /** Clone of arguments, with specials replaced with their localized strings */ Object[] argsLoc...
diff --git a/frontend/grisu-client/src/main/java/org/vpac/grisu/frontend/view/swing/GrisuTemplateApp.java b/frontend/grisu-client/src/main/java/org/vpac/grisu/frontend/view/swing/GrisuTemplateApp.java index 027eff0a..dbf7a9c8 100644 --- a/frontend/grisu-client/src/main/java/org/vpac/grisu/frontend/view/swing/GrisuTempl...
true
true
public JobCreationPanel[] getJobCreationPanels() { if (getServiceInterface() == null) { return new JobCreationPanel[] {}; } List<JobCreationPanel> panels = new LinkedList<JobCreationPanel>(); String fixedPanels = System.getProperty("grisu.createJobPanels"); if (StringUtils.isNotBlank(fixedPanels)) { ...
public JobCreationPanel[] getJobCreationPanels() { if (getServiceInterface() == null) { return new JobCreationPanel[] {}; } List<JobCreationPanel> panels = new LinkedList<JobCreationPanel>(); String fixedPanels = System.getProperty("grisu.createJobPanels"); if (StringUtils.isNotBlank(fixedPanels)) { ...
diff --git a/src/org/newdawn/slick/opengl/PNGImageData.java b/src/org/newdawn/slick/opengl/PNGImageData.java index 983db02..1ec7e41 100644 --- a/src/org/newdawn/slick/opengl/PNGImageData.java +++ b/src/org/newdawn/slick/opengl/PNGImageData.java @@ -1,787 +1,787 @@ package org.newdawn.slick.opengl; import java.io.EO...
false
true
public ByteBuffer loadImage(InputStream fis, boolean flipped, boolean forceAlpha, int[] transparent) throws IOException { if (transparent != null) { forceAlpha = true; } init(fis); if (!isRGB()) { throw new IOException("Only RGB formatted images are supported by the PNGLoader"); } texWidth =...
public ByteBuffer loadImage(InputStream fis, boolean flipped, boolean forceAlpha, int[] transparent) throws IOException { if (transparent != null) { forceAlpha = true; } init(fis); if (!isRGB()) { throw new IOException("Only RGB formatted images are supported by the PNGLoader"); } texWidth =...
diff --git a/sirocco-rest-cimi-apis/src/main/java/org/ow2/sirocco/apis/rest/cimi/converter/CredentialsConverter.java b/sirocco-rest-cimi-apis/src/main/java/org/ow2/sirocco/apis/rest/cimi/converter/CredentialsConverter.java index be8ce03..e1c5b34 100644 --- a/sirocco-rest-cimi-apis/src/main/java/org/ow2/sirocco/apis/res...
false
true
protected void doCopyToCimi(final CimiContext context, final Credentials dataService, final CimiCredentials dataCimi) { this.fill(context, dataService, dataCimi); if (true == context.mustBeExpanded(dataCimi)) { dataCimi.setUserName(dataService.getUserName()); // Next write on...
protected void doCopyToCimi(final CimiContext context, final Credentials dataService, final CimiCredentials dataCimi) { this.fill(context, dataService, dataCimi); if (true == context.mustBeExpanded(dataCimi)) { dataCimi.setUserName(dataService.getUserName()); dataCimi.setKey(...
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsUpdater.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsUpdater.java index dfac8814c..ca02bd98f 100644 --- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsUpdater.java +++ b/org.ecl...
true
true
private void saveVMDefinitions(final VMDefinitionsContainer container) { IRunnableWithProgress runnable = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { monitor.beginTask(JREMessages.getString("JREsUpdater.0"), 100); ...
private void saveVMDefinitions(final VMDefinitionsContainer container) { IRunnableWithProgress runnable = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { monitor.beginTask(JREMessages.getString("JREsUpdater.0"), 100); ...
diff --git a/src/ch/rollis/emma/response/Response.java b/src/ch/rollis/emma/response/Response.java index 4748b43..add4cef 100644 --- a/src/ch/rollis/emma/response/Response.java +++ b/src/ch/rollis/emma/response/Response.java @@ -1,299 +1,299 @@ package ch.rollis.emma.response; import java.io.BufferedOutputStream; ...
true
true
public void send(OutputStream output) throws IOException { BufferedOutputStream out = new BufferedOutputStream(output); if (getContentLength() == null) { setContentLength(String.valueOf(entityBody.length)); } if (!"HTTP/0.9".equals(getProtocol())) { sendStat...
public void send(OutputStream output) throws IOException { BufferedOutputStream out = new BufferedOutputStream(output); if (getContentLength() == null) { setContentLength(String.valueOf(entityBody.length)); } if (!"HTTP/0.9".equals(getProtocol())) { sendStat...
diff --git a/maxpowa/tukmc/GuiNewChat.java b/maxpowa/tukmc/GuiNewChat.java index a150ec6..b8362a7 100644 --- a/maxpowa/tukmc/GuiNewChat.java +++ b/maxpowa/tukmc/GuiNewChat.java @@ -1,259 +1,259 @@ package maxpowa.tukmc; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import ja...
true
true
public void drawChat(int updatePass) { GL11.glPushMatrix(); adorn = Config.get(Config.NODE_BOTTOM_ADORNMENTS); if (mc.gameSettings.chatVisibility != 2) { int maxView = this.func_96127_i(); boolean chatOpen = false; float chatBoxColor = mc.gameSettings.cha...
public void drawChat(int updatePass) { GL11.glPushMatrix(); adorn = Config.get(Config.NODE_BOTTOM_ADORNMENTS); if (mc.gameSettings.chatVisibility != 2) { int maxView = this.func_96127_i(); boolean chatOpen = false; float chatBoxColor = mc.gameSettings.cha...
diff --git a/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java b/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java index 07502c8d3..7a165f439 100644 --- a/src/java/org/apache/cassandra/exceptions/PreparedQueryNotFoundException.java +++ b/src/java/org/apache/cassandr...
false
true
private static String makeMsg(MD5Digest id) { return String.format("Prepared query with ID %d not found" + " (either the query was not prepared on this host (maybe the host has been restarted?)" + " or you have prepared more than %d queries and q...
private static String makeMsg(MD5Digest id) { return String.format("Prepared query with ID %s not found" + " (either the query was not prepared on this host (maybe the host has been restarted?)" + " or you have prepared more than %d queries and q...
diff --git a/src/test/java/com/googlecode/gentyref/Issue13Test.java b/src/test/java/com/googlecode/gentyref/Issue13Test.java index 909aa5d..d21d1ab 100644 --- a/src/test/java/com/googlecode/gentyref/Issue13Test.java +++ b/src/test/java/com/googlecode/gentyref/Issue13Test.java @@ -1,31 +1,31 @@ package com.googlecode.g...
true
true
public void testObjectMethodOnInterface() throws NoSuchMethodException { Method toString = Object.class.getMethod("toString", new Class<?>[]{}); assertEquals(String.class, GenericTypeReflector.getExactReturnType(toString, ArrayList.class)); assertEquals(String.class, GenericTypeReflector.getExactR...
public void testObjectMethodOnInterface() throws NoSuchMethodException { Method toString = Object.class.getMethod("toString", new Class<?>[]{}); assertEquals(String.class, GenericTypeReflector.getExactReturnType(toString, ArrayList.class)); assertEquals(String.class, GenericTypeReflector.getExactRetu...
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefreshService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.core/src/org/eclipse/tcf/te/tcf/processes/core/model/runtime/services/RuntimeModelRefresh...
true
true
protected void refreshContextChildren(final List<IProcessContextNode> oldChildren, final IModel model, final IProcessContextNode parent, final int depth, final ICallback callback) { Assert.isNotNull(oldChildren); Assert.isNotNull(model); Assert.isNotNull(callback); // Make sure that the callback is invoked ev...
protected void refreshContextChildren(final List<IProcessContextNode> oldChildren, final IModel model, final IProcessContextNode parent, final int depth, final ICallback callback) { Assert.isNotNull(oldChildren); Assert.isNotNull(model); Assert.isNotNull(callback); // Make sure that the callback is invoked ev...
diff --git a/src/main/java/de/lessvoid/nifty/NiftyMethodInvoker.java b/src/main/java/de/lessvoid/nifty/NiftyMethodInvoker.java index fdf641c4..f5158762 100644 --- a/src/main/java/de/lessvoid/nifty/NiftyMethodInvoker.java +++ b/src/main/java/de/lessvoid/nifty/NiftyMethodInvoker.java @@ -1,207 +1,207 @@ package de.lessv...
true
true
public void performInvoke(final Object ... invokeParametersParam) { // process all methods (first one wins) for (Object object : target) { if (object != null) { Method method = MethodResolver.findMethod(object.getClass(), methodWithName); if (method != null) { // we've found a ...
public void performInvoke(final Object ... invokeParametersParam) { // process all methods (first one wins) for (Object object : target) { if (object != null) { Method method = MethodResolver.findMethod(object.getClass(), methodWithName); if (method != null) { // we've found a ...
diff --git a/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java b/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java index cbf23933..7a3f0df7 100644 --- a/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/in...
false
true
private Composite createStyleTabContent(Composite folder) { String[] errorWarningIgnore= new String[] { ERROR, WARNING, IGNORE }; String[] errorWarningIgnoreLabels= new String[] { PreferencesMessages.ProblemSeveritiesConfigurationBlock_error, PreferencesMessages.ProblemSeveritiesConfigurationBlock_warni...
private Composite createStyleTabContent(Composite folder) { String[] errorWarningIgnore= new String[] { ERROR, WARNING, IGNORE }; String[] errorWarningIgnoreLabels= new String[] { PreferencesMessages.ProblemSeveritiesConfigurationBlock_error, PreferencesMessages.ProblemSeveritiesConfigurationBlock_warni...
diff --git a/app/controllers/EventSender.java b/app/controllers/EventSender.java index dce4db9..4e6d081 100644 --- a/app/controllers/EventSender.java +++ b/app/controllers/EventSender.java @@ -1,205 +1,205 @@ package controllers; import static eu.play_project.play_commons.constants.Event.EVENT_ID_SUFFIX; import st...
true
true
public static void simulate(@Required String eventType) { String uniqueId = "webapp_" + Long.toString(nextSequenceNumber()) + "_" + eventType + "_" + UUID.randomUUID(); String eventId = EVENTS.getUri() + uniqueId; Logger.info("An event with type '%s' was requested.", eventType); final String CALLEE = "49123...
public static void simulate(@Required String eventType) { String uniqueId = "webapp_" + Long.toString(nextSequenceNumber()) + "_" + eventType + "_" + UUID.randomUUID(); String eventId = EVENTS.getUri() + uniqueId; Logger.info("An event with type '%s' was requested.", eventType); final String CALLEE = "49123...
diff --git a/fog.routing.hrm/src/de/tuilmenau/ics/fog/routing/hierarchical/HRMController.java b/fog.routing.hrm/src/de/tuilmenau/ics/fog/routing/hierarchical/HRMController.java index 5a68e1e5..701387fa 100644 --- a/fog.routing.hrm/src/de/tuilmenau/ics/fog/routing/hierarchical/HRMController.java +++ b/fog.routing.hrm/sr...
false
true
public void newConnection(Connection pConnection) { Logging.log(this, "INCOMING CONNECTION " + pConnection.toString() + " with requirements: " + pConnection.getRequirements()); // get the connection requirements Description tConReqs = pConnection.getRequirements(); /** * Check if the new connection is a ...
public void newConnection(Connection pConnection) { Logging.log(this, "INCOMING CONNECTION " + pConnection.toString() + " with requirements: " + pConnection.getRequirements()); // get the connection requirements Description tConReqs = pConnection.getRequirements(); /** * Check if the new connection is a ...
diff --git a/src/editgroups.java b/src/editgroups.java index 5d0c018..94b312b 100644 --- a/src/editgroups.java +++ b/src/editgroups.java @@ -1,236 +1,236 @@ import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.net.URL;...
false
true
private void processRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub String groupname=request.getParameter("groupname"); System.out.println("Editing permissions for group: " + groupname); Group gr = new Group(); gr.name = gro...
private void processRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub String groupname=request.getParameter("groupname"); System.out.println("Editing permissions for group: " + groupname); Group gr = new Group(); gr.name = gro...
diff --git a/public/src/main/java/com/gumvision/web/controller/MostRecentAdvertsJsonController.java b/public/src/main/java/com/gumvision/web/controller/MostRecentAdvertsJsonController.java index 1956d2b..d616629 100644 --- a/public/src/main/java/com/gumvision/web/controller/MostRecentAdvertsJsonController.java +++ b/pu...
true
true
public void getMostRecentAdvertsToDisplayJson(HttpServletRequest request, HttpServletResponse response) { List<Advert> ads; try { //Don't include any ads that do not meet the display requirements ads = filter(capiAdvertsReader.getMostRecentAdverts()); //Add the...
public void getMostRecentAdvertsToDisplayJson(HttpServletRequest request, HttpServletResponse response) { List<Advert> ads; try { //Don't include any ads that do not meet the display requirements ads = filter(capiAdvertsReader.getMostRecentAdverts()); //Add the...
diff --git a/source/net/yacy/kelondro/data/meta/DigestURI.java b/source/net/yacy/kelondro/data/meta/DigestURI.java index 4836f1295..e2f74ecbb 100644 --- a/source/net/yacy/kelondro/data/meta/DigestURI.java +++ b/source/net/yacy/kelondro/data/meta/DigestURI.java @@ -1,1263 +1,1263 @@ // yacyURL.java // (C) 2006 by Mich...
false
true
private void parseURLString(String url) throws MalformedURLException { // identify protocol assert (url != null); url = url.trim(); if (url.startsWith("\\\\")) { url = "smb://" + url.substring(2).replaceAll("\\\\", "/"); } if (url.charAt(1) == ':'...
private void parseURLString(String url) throws MalformedURLException { // identify protocol assert (url != null); url = url.trim(); if (url.startsWith("\\\\")) { url = "smb://" + url.substring(2).replaceAll("\\\\", "/"); } if (url.length() > 1 && ...
diff --git a/src/jvm/storm/starter/bolt/RedisLinksPublisherBolt.java b/src/jvm/storm/starter/bolt/RedisLinksPublisherBolt.java index a917881..8477b41 100644 --- a/src/jvm/storm/starter/bolt/RedisLinksPublisherBolt.java +++ b/src/jvm/storm/starter/bolt/RedisLinksPublisherBolt.java @@ -1,105 +1,105 @@ package storm.star...
true
true
public List<Object> filter(Status status) { URLEntity urls[] = status.getURLEntities(); if(urls == null) { return null; } URL finalUrl = null; List<Object> marketUrls = new LinkedList<Object>(); for(URLEntity url: urls) { finalUrl = getFinalUrl(url.getURL()); if(finalUrl == null) { c...
public List<Object> filter(Status status) { URLEntity urls[] = status.getURLEntities(); if(urls == null) { return null; } URL finalUrl = null; List<Object> marketUrls = new LinkedList<Object>(); for(URLEntity url: urls) { finalUrl = getFinalUrl(url.getURL()); if(finalUrl == null) { c...
diff --git a/src/org/apache/hadoop/hive/contrib/serde2/JsonSerde.java b/src/org/apache/hadoop/hive/contrib/serde2/JsonSerde.java index c632f9e..48f30e1 100644 --- a/src/org/apache/hadoop/hive/contrib/serde2/JsonSerde.java +++ b/src/org/apache/hadoop/hive/contrib/serde2/JsonSerde.java @@ -1,270 +1,275 @@ /** * JSON S...
true
true
public Object deserialize(Writable blob) throws SerDeException { Text rowText = (Text) blob; LOG.debug("Deserialize row: " + rowText.toString()); // Try parsing row into JSON object JSONObject jObj; try { jObj = new JSONObject(rowText.toString()) { /** * In Hive column names are case insensitive...
public Object deserialize(Writable blob) throws SerDeException { Text rowText = (Text) blob; LOG.debug("Deserialize row: " + rowText.toString()); // Try parsing row into JSON object JSONObject jObj; try { jObj = new JSONObject(rowText.toString()) { /** * In Hive column names are case insensitive...
diff --git a/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java b/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java index 9a1b873..d4f9347 100644 --- a/tycho-p2/tycho-p2-plugin/src/main/java/org/eclipse/tycho/plugins/p2/P2MetadataMojo.java +++ b...
false
true
protected void attachP2Metadata() throws MojoExecutionException { if (!attachP2Metadata) { return; } File file = project.getArtifact().getFile(); if (file == null || !file.canRead()) { throw new IllegalStateException(); } File targetDir = ne...
protected void attachP2Metadata() throws MojoExecutionException { if (!attachP2Metadata) { return; } File file = project.getArtifact().getFile(); if (file == null || !file.canRead()) { throw new IllegalStateException(); } File targetDir = ne...
diff --git a/src/main/gui/FrmMain.java b/src/main/gui/FrmMain.java index f82b884..b2f7d62 100644 --- a/src/main/gui/FrmMain.java +++ b/src/main/gui/FrmMain.java @@ -1,274 +1,274 @@ package main.gui; import java.awt.BorderLayout; import java.awt.Color; import java.awt.EventQueue; import java.awt.MenuItem; import...
false
true
public FrmMain() { setTitle("Pharmashup"); setSize(new Dimension(1024, 768)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLocationRelativeTo(null); getContentPane().setLayout( new BoxLayout(getContentPane(), BoxLayout.X_AXIS)); getRootPane().putClientProperty("JRootPane.MenuInTitle", Boolean.TRU...
public FrmMain() { setTitle("Pharmashup"); setSize(new Dimension(1024, 768)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLocationRelativeTo(null); getContentPane().setLayout( new BoxLayout(getContentPane(), BoxLayout.X_AXIS)); getRootPane().putClientProperty("JRootPane.MenuInTitle", Boolean.TRU...
diff --git a/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java b/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java index c13bc15d..8ec0439a 100644 --- a/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java +++ b/core/src/mai...
true
true
protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Configuration job = context.getConfiguration(); clusterer = new FuzzyKMeansClusterer(job); log.info("In Mapper Configure:"); String clusterPath = job.get(FuzzyKMeansConfigKeys.CLUSTER_P...
protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); Configuration job = context.getConfiguration(); clusterer = new FuzzyKMeansClusterer(job); log.info("In Mapper Configure:"); String clusterPath = job.get(FuzzyKMeansConfigKeys.CLUSTER_P...