Datasets:

diff
stringlengths
262
553k
is_single_chunk
bool
2 classes
is_single_function
bool
1 class
buggy_function
stringlengths
20
391k
fixed_function
stringlengths
0
392k
diff --git a/src/test/java/org/encog/ml/factory/TestMLMethodFactory.java b/src/test/java/org/encog/ml/factory/TestMLMethodFactory.java index 9d2110d46..6bec243d6 100644 --- a/src/test/java/org/encog/ml/factory/TestMLMethodFactory.java +++ b/src/test/java/org/encog/ml/factory/TestMLMethodFactory.java @@ -1,79 +1,79 @@ ...
true
true
public void testFactoryFeedforward() { String architecture = "?:B->TANH->3->LINEAR->?:B"; MLMethodFactory factory = new MLMethodFactory(); BasicNetwork network = (BasicNetwork)factory.create(MLMethodFactory.TYPE_FEEDFORWARD, architecture, 1, 4); Assert.assertTrue(network.isLayerBiased(0)); Assert.assertFalse...
public void testFactoryFeedforward() { String architecture = "?:B->TANH->3->LINEAR->?:B"; MLMethodFactory factory = new MLMethodFactory(); BasicNetwork network = (BasicNetwork)factory.create(MLMethodFactory.TYPE_FEEDFORWARD, architecture, 1, 4); Assert.assertTrue(network.isLayerBiased(0)); Assert.assertFalse...
diff --git a/grails/src/java/org/codehaus/groovy/grails/compiler/injection/GlobalPluginAwareEntityASTTransformation.java b/grails/src/java/org/codehaus/groovy/grails/compiler/injection/GlobalPluginAwareEntityASTTransformation.java index 0f8eb2604..5485b5da2 100644 --- a/grails/src/java/org/codehaus/groovy/grails/compil...
true
true
public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { if(disableTransformation) return; ASTNode astNode = astNodes[0]; if(astNode instanceof ModuleNode) { ModuleNode moduleNode = (ModuleNode) astNode; List classes = moduleNode.getClasses(); if(c...
public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { if(disableTransformation) return; ASTNode astNode = astNodes[0]; if(astNode instanceof ModuleNode) { ModuleNode moduleNode = (ModuleNode) astNode; List classes = moduleNode.getClasses(); if(c...
diff --git a/src/main/java/me/eccentric_nz/TARDIS/utility/TARDISHostileDisplacement.java b/src/main/java/me/eccentric_nz/TARDIS/utility/TARDISHostileDisplacement.java index 42f4da81e..c5355b042 100644 --- a/src/main/java/me/eccentric_nz/TARDIS/utility/TARDISHostileDisplacement.java +++ b/src/main/java/me/eccentric_nz/T...
false
true
public void moveTARDIS(final int id, Player hostile) { HashMap<String, Object> where = new HashMap<String, Object>(); where.put("tardis_id", id); ResultSetTardis rs = new ResultSetTardis(plugin, where, "", false); if (rs.resultSet()) { String current = rs.getCurrent(); ...
public void moveTARDIS(final int id, Player hostile) { HashMap<String, Object> where = new HashMap<String, Object>(); where.put("tardis_id", id); ResultSetTardis rs = new ResultSetTardis(plugin, where, "", false); if (rs.resultSet()) { String current = rs.getCurrent(); ...
diff --git a/bikeshed/src/com/google/gwt/valuestore/shared/impl/RecordJsoImpl.java b/bikeshed/src/com/google/gwt/valuestore/shared/impl/RecordJsoImpl.java index 60af25ef8..0395a602e 100644 --- a/bikeshed/src/com/google/gwt/valuestore/shared/impl/RecordJsoImpl.java +++ b/bikeshed/src/com/google/gwt/valuestore/shared/imp...
true
true
public final <V> V get(Property<V> property) { assert isDefined(property.getName()) : "Cannot ask for a property before setting it: " + property.getName(); if (Integer.class.equals(property.getType())) { return (V) Integer.valueOf(getInt(property.getName())); } if (Date.class.equals(pro...
public final <V> V get(Property<V> property) { assert isDefined(property.getName()) : "Cannot ask for a property before setting it: " + property.getName(); if (Integer.class.equals(property.getType())) { return (V) Integer.valueOf(getInt(property.getName())); } if (Date.class.equals(pro...
diff --git a/src/org/geworkbench/parsers/SampleFileParser.java b/src/org/geworkbench/parsers/SampleFileParser.java index e3041443..7d3c3d84 100644 --- a/src/org/geworkbench/parsers/SampleFileParser.java +++ b/src/org/geworkbench/parsers/SampleFileParser.java @@ -1,319 +1,314 @@ package org.geworkbench.parsers; impo...
false
true
public DSMicroarraySet getMArraySet(File file) throws InputFileFormatException, InterruptedIOException { BufferedReader in = null; final int extSeperater = '.'; String fileName = file.getName(); int dotIndex = fileName.lastIndexOf(extSeperater); if (dotIndex != -1) { fileName = fileName.substring...
public DSMicroarraySet getMArraySet(File file) throws InputFileFormatException, InterruptedIOException { BufferedReader in = null; String fileName = file.getName(); maSet.setLabel(fileName); String arrayName = null; int m = 0; int valueLabel = 0; int call = 0; int detection = 0; List<Stri...
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java index c71b859d6..681a1d73c 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCMap.java +++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java @@ -1,352 +1,355 @@ package cgeo.geocaching.connector.gc; i...
true
true
public static SearchResult parseMapJSON(final String data, Tile tile, Bitmap bitmap, final Strategy strategy) { final SearchResult searchResult = new SearchResult(); try { final LeastRecentlyUsedMap<String, String> nameCache = new LeastRecentlyUsedMap.LruCache<String, String>(2000); //...
public static SearchResult parseMapJSON(final String data, Tile tile, Bitmap bitmap, final Strategy strategy) { final SearchResult searchResult = new SearchResult(); try { final LeastRecentlyUsedMap<String, String> nameCache = new LeastRecentlyUsedMap.LruCache<String, String>(2000); //...
diff --git a/src/main/java/com/ardublock/translator/block/MessageBlock.java b/src/main/java/com/ardublock/translator/block/MessageBlock.java index 98512d4..cc5971e 100644 --- a/src/main/java/com/ardublock/translator/block/MessageBlock.java +++ b/src/main/java/com/ardublock/translator/block/MessageBlock.java @@ -1,34 +1...
true
true
public String toCode() throws SocketNullException, SubroutineNotDeclaredException { //TODO take out special character String ret; ret = label.replaceAll("\\\\", "\\\\\\\\"); ret = ret.replaceAll("\"", "\\\\\""); //A way to have 'space' at start or end of message ret = ret.replaceAll("<&space>", " "); //...
public String toCode() throws SocketNullException, SubroutineNotDeclaredException { //TODO take out special character String ret; ret = label.replaceAll("\\\\", "\\\\\\\\"); ret = ret.replaceAll("\"", "\\\\\""); //A way to have 'space' at start or end of message ret = ret.replaceAll("<&space>", " "); //...
diff --git a/Freerider/src/no/ntnu/idi/socialhitchhiking/service/JourneyReminder.java b/Freerider/src/no/ntnu/idi/socialhitchhiking/service/JourneyReminder.java index 03a8c63..318f5d4 100644 --- a/Freerider/src/no/ntnu/idi/socialhitchhiking/service/JourneyReminder.java +++ b/Freerider/src/no/ntnu/idi/socialhitchhiking/...
false
true
public void onReceive(Context con, Intent intent) { app = (SocialHitchhikingApplication) con.getApplicationContext(); List<Journey> jour; if(app.getSettings().isPullNotifications()){ try { jour = app.sendJourneysRequest(); } catch (InterruptedException e) { // TODO Auto-generated catch block j...
public void onReceive(Context con, Intent intent) { app = (SocialHitchhikingApplication) con.getApplicationContext(); List<Journey> jour; if(app.getSettings().isPullNotifications()){ try { jour = app.sendJourneysRequest(); } catch (InterruptedException e) { // TODO Auto-generated catch block j...
diff --git a/srcj/com/sun/electric/plugins/j3d/J3DKeyBehavior.java b/srcj/com/sun/electric/plugins/j3d/J3DKeyBehavior.java index 0c423eafa..78f189319 100644 --- a/srcj/com/sun/electric/plugins/j3d/J3DKeyBehavior.java +++ b/srcj/com/sun/electric/plugins/j3d/J3DKeyBehavior.java @@ -1,272 +1,273 @@ /* -*- tab-width: 4 -*...
true
true
public void processStimulus(Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] event; while(criteria.hasMoreElements( )) { wakeup = (WakeupCriterion) criteria.nextElement( ); if( !(wakeup instanceof WakeupOnAWTEvent) ) continue; event = ((WakeupOnAWTEvent)wakeup).getAWTEvent( ); f...
public void processStimulus(Enumeration criteria) { WakeupCriterion wakeup; AWTEvent[] event; while(criteria.hasMoreElements( )) { wakeup = (WakeupCriterion) criteria.nextElement( ); if( !(wakeup instanceof WakeupOnAWTEvent) ) continue; event = ((WakeupOnAWTEvent)wakeup).getAWTEvent( ); f...
diff --git a/src/test/novelang/benchmark/Nhovestone.java b/src/test/novelang/benchmark/Nhovestone.java index 9ddb9b3d..9cab85cd 100644 --- a/src/test/novelang/benchmark/Nhovestone.java +++ b/src/test/novelang/benchmark/Nhovestone.java @@ -1,219 +1,219 @@ /* * Copyright (C) 2010 Laurent Caillette * * This program...
true
true
public static void main( final String[] args ) throws IOException, URISyntaxException, ProcessDriver.ProcessCreationFailedException, VersionFormatException, InterruptedException { EnvironmentTools.logSystemProperties() ; final File scenariiDirectory ; final File vers...
public static void main( final String[] args ) throws IOException, URISyntaxException, ProcessDriver.ProcessCreationFailedException, VersionFormatException, InterruptedException { EnvironmentTools.logSystemProperties() ; final File scenariiDirectory ; final File vers...
diff --git a/apps/animaldb/org/molgenis/animaldb/plugins/breeding/Breedingnew.java b/apps/animaldb/org/molgenis/animaldb/plugins/breeding/Breedingnew.java index 25b889870..c39d99032 100644 --- a/apps/animaldb/org/molgenis/animaldb/plugins/breeding/Breedingnew.java +++ b/apps/animaldb/org/molgenis/animaldb/plugins/breed...
true
true
public void handleRequest(Database db, Tuple request) { ct.setDatabase(db); action = request.getString("__action"); try { if (motherMatrixViewer != null && action.startsWith(motherMatrixViewer.getName())) { motherMatrixViewer.setDatabase(db); motherMatrixViewer.handleRequest(db, request); motherM...
public void handleRequest(Database db, Tuple request) { ct.setDatabase(db); action = request.getString("__action"); try { if (motherMatrixViewer != null && action.startsWith(motherMatrixViewer.getName())) { motherMatrixViewer.setDatabase(db); motherMatrixViewer.handleRequest(db, request); motherM...
diff --git a/library/org.beangle.model/src/main/java/org/beangle/model/comment/SqlCommentGenerator.java b/library/org.beangle.model/src/main/java/org/beangle/model/comment/SqlCommentGenerator.java index b4f2a35b..26e499cc 100644 --- a/library/org.beangle.model/src/main/java/org/beangle/model/comment/SqlCommentGenerator...
false
true
public static boolean start(RootDoc root) throws IOException { ClassDoc[] classes = root.classes(); NamingStrategy strategy = new NamingStrategy(); strategy.setTableNameConfig(tableNameConfig); // out files String commentFileName = getFileOption(root.options()); String commentLogFileName = System.getPrope...
public static boolean start(RootDoc root) throws IOException { ClassDoc[] classes = root.classes(); NamingStrategy strategy = new NamingStrategy(); strategy.setTableNameConfig(tableNameConfig); // out files String commentFileName = getFileOption(root.options()); String commentLogFileName = System.getPrope...
diff --git a/src/main/java/gr/forth/ics/icardea/pid/PIXQueryHandler.java b/src/main/java/gr/forth/ics/icardea/pid/PIXQueryHandler.java index a82aeec..ef42f15 100644 --- a/src/main/java/gr/forth/ics/icardea/pid/PIXQueryHandler.java +++ b/src/main/java/gr/forth/ics/icardea/pid/PIXQueryHandler.java @@ -1,191 +1,193 @@ pa...
false
true
public Message processMessage(Message msg) throws ApplicationException{ try { logger.debug("Received:"+msg.encode()); } catch (HL7Exception e) { } QBP_Q21 m = (QBP_Q21) msg; QPD qpd = m.getQPD(); String qt = qpd.getQpd2_QueryTag().getValue(); RSP_K23 resp = new RSP_K23(); try { String reqMsg...
public Message processMessage(Message msg) throws ApplicationException{ try { logger.debug("Received:"+msg.encode()); } catch (HL7Exception e) { } QBP_Q21 m = (QBP_Q21) msg; QPD qpd = m.getQPD(); String qt = qpd.getQpd2_QueryTag().getValue(); RSP_K23 resp = new RSP_K23(); try { String reqMsg...
diff --git a/gdx-backend-desktop/src/com/badlogic/gdx/backends/desktop/JoglGL10.java b/gdx-backend-desktop/src/com/badlogic/gdx/backends/desktop/JoglGL10.java index bd06ee462..6852610a7 100644 --- a/gdx-backend-desktop/src/com/badlogic/gdx/backends/desktop/JoglGL10.java +++ b/gdx-backend-desktop/src/com/badlogic/gdx/ba...
false
true
public JoglGL10( javax.media.opengl.GL gl ) { this.gl = gl; ByteBuffer buffer = ByteBuffer.allocateDirect( 200000 * 4 * 4 ); buffer.order(ByteOrder.nativeOrder()); colorBuffer = buffer.asFloatBuffer(); buffer = ByteBuffer.allocateDirect( 200000 * 4 * 3 ); buffer.order(ByteOrder.nativeOrder()); norm...
public JoglGL10( javax.media.opengl.GL gl ) { this.gl = gl; ByteBuffer buffer = ByteBuffer.allocateDirect( 20000 * 4 * 4 ); buffer.order(ByteOrder.nativeOrder()); colorBuffer = buffer.asFloatBuffer(); buffer = ByteBuffer.allocateDirect( 20000 * 4 * 3 ); buffer.order(ByteOrder.nativeOrder()); normal...
diff --git a/modules/VisualizationImpl/src/main/java/org/gephi/visualization/opengl/CompatibilityEngine.java b/modules/VisualizationImpl/src/main/java/org/gephi/visualization/opengl/CompatibilityEngine.java index eea387305..4dee54a80 100644 --- a/modules/VisualizationImpl/src/main/java/org/gephi/visualization/opengl/Co...
true
true
public void display(GL2 gl, GLU glu) { //Update viewport NodeModeler nodeModeler = (NodeModeler) nodeClass.getCurrentModeler(); for (Iterator<NodeModel> itr = octree.getNodeIterator(); itr.hasNext();) { //TODO Move this NodeModel obj = itr.next(); nodeModeler.se...
public void display(GL2 gl, GLU glu) { //Update viewport NodeModeler nodeModeler = (NodeModeler) nodeClass.getCurrentModeler(); for (Iterator<NodeModel> itr = octree.getNodeIterator(); itr.hasNext();) { //TODO Move this NodeModel obj = itr.next(); nodeModeler.se...
diff --git a/src/main/java/novoda/lib/sqliteprovider/provider/SQLiteContentProviderImpl.java b/src/main/java/novoda/lib/sqliteprovider/provider/SQLiteContentProviderImpl.java index 4b66476..d7b72c4 100644 --- a/src/main/java/novoda/lib/sqliteprovider/provider/SQLiteContentProviderImpl.java +++ b/src/main/java/novoda/li...
true
true
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { if (Provider.verboseLoggingEnabled()) { Provider.v("==================== start of query ======================="); Provider.v("Uri: " + uri.toString()); ...
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { if (Provider.verboseLoggingEnabled()) { Provider.v("==================== start of query ======================="); Provider.v("Uri: " + uri.toString()); ...
diff --git a/src/uk/ac/horizon/ug/exploding/client/GpsStatusActivity.java b/src/uk/ac/horizon/ug/exploding/client/GpsStatusActivity.java index 90303e5..4db6a45 100755 --- a/src/uk/ac/horizon/ug/exploding/client/GpsStatusActivity.java +++ b/src/uk/ac/horizon/ug/exploding/client/GpsStatusActivity.java @@ -1,163 +1,162 @@...
false
true
public void onGpsStatusChanged(int event) { // TODO Auto-generated method stub LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); GpsStatus status = locationManager.getGpsStatus(null); TextView tv; tv = (TextView)findViewById(R.id.gps_time_to_fix_text_view); tv.s...
public void onGpsStatusChanged(int event) { LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); GpsStatus status = locationManager.getGpsStatus(null); TextView tv; tv = (TextView)findViewById(R.id.gps_time_to_fix_text_view); tv.setText(""+(status.getTimeToFirstFix()...
diff --git a/src/edu/common/dynamicextensions/domain/DoubleAttributeTypeInformation.java b/src/edu/common/dynamicextensions/domain/DoubleAttributeTypeInformation.java index 4a0477071..c086ed80b 100644 --- a/src/edu/common/dynamicextensions/domain/DoubleAttributeTypeInformation.java +++ b/src/edu/common/dynamicextension...
true
true
public String getFormattedValue(Double value) { String formattedValue = ""; if (value != null) { if (this.decimalPlaces.intValue() > 0) { DecimalFormat formatDecimal = (DecimalFormat) NumberFormat .getNumberInstance(); formatDecimal.setParseBigDecimal(true); formatDecimal.setMaximumF...
public String getFormattedValue(Double value) { String formattedValue = ""; if (value != null) { if (this.decimalPlaces.intValue() > 0) { DecimalFormat formatDecimal = (DecimalFormat) NumberFormat .getNumberInstance(); formatDecimal.setParseBigDecimal(true); formatDecimal.setMaximumF...
diff --git a/src/main/java/de/cismet/tools/gui/documents/DocumentPanelTester.java b/src/main/java/de/cismet/tools/gui/documents/DocumentPanelTester.java index 80e6efb..57dddac 100644 --- a/src/main/java/de/cismet/tools/gui/documents/DocumentPanelTester.java +++ b/src/main/java/de/cismet/tools/gui/documents/DocumentPane...
true
true
public DocumentPanelTester() { Log4JQuickConfig.configure4LumbermillOnLocalhost(); initComponents(); dopTest.getDocumentListModel().addElement(new DefaultDocument("briefpapier", "/home/hell/test/briefpapier.pdf")); dopTest.getDocumentListModel().addElement(new DefaultDocument("ein pn...
public DocumentPanelTester() { Log4JQuickConfig.configure4LumbermillOnLocalhost(); initComponents(); dopTest.getDocumentListModel().addElement(new DefaultDocument("briefpapier", "/home/hell/test/briefpapier.pdf")); //NOI18N dopTest.getDocumentListModel().addElement(new DefaultDocum...
diff --git a/src/org/jrubyparser/lexer/Lexer.java b/src/org/jrubyparser/lexer/Lexer.java index 1cadd7b..fd0fcf5 100644 --- a/src/org/jrubyparser/lexer/Lexer.java +++ b/src/org/jrubyparser/lexer/Lexer.java @@ -1,2916 +1,2921 @@ /* ***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The conte...
false
true
private int yylex() throws IOException { int c; boolean spaceSeen = false; boolean commandState; if (setSpaceSeen) { spaceSeen = true; setSpaceSeen = false; } // On new lines, possibly resume heredoc processing (see docs for n...
private int yylex() throws IOException { int c; boolean spaceSeen = false; boolean commandState; if (setSpaceSeen) { spaceSeen = true; setSpaceSeen = false; } // On new lines, possibly resume heredoc processing (see docs for n...
diff --git a/src/com/takipi/keygen/instructions/InstructionsBuilder.java b/src/com/takipi/keygen/instructions/InstructionsBuilder.java index 47360c0..57a49f0 100644 --- a/src/com/takipi/keygen/instructions/InstructionsBuilder.java +++ b/src/com/takipi/keygen/instructions/InstructionsBuilder.java @@ -1,57 +1,57 @@ pack...
false
true
public static void buildInstructionsFile(String username, String secretKey, String proxy) { String installInstructions = InstructionsVelocity.generateText(username, secretKey, proxy); String id = secretKey.substring(0, secretKey.indexOf('#')); String filenamePrefix = username+"-"+id; String filename ...
public static void buildInstructionsFile(String username, String secretKey, String proxy) { String installInstructions = InstructionsVelocity.generateText(username, secretKey, proxy); String serverId = secretKey.substring(0, secretKey.indexOf('#')); String filenamePrefix = username + "-" + serverId; ...
diff --git a/src/be/ibridge/kettle/trans/step/tableoutput/TableOutputMeta.java b/src/be/ibridge/kettle/trans/step/tableoutput/TableOutputMeta.java index c8340c72..4c0208fc 100644 --- a/src/be/ibridge/kettle/trans/step/tableoutput/TableOutputMeta.java +++ b/src/be/ibridge/kettle/trans/step/tableoutput/TableOutputMeta.ja...
true
true
public void check(ArrayList remarks, StepMeta stepMeta, Row prev, String input[], String output[], Row info) { if (database!=null) { CheckResult cr = new CheckResult(CheckResult.TYPE_RESULT_OK, "Connection exists", stepMeta); remarks.add(cr); Database db = new Database(database); try { db.conn...
public void check(ArrayList remarks, StepMeta stepMeta, Row prev, String input[], String output[], Row info) { if (database!=null) { CheckResult cr = new CheckResult(CheckResult.TYPE_RESULT_OK, "Connection exists", stepMeta); remarks.add(cr); Database db = new Database(database); try { db.conn...
diff --git a/src/minecraft/co/uk/flansmods/client/tmt/ModelRendererTurbo.java b/src/minecraft/co/uk/flansmods/client/tmt/ModelRendererTurbo.java index 95ae6760..8e116593 100644 --- a/src/minecraft/co/uk/flansmods/client/tmt/ModelRendererTurbo.java +++ b/src/minecraft/co/uk/flansmods/client/tmt/ModelRendererTurbo.java @...
false
true
public void addFlexTrapezoid(float x, float y, float z, int w, int h, int d, float scale, float bScale1, float bScale2, float bScale3, float bScale4, float fScale1, float fScale2, int dir) { float f4 = x + (float)w; float f5 = y + (float)h; float f6 = z + (float)d; x -= scale; y -= scale; z -= scale; f4...
public void addFlexTrapezoid(float x, float y, float z, int w, int h, int d, float scale, float bScale1, float bScale2, float bScale3, float bScale4, float fScale1, float fScale2, int dir) { float f4 = x + (float)w; float f5 = y + (float)h; float f6 = z + (float)d; x -= scale; y -= scale; z -= scale; f4...
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java index b8c10e4a2..eccd6bda8 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInfo...
true
true
public void setInput(Object input) { Assert.isLegal(input instanceof String || input instanceof BrowserInformationControlInput); if (input instanceof String) { setInformation((String)input); return; } fInput= (BrowserInformationControlInput)input; String content= null; if (fInput != null) con...
public void setInput(Object input) { Assert.isLegal(input == null || input instanceof String || input instanceof BrowserInformationControlInput); if (input instanceof String) { setInformation((String)input); return; } fInput= (BrowserInformationControlInput)input; String content= null; if (fInpu...
diff --git a/org.eclipse.nebula.widgets.nattable.core.test/src/org/eclipse/nebula/widgets/nattable/selection/SelectionLayerStructuralChangeEventHandlerTest.java b/org.eclipse.nebula.widgets.nattable.core.test/src/org/eclipse/nebula/widgets/nattable/selection/SelectionLayerStructuralChangeEventHandlerTest.java index 704...
true
true
public void shouldLeaveSelectionUnchangedIfASelectedRowIsNotModified() throws Exception { selectionModel.addSelection(2, 3); SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(selectionLayer, selectionModel); handler.handleLayerEvent(new RowDeleteEvent(dataLaye...
public void shouldLeaveSelectionUnchangedIfASelectedRowIsNotModified() throws Exception { selectionModel.addSelection(2, 3); SelectionLayerStructuralChangeEventHandler handler = new SelectionLayerStructuralChangeEventHandler(selectionLayer, selectionModel); handler.handleLayerEvent(new RowDeleteEvent(dataLaye...
diff --git a/src/polskaad1340/PolskaAD1340.java b/src/polskaad1340/PolskaAD1340.java index 185aa54..e61cc48 100644 --- a/src/polskaad1340/PolskaAD1340.java +++ b/src/polskaad1340/PolskaAD1340.java @@ -1,102 +1,102 @@ /* * To change this template, choose Tools | Templates * and open the template in the editor. */...
true
true
public static void main(String[] args) { System.setProperty("java.util.Arrays.useLegacyMergeSort", "true"); //bugfix, patrz http://stackoverflow.com/questions/13575224/comparison-method-violates-its-general-contract-timsort-and-gridlayout // TODO code application logic here OknoMapy...
public static void main(String[] args) { System.setProperty("java.util.Arrays.useLegacyMergeSort", "true"); //bugfix, patrz http://stackoverflow.com/questions/13575224/comparison-method-violates-its-general-contract-timsort-and-gridlayout // TODO code application logic here OknoMapy...
diff --git a/CubicTestSeleniumExporterServer/src/main/java/org/cubictest/runner/selenium/server/internal/CubicSelenium.java b/CubicTestSeleniumExporterServer/src/main/java/org/cubictest/runner/selenium/server/internal/CubicSelenium.java index ded9ef09..760e9b52 100644 --- a/CubicTestSeleniumExporterServer/src/main/java...
true
true
private String[] execute(String command, String... args) { String[] results = null; try{ if(socket == null){ createSocket(); } OutputStream os = socket.getOutputStream(); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os)); bw.write(command); bw.newLine(); bw.write(args.leng...
private String[] execute(String command, String... args) { String[] results = null; try{ if(socket == null){ createSocket(); } OutputStream os = socket.getOutputStream(); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os)); bw.write(command); bw.newLine(); bw.write(args.leng...
diff --git a/org.emftext.sdk/src/org/emftext/sdk/finders/GenPackageByHintFinder.java b/org.emftext.sdk/src/org/emftext/sdk/finders/GenPackageByHintFinder.java index 41b229b29..b55395303 100644 --- a/org.emftext.sdk/src/org/emftext/sdk/finders/GenPackageByHintFinder.java +++ b/org.emftext.sdk/src/org/emftext/sdk/finders...
true
true
private IGenPackageFinderResult findGenPackageUsingHint(String nsURI, String locationHint, GenPackageDependentElement container, ITextResource resource) { ResourceSet rs = resource.getResourceSet(); if (rs == null) { return null; } try { URI hintURI = new LocationHintResolver().getLocationHintURI(locatio...
private IGenPackageFinderResult findGenPackageUsingHint(String nsURI, String locationHint, GenPackageDependentElement container, ITextResource resource) { if (resource == null) { return null; } ResourceSet rs = resource.getResourceSet(); if (rs == null) { return null; } try { URI hintURI = new Loc...
diff --git a/src/dk/stacktrace/risk/game_logic/continents/Asia.java b/src/dk/stacktrace/risk/game_logic/continents/Asia.java index a10d9b8..01068f8 100644 --- a/src/dk/stacktrace/risk/game_logic/continents/Asia.java +++ b/src/dk/stacktrace/risk/game_logic/continents/Asia.java @@ -1,184 +1,185 @@ package dk.stacktrace....
true
true
public void setNeighbours() { siberia.addNeighbour(ural); siberia.addNeighbour(yakutsk); siberia.addNeighbour(irkutsk); siberia.addNeighbour(mongolia); siberia.addNeighbour(china); yakutsk.addNeighbour(siberia); yakutsk.addNeighbour(kamchatka); yakutsk.addNeighbour(irkutsk); kamchatka.addNeighb...
public void setNeighbours() { siberia.addNeighbour(ural); siberia.addNeighbour(yakutsk); siberia.addNeighbour(irkutsk); siberia.addNeighbour(mongolia); siberia.addNeighbour(china); yakutsk.addNeighbour(siberia); yakutsk.addNeighbour(kamchatka); yakutsk.addNeighbour(irkutsk); kamchatka.addNeighb...
diff --git a/src/com/android/mms/ui/UriImage.java b/src/com/android/mms/ui/UriImage.java index c74764b5..da3e8f13 100644 --- a/src/com/android/mms/ui/UriImage.java +++ b/src/com/android/mms/ui/UriImage.java @@ -1,405 +1,434 @@ /* * Copyright (C) 2008 Esmertec AG. * Copyright (C) 2008 The Android Open Source Projec...
false
true
public static byte[] getResizedImageData(int width, int height, int widthLimit, int heightLimit, int byteLimit, Uri uri, Context context) { int outWidth = width; int outHeight = height; float scaleFactor = 1.F; while ((outWidth * scaleFactor > widthLimit) || (outHeight *...
public static byte[] getResizedImageData(int width, int height, int widthLimit, int heightLimit, int byteLimit, Uri uri, Context context) { int outWidth = width; int outHeight = height; float scaleFactor = 1.F; while ((outWidth * scaleFactor > widthLimit) || (outHeight *...
diff --git a/applet/src/DynVizGraph.java b/applet/src/DynVizGraph.java index 384fcd7..a5b6d13 100644 --- a/applet/src/DynVizGraph.java +++ b/applet/src/DynVizGraph.java @@ -1,449 +1,449 @@ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import javax.swing.JAppl...
false
true
public void run(){ Line[] lines; Line[] arrows; //draw stuff float qlimf = (float)C / (float)(A + C); int qlim = (int) Math.floor(200f * (1f - qlimf)); lines = new Line[106]; int index = 0; int index2 = 0; ...
public void run(){ Line[] lines; Line[] arrows; //draw stuff float qlimf = (float)C / (float)(A + C); int qlim = (int) Math.floor(200f * (1f - qlimf)); lines = new Line[106]; int index = 0; int index2 = 0; ...
diff --git a/src/java/com/android/internal/telephony/OperatorInfo.java b/src/java/com/android/internal/telephony/OperatorInfo.java index 0718bf85..b9f938ea 100644 --- a/src/java/com/android/internal/telephony/OperatorInfo.java +++ b/src/java/com/android/internal/telephony/OperatorInfo.java @@ -1,170 +1,170 @@ /* * C...
false
true
OperatorInfo(String operatorAlphaLong, String operatorAlphaShort, String operatorNumeric, State state) { mOperatorAlphaLong = operatorAlphaLong; mOperatorAlphaShort = operatorAlphaShort; mOperatorNumeric = null; mRadioTech = ""; ...
OperatorInfo(String operatorAlphaLong, String operatorAlphaShort, String operatorNumeric, State state) { mOperatorAlphaLong = operatorAlphaLong; mOperatorAlphaShort = operatorAlphaShort; mOperatorNumeric = operatorNumeric; mRadioTech ...
diff --git a/src/main/java/com/dritanium/delegates/AbstractIntelligentDelegate.java b/src/main/java/com/dritanium/delegates/AbstractIntelligentDelegate.java index 8980cc5..1ef67f7 100644 --- a/src/main/java/com/dritanium/delegates/AbstractIntelligentDelegate.java +++ b/src/main/java/com/dritanium/delegates/AbstractInte...
true
true
public boolean checkInput(Object[] input) { if(input.length != getArgumentCount()) { return false; } else { for(int i = 0; i < getArgumentCount(); i++) { Class desiredType = args[i].getClass(); if(!desiredType.isInstance(input[i])) { return false; } } return true; } }
public boolean checkInput(Object[] input) { if(input.length != getArgumentCount()) { return false; } else { for(int i = 0; i < getArgumentCount(); i++) { Class desiredType = args[i]; if(!desiredType.isInstance(input[i])) { return false; } } return true; } }
diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/jna/Natives.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/jna/Natives.java index 5150a030c7e..13438424e86 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/jna/Natives.java +++ b/modules/elasticsearch...
true
true
public static void tryMlockall() { int errno = Integer.MIN_VALUE; try { int result = CLibrary.mlockall(CLibrary.MCL_CURRENT); if (result != 0) errno = Native.getLastError(); } catch (UnsatisfiedLinkError e) { // this will have already been ...
public static void tryMlockall() { int errno = Integer.MIN_VALUE; try { int result = CLibrary.mlockall(CLibrary.MCL_CURRENT); if (result != 0) errno = Native.getLastError(); } catch (UnsatisfiedLinkError e) { // this will have already been ...
diff --git a/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java b/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java index 354dbef90..ed6fe52b5 100644 --- a/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java +++ b/src/java/org/apache/fop/render/afp/AFPImageHandlerRe...
true
true
private AFPDataObjectInfo updateDataObjectInfo(AFPImageObjectInfo imageObjectInfo, AFPPaintingState paintingState, ImageRendered imageRendered) throws IOException { int resolution = paintingState.getResolution(); imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45)...
private AFPDataObjectInfo updateDataObjectInfo(AFPImageObjectInfo imageObjectInfo, AFPPaintingState paintingState, ImageRendered imageRendered) throws IOException { int resolution = paintingState.getResolution(); imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45)...
diff --git a/src/br/ufmg/dcc/vod/spiderpig/common/config/AbstractConfigurable.java b/src/br/ufmg/dcc/vod/spiderpig/common/config/AbstractConfigurable.java index 1dfe53c..95d8df5 100644 --- a/src/br/ufmg/dcc/vod/spiderpig/common/config/AbstractConfigurable.java +++ b/src/br/ufmg/dcc/vod/spiderpig/common/config/AbstractC...
true
true
public final T configurate(Configuration configuration) throws Exception { Iterator<String> keys = configuration.getKeys(); while (keys.hasNext()) { String key = keys.next(); if (!getRequiredParameters().contains(key)) throw new ConfigurationException("Required key not found"); } return realCon...
public final T configurate(Configuration configuration) throws Exception { Iterator<String> keys = configuration.getKeys(); while (keys.hasNext()) { String key = keys.next(); if (!getRequiredParameters().contains(key)) throw new ConfigurationException("Required key " + key + " not found"); } ...
diff --git a/software/ICeePotPC/src/iceepotpc/ui/PotPanel.java b/software/ICeePotPC/src/iceepotpc/ui/PotPanel.java index a15459c..b4032f8 100644 --- a/software/ICeePotPC/src/iceepotpc/ui/PotPanel.java +++ b/software/ICeePotPC/src/iceepotpc/ui/PotPanel.java @@ -1,377 +1,378 @@ package iceepotpc.ui; import iceepotpc....
true
true
public PotPanel(final int pin, final JFrame frame) { setSize(new Dimension(900, 780)); setMinimumSize(new Dimension(900, 780)); cntx = Context.getInstance(); this.setToolTipText(""); GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 47, 186, 30, 620 }; gridBagLay...
public PotPanel(final int pin, final JFrame frame) { setSize(new Dimension(900, 780)); setMinimumSize(new Dimension(900, 780)); cntx = Context.getInstance(); this.setToolTipText(""); GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 47, 186, 30, 620 }; gridBagLay...
diff --git a/elog/src/de/elog/elReasoner/OWLWriter.java b/elog/src/de/elog/elReasoner/OWLWriter.java index 1af3f1b..3d0b5fa 100644 --- a/elog/src/de/elog/elReasoner/OWLWriter.java +++ b/elog/src/de/elog/elReasoner/OWLWriter.java @@ -1,169 +1,169 @@ package de.elog.elReasoner; import java.io.File; import java.util....
false
true
public OWLOntology write(IRI ontologyIRI, String filenameToSave, ArrayList<String> axioms) throws OWLOntologyCreationException, OWLOntologyStorageException{ // Create the document IRI for our ontology File fileToSave = new File(filenameToSave); IRI documentIRI = IRI.create(fileToSave); // Set up a mapping, whi...
public OWLOntology write(IRI ontologyIRI, String filenameToSave, ArrayList<String> axioms) throws OWLOntologyCreationException, OWLOntologyStorageException{ // Create the document IRI for our ontology File fileToSave = new File(filenameToSave); IRI documentIRI = IRI.create(fileToSave.toURI()); // Set up a mapp...
diff --git a/src/main/java/me/captainbern/animationlib/utils/refs/PacketRef.java b/src/main/java/me/captainbern/animationlib/utils/refs/PacketRef.java index 3d3e0d0..b11720e 100644 --- a/src/main/java/me/captainbern/animationlib/utils/refs/PacketRef.java +++ b/src/main/java/me/captainbern/animationlib/utils/refs/Packet...
true
true
public static BiMap getServerPacketRegistry(){ return (BiMap) protocol.getField("h"); }
public static BiMap getServerPacketRegistry(){ return (BiMap) protocol.getField("h").get(null); }
diff --git a/src/com/dalthed/tucan/ui/Messages.java b/src/com/dalthed/tucan/ui/Messages.java index 7ee6cad..646eb2e 100644 --- a/src/com/dalthed/tucan/ui/Messages.java +++ b/src/com/dalthed/tucan/ui/Messages.java @@ -1,144 +1,145 @@ package com.dalthed.tucan.ui; import java.net.MalformedURLException; import java...
true
true
public void onPostExecute(AnswerObject result) { Document doc = Jsoup.parse(result.getHTML()); if(doc.select("span.notLoggedText").text().length()>0){ Intent BackToLoginIntent = new Intent(this,TuCanMobileActivity.class); BackToLoginIntent.putExtra("lostSession", true); startActivity(BackToLoginIntent); ...
public void onPostExecute(AnswerObject result) { Document doc = Jsoup.parse(result.getHTML()); sendHTMLatBug(result.getHTML()); if(doc.select("span.notLoggedText").text().length()>0){ Intent BackToLoginIntent = new Intent(this,TuCanMobileActivity.class); BackToLoginIntent.putExtra("lostSession", true); ...
diff --git a/issues/bridge/FACES-1638-portlet/src/main/java/com/liferay/faces/issues/ModelManagedBean.java b/issues/bridge/FACES-1638-portlet/src/main/java/com/liferay/faces/issues/ModelManagedBean.java index b8d513742..211e571a0 100644 --- a/issues/bridge/FACES-1638-portlet/src/main/java/com/liferay/faces/issues/Model...
true
true
public List<Item> getItems() { if (items == null) { items = new ArrayList<Item>(); items.add(new Item(1, "First Item")); items.add(new Item(2, "Second Item")); items.add(new Item(3, "Third Item")); } return items; }
public List<Item> getItems() { if (items == null) { items = new ArrayList<Item>(); items.add(new Item(1, "First-Item")); items.add(new Item(2, "Second-Item")); items.add(new Item(3, "Third-Item")); } return items; }
diff --git a/src/main/java/com/treasure_data/bulk_import/prepare_parts/proc/CSVTimeColumnProc.java b/src/main/java/com/treasure_data/bulk_import/prepare_parts/proc/CSVTimeColumnProc.java index 0bb4505..b3b0a25 100644 --- a/src/main/java/com/treasure_data/bulk_import/prepare_parts/proc/CSVTimeColumnProc.java +++ b/src/m...
false
true
public Object executeValue(Object value) throws PreparePartsException { // TODO refine!!!! Long v = null; if (value instanceof Long) { v = (Long) value; } else if (value instanceof String) { String sv = (String) value; try { v = ...
public Object executeValue(Object value) throws PreparePartsException { // TODO refine!!!! Long v = 0L; if (value instanceof Long) { v = (Long) value; } else if (value instanceof String) { String sv = (String) value; try { v = Lo...
diff --git a/src/be/ibridge/kettle/spoon/Spoon.java b/src/be/ibridge/kettle/spoon/Spoon.java index b97133f7..6fc6f861 100644 --- a/src/be/ibridge/kettle/spoon/Spoon.java +++ b/src/be/ibridge/kettle/spoon/Spoon.java @@ -1,4778 +1,4783 @@ /********************************************************************** ** ...
false
true
public boolean quitFile() { boolean exit = true; boolean showWarning = true; log.logDetailed(toString(), Messages.getString("Spoon.Log.QuitApplication"));//"Quit application." saveSettings(); if (transMeta.hasChanged()) { MessageBox mb ...
public boolean quitFile() { boolean exit = true; boolean showWarning = true; log.logDetailed(toString(), Messages.getString("Spoon.Log.QuitApplication"));//"Quit application." saveSettings(); if (transMeta.hasChanged()) { MessageBox mb ...
diff --git a/soar-robotics/sps/src/org/msoar/sps/Odometry.java b/soar-robotics/sps/src/org/msoar/sps/Odometry.java index b13778293..ea6552f66 100644 --- a/soar-robotics/sps/src/org/msoar/sps/Odometry.java +++ b/soar-robotics/sps/src/org/msoar/sps/Odometry.java @@ -1,54 +1,54 @@ package org.msoar.sps; import jmat.Li...
false
true
public void propagate(odom_t newOdom, odom_t oldOdom, pose_t pose) { System.out.println("delta left ticks: " + (newOdom.left - oldOdom.left)); System.out.println("delta right ticks: " + (newOdom.right - oldOdom.right)); double dleft = (newOdom.left - oldOdom.left) * tickMeters; double dright = (newOdom.right -...
public void propagate(odom_t newOdom, odom_t oldOdom, pose_t pose) { //System.out.println("delta left ticks: " + (newOdom.left - oldOdom.left)); //System.out.println("delta right ticks: " + (newOdom.right - oldOdom.right)); double dleft = (newOdom.left - oldOdom.left) * tickMeters; double dright = (newOdom.rig...
diff --git a/src/main/java/de/markiewb/netbeans/plugin/git/openinexternalviewer/OpenAction.java b/src/main/java/de/markiewb/netbeans/plugin/git/openinexternalviewer/OpenAction.java index c5b151c..1c0a80e 100644 --- a/src/main/java/de/markiewb/netbeans/plugin/git/openinexternalviewer/OpenAction.java +++ b/src/main/java/...
true
true
private void init(Lookup lkp) { setEnabled(false); //only support one project selected project Collection<? extends Project> lookupAll = lkp.lookupAll(Project.class); if (lookupAll != null && lookupAll.size() >= 2) { return; } ...
private void init(Lookup lkp) { setEnabled(false); //only support one project selected project Collection<? extends Project> lookupAll = lkp.lookupAll(Project.class); if (lookupAll != null && lookupAll.size() >= 2) { return; } ...
diff --git a/src/org/eclipse/imp/pdb/facts/type/TypeDescriptorFactory.java b/src/org/eclipse/imp/pdb/facts/type/TypeDescriptorFactory.java index bd45a013..2d8a50b5 100644 --- a/src/org/eclipse/imp/pdb/facts/type/TypeDescriptorFactory.java +++ b/src/org/eclipse/imp/pdb/facts/type/TypeDescriptorFactory.java @@ -1,287 +1,...
false
true
public Type visitConstructor(IConstructor o) throws VisitorException { Type node = o.getConstructorType(); if (node == boolType) { return tf.boolType(); } else if (node == doubleType) { return tf.doubleType(); } else if (node == integerType) { return tf.integerType(); } else if ...
public Type visitConstructor(IConstructor o) throws VisitorException { Type node = o.getConstructorType(); if (node == boolType) { return tf.boolType(); } else if (node == doubleType) { return tf.doubleType(); } else if (node == integerType) { return tf.integerType(); } else if ...
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java index f85cfad9c..9b78c9a27 100644 --- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/interna...
true
true
public boolean visit(UnifiedTreeNode node) throws CoreException { Policy.checkCanceled(monitor); try { Resource target = (Resource) node.getResource(); int targetType = target.getType(); if (targetType == IResource.PROJECT) return true; if (node.existsInWorkspace() && node.existsInFileSystem()) { /* for...
public boolean visit(UnifiedTreeNode node) throws CoreException { Policy.checkCanceled(monitor); try { Resource target = (Resource) node.getResource(); int targetType = target.getType(); if (targetType == IResource.PROJECT) return true; if (node.existsInWorkspace() && node.existsInFileSystem()) { /* for...
diff --git a/src/annahack/nethackparser/NetHackParser.java b/src/annahack/nethackparser/NetHackParser.java index e5cfca0..9bab334 100644 --- a/src/annahack/nethackparser/NetHackParser.java +++ b/src/annahack/nethackparser/NetHackParser.java @@ -1,255 +1,255 @@ package annahack.nethackparser; import java.util.Queue;...
true
true
private boolean parseStatusLine() throws IOException { String topline = new String(com.peekLine(22)); String bottomline = new String(com.peekLine(23)); Matcher m_st=r_st.matcher(topline); if(!m_st.find()) return false; Matcher m_dx=r_dx.matcher(topline); if(!m_dx.find()) return false; Mat...
private boolean parseStatusLine() throws IOException { String topline = new String(com.peekLine(22)); String bottomline = new String(com.peekLine(23)); Matcher m_st=r_st.matcher(topline); if(!m_st.find()) return false; Matcher m_dx=r_dx.matcher(topline); if(!m_dx.find()) return false; Mat...
diff --git a/src/annahack/telnetconnection/ApacheBasedTelnetInterface.java b/src/annahack/telnetconnection/ApacheBasedTelnetInterface.java index ef7364c..a61ecdf 100644 --- a/src/annahack/telnetconnection/ApacheBasedTelnetInterface.java +++ b/src/annahack/telnetconnection/ApacheBasedTelnetInterface.java @@ -1,101 +1,10...
true
true
public ApacheBasedTelnetInterface(TelnetClient tc) throws SocketException, InvalidTelnetOptionException, IOException { super(new TerminalSymbol[24][80], tc.getInputStream()); for (int i=0; i<24; i++) for (int j=0; j<80; j++) screen[i][j]=new TerminalSymbol(); this.tc=tc; outstr=this.tc.getOutpu...
public ApacheBasedTelnetInterface(TelnetClient tc) throws SocketException, InvalidTelnetOptionException, IOException { super(new TerminalSymbol[24][80], tc.getInputStream()); for (int i=0; i<24; i++) for (int j=0; j<80; j++) screen[i][j]=new TerminalSymbol(); this.tc=tc; outstr=this.tc.getOutpu...
diff --git a/src/org/concord/data/Unit.java b/src/org/concord/data/Unit.java index 5880ec3..60b6f69 100644 --- a/src/org/concord/data/Unit.java +++ b/src/org/concord/data/Unit.java @@ -1,792 +1,792 @@ /* * Copyright (C) 2004 The Concord Consortium, Inc., * 10 Concord Crossing, Concord, MA 01742 * * Web Sit...
true
true
public static Unit getUnit(int code){ if(code < 0) return null; switch(code){ case UNIT_CODE_KG : return new Unit("kilogram","kg",false,UNIT_CAT_MASS,UNIT_CODE_KG,UNIT_CODE_KG, (byte)0,(byte)1,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0, 1.0f,0.0f,false,false); case UNIT_CO...
public static Unit getUnit(int code){ if(code < 0) return null; switch(code){ case UNIT_CODE_KG : return new Unit("kilogram","kg",false,UNIT_CAT_MASS,UNIT_CODE_KG,UNIT_CODE_KG, (byte)0,(byte)1,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0,(byte)0, 1.0f,0.0f,false,false); case UNIT_CO...
diff --git a/src/main/java/org/github/kolorobot/config/PersistenceConfig.java b/src/main/java/org/github/kolorobot/config/PersistenceConfig.java index b760b0d..0d59c23 100644 --- a/src/main/java/org/github/kolorobot/config/PersistenceConfig.java +++ b/src/main/java/org/github/kolorobot/config/PersistenceConfig.java @@ ...
true
true
public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean.setPackagesToScan("org.github.kolorobot.user"); e...
public LocalContainerEntityManagerFactoryBean entityManagerFactory() { LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean(); entityManagerFactoryBean.setDataSource(dataSource()); entityManagerFactoryBean.setPackagesToScan("org.github.kolorobot.domain"); ...
diff --git a/tool/src/main/java/uk/ac/ox/oucs/oauth/servlet/AuthorisationServlet.java b/tool/src/main/java/uk/ac/ox/oucs/oauth/servlet/AuthorisationServlet.java index 897989b..811b69b 100644 --- a/tool/src/main/java/uk/ac/ox/oucs/oauth/servlet/AuthorisationServlet.java +++ b/tool/src/main/java/uk/ac/ox/oucs/oauth/servl...
true
true
private void sendToAuthorisePage(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Accessor accessor = oAuthService.getAccessor(request.getParameter("oauthToken"), Accessor.Type.REQUEST); Consumer consumer = oAuthService.getConsumer(accesso...
private void sendToAuthorisePage(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Accessor accessor = oAuthService.getAccessor(request.getParameter("oauth_token"), Accessor.Type.REQUEST); Consumer consumer = oAuthService.getConsumer(access...
diff --git a/src/bbarm/viewtest/view/ArcView.java b/src/bbarm/viewtest/view/ArcView.java index 5f5bfa1..94aa31c 100644 --- a/src/bbarm/viewtest/view/ArcView.java +++ b/src/bbarm/viewtest/view/ArcView.java @@ -1,180 +1,181 @@ package bbarm.viewtest.view; import android.content.Context; import android.graphics.Canva...
false
true
public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: float x = event.getX(); float y = event.getY(); float centerX = getWidth() / 2; fl...
public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: float x = event.getX(); float y = event.getY(); float centerX = getWidth() / 2; fl...
diff --git a/src/main/java/de/paymill/net/GsonAdapter.java b/src/main/java/de/paymill/net/GsonAdapter.java index d9a6121..5feaaf0 100755 --- a/src/main/java/de/paymill/net/GsonAdapter.java +++ b/src/main/java/de/paymill/net/GsonAdapter.java @@ -1,239 +1,239 @@ package de.paymill.net; import java.io.IOException; im...
true
true
protected Gson createGson() { JsonSerializer<Date> serializer = new JsonSerializer<Date>() { @Override public JsonElement serialize(Date src, Type type, JsonSerializationContext context) { return src == null ? null : new JsonPrimitive( (int) (src.getTime() / 1000)); } }; JsonDeserializer...
protected Gson createGson() { JsonSerializer<Date> serializer = new JsonSerializer<Date>() { @Override public JsonElement serialize(Date src, Type type, JsonSerializationContext context) { return src == null ? null : new JsonPrimitive( (int) (src.getTime() / 1000)); } }; JsonDeserializer...
diff --git a/src/main/java/tconstruct/weaponry/client/item/CrossbowRenderer.java b/src/main/java/tconstruct/weaponry/client/item/CrossbowRenderer.java index 587e55317..9b28e3b21 100644 --- a/src/main/java/tconstruct/weaponry/client/item/CrossbowRenderer.java +++ b/src/main/java/tconstruct/weaponry/client/item/CrossbowR...
true
true
protected void specialAnimation(ItemRenderType type, ItemStack item) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; Crossbow crossbow = (Crossbow)item.getItem(); GL11.glTranslatef(0.5f, 0.5f, 0); GL11.glScalef(0.5f, 0.5f, 0.5f); GL11.glScalef(1.5f, 1.5f, 1.5f);...
protected void specialAnimation(ItemRenderType type, ItemStack item) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; Crossbow crossbow = (Crossbow)item.getItem(); GL11.glTranslatef(0.5f, 0.5f, 0); GL11.glScalef(0.5f, 0.5f, 0.5f); GL11.glScalef(1.5f, 1.5f, 1.5f);...
diff --git a/org.xpect.ui/src/org/xpect/ui/util/TestDataUIUtil.java b/org.xpect.ui/src/org/xpect/ui/util/TestDataUIUtil.java index 6d48eba..66322c7 100644 --- a/org.xpect.ui/src/org/xpect/ui/util/TestDataUIUtil.java +++ b/org.xpect.ui/src/org/xpect/ui/util/TestDataUIUtil.java @@ -1,113 +1,120 @@ package org.xpect.ui.u...
true
true
public static TestElementInfo parse(ITestElement element) { TestElementInfo result = new TestElementInfo(); result.javaProject = element.getTestRunSession().getLaunchedProject(); String project = result.javaProject.getProject().getName(); if (element instanceof ITestCaseElement) { ITestCaseElement tce = (IT...
public static TestElementInfo parse(ITestElement element) { TestElementInfo result = new TestElementInfo(); result.javaProject = element.getTestRunSession().getLaunchedProject(); String project = result.javaProject.getProject().getName(); if (element instanceof ITestCaseElement) { ITestCaseElement tce = (IT...
diff --git a/src/me/libraryaddict/Hungergames/Listeners/PlayerListener.java b/src/me/libraryaddict/Hungergames/Listeners/PlayerListener.java index 9686e0b..79a9869 100644 --- a/src/me/libraryaddict/Hungergames/Listeners/PlayerListener.java +++ b/src/me/libraryaddict/Hungergames/Listeners/PlayerListener.java @@ -1,394 +...
true
true
public void onInteract(PlayerInteractEvent event) { Player p = event.getPlayer(); Gamer gamer = pm.getGamer(p); if (!gamer.canInteract()) { event.setCancelled(true); /* * if (event.getAction() == Action.RIGHT_CLICK_BLOCK && * event.getClicked...
public void onInteract(PlayerInteractEvent event) { Player p = event.getPlayer(); Gamer gamer = pm.getGamer(p); if (!gamer.canInteract()) { event.setCancelled(true); /* * if (event.getAction() == Action.RIGHT_CLICK_BLOCK && * event.getClicked...
diff --git a/src/quill/quack/QuackLoader.java b/src/quill/quack/QuackLoader.java index a8c0b38..77d6762 100644 --- a/src/quill/quack/QuackLoader.java +++ b/src/quill/quack/QuackLoader.java @@ -1,523 +1,523 @@ /* * Quill and Parchment, a WYSIWYN document editor and rendering engine. * * Copyright © 2008-2010 Ope...
true
true
private void processBlock(Block block) { Extract entire; int i; start = true; chain = new TextChain(); attribute = null; if (block instanceof TextElement) { preserve = false; if (segment instanceof NormalSegment) { entire = se...
private void processBlock(Block block) { Extract entire; int i; start = true; chain = new TextChain(); attribute = null; if (block instanceof TextElement) { preserve = false; if (segment instanceof NormalSegment) { entire = se...
diff --git a/javasrc/src/org/ccnx/ccn/impl/repo/RepositoryInterestHandler.java b/javasrc/src/org/ccnx/ccn/impl/repo/RepositoryInterestHandler.java index 0e1e0d0ad..268b5bc9c 100644 --- a/javasrc/src/org/ccnx/ccn/impl/repo/RepositoryInterestHandler.java +++ b/javasrc/src/org/ccnx/ccn/impl/repo/RepositoryInterestHandler....
true
true
private void startWriteChecked(Interest interest, int pos) { if (isDuplicateRequest(interest)) return; if (isWriteSuspended(interest)) return; try { Log.finer(Log.FAC_REPO, "Repo checked write request: {0}", interest.name()); ContentName orig = interest.name(); if (pos+3 >= orig.count()) { Log.w...
private void startWriteChecked(Interest interest, int pos) { if (isDuplicateRequest(interest)) return; if (isWriteSuspended(interest)) return; try { Log.finer(Log.FAC_REPO, "Repo checked write request: {0}", interest.name()); ContentName orig = interest.name(); if (pos+3 >= orig.count()) { Log.w...
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java b/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java index 5bda287bf..269cf4c71 100644 --- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java +++ b/jetty-nosql/src/test/j...
true
true
public SessionIdManager newSessionIdManager() { if ( _idManager != null ) { try { _idManager.stop(); } catch (Exception e) { e.printStackTrace(); } _idManager.setScave...
public SessionIdManager newSessionIdManager(String config) { if ( _idManager != null ) { try { _idManager.stop(); } catch (Exception e) { e.printStackTrace(); } _idMan...
diff --git a/module-api/src/test/java/org/xbrlapi/fragment/tests/EntityTestCase.java b/module-api/src/test/java/org/xbrlapi/fragment/tests/EntityTestCase.java index 3ab09984..d1b36f8f 100644 --- a/module-api/src/test/java/org/xbrlapi/fragment/tests/EntityTestCase.java +++ b/module-api/src/test/java/org/xbrlapi/fragment...
true
true
public void testGetSchemeAndValue() { try { List<Entity> entities = store.<Entity>getXMLResources("Entity"); assertTrue(entities.size() > 0); for (Entity entity: entities) { assertEquals("www.dnb.com", entity.getIdentifierScheme()); assertEqu...
public void testGetSchemeAndValue() { try { List<Entity> entities = store.<Entity>getXMLResources("Entity"); assertTrue(entities.size() > 0); for (Entity entity: entities) { assertEquals("www.dnb.com", entity.getIdentifierScheme().toString()); ...
diff --git a/src/eu/cassandra/sim/Simulation.java b/src/eu/cassandra/sim/Simulation.java index c09f4d6..5460ff8 100644 --- a/src/eu/cassandra/sim/Simulation.java +++ b/src/eu/cassandra/sim/Simulation.java @@ -1,832 +1,833 @@ /* Copyright 2011-2013 The Cassandra Consortium (cassandra-fp7.eu) Licensed under...
true
true
public void run () { DBObject query = new BasicDBObject(); query.put("_id", new ObjectId(dbname)); DBObject objRun = DBConn.getConn().getCollection(MongoRuns.COL_RUNS).findOne(query); try { System.out.println("Run " + dbname + " started @ " + Calendar.getInstance().getTimeInMillis()); calculate...
public void run () { DBObject query = new BasicDBObject(); query.put("_id", new ObjectId(dbname)); DBObject objRun = DBConn.getConn().getCollection(MongoRuns.COL_RUNS).findOne(query); try { System.out.println("Run " + dbname + " started @ " + Calendar.getInstance().getTimeInMillis()); calculate...
diff --git a/src/me/desht/util/PermissionsUtils.java b/src/me/desht/util/PermissionsUtils.java index 8e03a1c..13ce911 100644 --- a/src/me/desht/util/PermissionsUtils.java +++ b/src/me/desht/util/PermissionsUtils.java @@ -1,327 +1,327 @@ package me.desht.util; import java.util.ArrayList; import java.util.Arrays; i...
false
true
public static List<String> getPermissionNodes(String playerName, World w) { if (w == null) w = Bukkit.getServer().getWorlds().get(0); System.out.println("get nodes " + playerName); List<String> res = null; if (permissionsBukkit != null) { System.out.println("permissions bukkit get nodes"); Map<String,...
public static List<String> getPermissionNodes(String playerName, World w) { if (w == null) w = Bukkit.getServer().getWorlds().get(0); System.out.println("get nodes " + playerName); List<String> res = new ArrayList<String>(); if (permissionsBukkit != null) { System.out.println("permissions bukkit get node...
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowVersionsHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowVersionsHandler.java index 8a9ce037..2fdb9974 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowVersio...
true
true
public Object execute(ExecutionEvent event) throws ExecutionException { boolean compareMode = Boolean.TRUE.toString().equals( event.getParameter(HistoryViewCommands.COMPARE_MODE_PARAM)); IStructuredSelection selection = getSelection(getPage()); if (selection.size() < 1) return null; Object input = getPa...
public Object execute(ExecutionEvent event) throws ExecutionException { boolean compareMode = Boolean.TRUE.toString().equals( event.getParameter(HistoryViewCommands.COMPARE_MODE_PARAM)); IStructuredSelection selection = getSelection(getPage()); if (selection.size() < 1) return null; Object input = getPa...
diff --git a/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java b/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java index f85cfad9..9b78c9a2 100644 --- a/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java +++ b/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.ja...
true
true
public boolean visit(UnifiedTreeNode node) throws CoreException { Policy.checkCanceled(monitor); try { Resource target = (Resource) node.getResource(); int targetType = target.getType(); if (targetType == IResource.PROJECT) return true; if (node.existsInWorkspace() && node.existsInFileSystem()) { /* for...
public boolean visit(UnifiedTreeNode node) throws CoreException { Policy.checkCanceled(monitor); try { Resource target = (Resource) node.getResource(); int targetType = target.getType(); if (targetType == IResource.PROJECT) return true; if (node.existsInWorkspace() && node.existsInFileSystem()) { /* for...
diff --git a/src/com/judoguys/bukkit/gps/GPS.java b/src/com/judoguys/bukkit/gps/GPS.java index d2697be..e5c9077 100644 --- a/src/com/judoguys/bukkit/gps/GPS.java +++ b/src/com/judoguys/bukkit/gps/GPS.java @@ -1,249 +1,249 @@ package com.judoguys.bukkit.gps; /** * Copyright (C) 2011 William Bowers <http://william...
true
true
public boolean onCommand (CommandSender sender, Command cmd, String label, String[] args) { String name = cmd.getName(); if (name.equalsIgnoreCase(COMMAND_NAME)) { if (!(sender instanceof Player)) { MessageUtils.sendError(sender, "GPS can only be used in game"); return true; } try { ...
public boolean onCommand (CommandSender sender, Command cmd, String label, String[] args) { String name = cmd.getName(); if (name.equalsIgnoreCase(COMMAND_NAME)) { if (!(sender instanceof Player)) { MessageUtils.sendError(sender, "GPS can only be used in game"); return true; } try { ...
diff --git a/src/examples/Example.java b/src/examples/Example.java index ea20c8d..3dfa550 100644 --- a/src/examples/Example.java +++ b/src/examples/Example.java @@ -1,95 +1,95 @@ package examples; import trains.*; public class Example { private static final class myCallbackCircuitChange implements CallbackC...
true
true
public static void main() { //trInit parameters: values by default int trainsNumber = 0; int wagonLength = 0; int waitNb = 0; int waitTime = 0; myCallbackCircuitChange mycallbackCircuit = new myCallbackCircuitChange(); myCallbackUtoDeliver mycallbackUto = new myCallbackUtoDeliver(); int paylo...
public static void main(String args[]) { //trInit parameters: values by default int trainsNumber = 0; int wagonLength = 0; int waitNb = 0; int waitTime = 0; myCallbackCircuitChange mycallbackCircuit = new myCallbackCircuitChange(); myCallbackUtoDeliver mycallbackUto = new myCallbackUtoDeliver(); ...
diff --git a/MonTransit/src/org/montrealtransit/android/api/SupportFactory.java b/MonTransit/src/org/montrealtransit/android/api/SupportFactory.java index 7832e607..ebfc359d 100755 --- a/MonTransit/src/org/montrealtransit/android/api/SupportFactory.java +++ b/MonTransit/src/org/montrealtransit/android/api/SupportFactor...
false
true
public static SupportUtil getInstance(Context context) { String className = SupportFactory.class.getPackage().getName(); int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion < Build.VERSION_CODES.CUPCAKE) { MyLog.d(TAG, "Unknow API Level: " + sdkVersion); className += ".CupcakeSupport"; // ...
public static SupportUtil getInstance(Context context) { String className = SupportFactory.class.getPackage().getName(); int sdkVersion = Integer.parseInt(Build.VERSION.SDK); if (sdkVersion < Build.VERSION_CODES.CUPCAKE) { MyLog.d(TAG, "Unknow API Level: " + sdkVersion); className += ".CupcakeSupport"; // ...
diff --git a/src/game/MovingObject.java b/src/game/MovingObject.java index df06d01..ebd66c0 100644 --- a/src/game/MovingObject.java +++ b/src/game/MovingObject.java @@ -1,108 +1,108 @@ package game; import game.gameplayStates.GamePlayState; public class MovingObject extends GameObject{ protected GamePlayState ...
false
true
protected boolean isBlocked(float x, float y, Direction dir) { switch(dir){ case UP: { int xBlock1 = ((int)x +BUFFER) / SIZE; int yBlock = (int)y / SIZE; int xBlock2 = ((int)x + SIZE-BUFFER)/SIZE; return m_game.blocked(xBlock1, yBlock)|m_game.blocked(xBlock2, yBlock); } ...
protected boolean isBlocked(float x, float y, Direction dir) { switch(dir){ case UP: { int xBlock1 = ((int)x +BUFFER) / SIZE; int yBlock = (int)y / SIZE; int xBlock2 = ((int)x + SIZE-BUFFER)/SIZE; return m_game.blocked(xBlock1, yBlock)|m_game.blocked(xBlock2, yBlock); } ...
diff --git a/src/main/java/net/dandielo/citizens/trader/types/ServerTrader.java b/src/main/java/net/dandielo/citizens/trader/types/ServerTrader.java index 696efb4..9a86400 100644 --- a/src/main/java/net/dandielo/citizens/trader/types/ServerTrader.java +++ b/src/main/java/net/dandielo/citizens/trader/types/ServerTrader....
false
true
public void managerMode(InventoryClickEvent event) { boolean top = event.getView().convertSlot(event.getRawSlot()) == event.getRawSlot(); int slot = event.getSlot(); // System.out.print(this.getTraderStatus().name()); if ( slot < 0 ) { event.setCursor(null); switchInventory(getBasicManageModeByWool(...
public void managerMode(InventoryClickEvent event) { boolean top = event.getView().convertSlot(event.getRawSlot()) == event.getRawSlot(); int slot = event.getSlot(); // System.out.print(this.getTraderStatus().name()); if ( slot < 0 ) { event.setCursor(null); switchInventory(getBasicManageModeByWool(...
diff --git a/qcadoo-model/src/main/java/com/qcadoo/model/internal/NumberServiceImpl.java b/qcadoo-model/src/main/java/com/qcadoo/model/internal/NumberServiceImpl.java index 3ab41551d..8c01ce0e7 100644 --- a/qcadoo-model/src/main/java/com/qcadoo/model/internal/NumberServiceImpl.java +++ b/qcadoo-model/src/main/java/com/...
true
true
public DecimalFormat getDecimalFormat(final Locale locale) { if (decimalFormat == null) { decimalFormat = (DecimalFormat) DecimalFormat.getInstance(locale); decimalFormat.setMaximumFractionDigits(3); decimalFormat.setMinimumFractionDigits(3); } return deci...
public synchronized DecimalFormat getDecimalFormat(final Locale locale) { if (decimalFormat == null) { decimalFormat = (DecimalFormat) DecimalFormat.getInstance(locale); decimalFormat.setMaximumFractionDigits(3); decimalFormat.setMinimumFractionDigits(3); } ...
diff --git a/poem-jvm/src/java/org/b3mn/poem/handler/NewModelHandler.java b/poem-jvm/src/java/org/b3mn/poem/handler/NewModelHandler.java index e69d2f13..9a282531 100644 --- a/poem-jvm/src/java/org/b3mn/poem/handler/NewModelHandler.java +++ b/poem-jvm/src/java/org/b3mn/poem/handler/NewModelHandler.java @@ -1,84 +1,84 @@...
false
true
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException { // Check whether the user is public if (subject.getUri().equals(getPublicUser())) { response.getWriter().println("The public user is not allowed to create new models. Please lo...
public void doPost(HttpServletRequest request, HttpServletResponse response, Identity subject, Identity object) throws IOException { // Check whether the user is public if (subject.getUri().equals(getPublicUser())) { response.getWriter().println("The public user is not allowed to create new models. Please lo...
diff --git a/src/main/java/me/arno/blocklog/schedules/UpdatesSchedule.java b/src/main/java/me/arno/blocklog/schedules/UpdatesSchedule.java index 08e148b..d8c763a 100644 --- a/src/main/java/me/arno/blocklog/schedules/UpdatesSchedule.java +++ b/src/main/java/me/arno/blocklog/schedules/UpdatesSchedule.java @@ -1,56 +1,66 ...
true
true
public void run() { try { URL url = new URL("http://dev.bukkit.org/server-mods/block-log/files.rss"); Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(url.openConnection().getInputStream()); doc.getDocumentElement().normalize(); NodeList node...
public void run() { try { URL url = new URL("http://dev.bukkit.org/server-mods/block-log/files.rss"); Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(url.openConnection().getInputStream()); doc.getDocumentElement().normalize(); NodeList node...
diff --git a/src/com/tulskiy/musique/gui/playlist/ProgressDialog.java b/src/com/tulskiy/musique/gui/playlist/ProgressDialog.java index 1d69fa8..4bac93f 100644 --- a/src/com/tulskiy/musique/gui/playlist/ProgressDialog.java +++ b/src/com/tulskiy/musique/gui/playlist/ProgressDialog.java @@ -1,130 +1,132 @@ /* * Copyrig...
true
true
public void addFiles(final Playlist playlist, final File[] files) { Thread t = new Thread(new Runnable() { @Override public void run() { stopLoading = false; progress.setIndeterminate(true); LinkedList<File> list = new LinkedList<File>(...
public void addFiles(final Playlist playlist, final File[] files) { Thread t = new Thread(new Runnable() { @Override public void run() { stopLoading = false; progress.setIndeterminate(true); LinkedList<File> list = new LinkedList<File>(...
diff --git a/src/org/osgcc/osgcc5/soapydroid/levels/LevelData.java b/src/org/osgcc/osgcc5/soapydroid/levels/LevelData.java index 9d5b77b..16949f3 100644 --- a/src/org/osgcc/osgcc5/soapydroid/levels/LevelData.java +++ b/src/org/osgcc/osgcc5/soapydroid/levels/LevelData.java @@ -1,73 +1,77 @@ package org.osgcc.osgcc5.soa...
false
true
public void initializeLists(int level) { int numberOfThings = scanner.nextInt(); CollidableThing[] thingsArray = new CollidableThing[numberOfThings]; String thingType = ""; for(int k = 0; k < thingsArray.length; k++ ) { thingType = scanner.next(); if(thingType.equals("Tree")) thingsArray[k] = ne...
public void initializeLists(int level) { int numberOfThings = scanner.nextInt(); CollidableThing[] thingsArray = new CollidableThing[numberOfThings]; String thingType = ""; for(int k = 0; k < thingsArray.length; k++ ) { thingType = scanner.next(); if(thingType.equals("Tree")) thingsArray[k] = ne...
diff --git a/java/src/org/jruby/jubilee/impl/DefaultRackEnvironment.java b/java/src/org/jruby/jubilee/impl/DefaultRackEnvironment.java index ffaaae7..1bf2a3e 100644 --- a/java/src/org/jruby/jubilee/impl/DefaultRackEnvironment.java +++ b/java/src/org/jruby/jubilee/impl/DefaultRackEnvironment.java @@ -1,99 +1,99 @@ pack...
true
true
public DefaultRackEnvironment(final Ruby runtime, final HttpServerRequest request, RackInput input, boolean isSSL) { this.runtime = runtime; // DEFAULT env = RubyHash.newHash(runtime); env.put(Const.RACK_VERSION, Const.RackVersion(runtime)); env.put(Const.RACK_ERRORS, new RubyIORackErrors(runtime...
public DefaultRackEnvironment(final Ruby runtime, final HttpServerRequest request, RackInput input, boolean isSSL) { this.runtime = runtime; // DEFAULT env = RubyHash.newHash(runtime); env.put(Const.RACK_VERSION, Const.RackVersion(runtime)); env.put(Const.RACK_ERRORS, new RubyIORackErrors(runtime...
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java index a3453f31f..8cc545e22 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter....
true
true
public void onFrame(Buffer frame) throws Exception { // System.out.println("read: " + frame.toString().substring(5).replaceAll("(..)", "$1 ")); while( frame.length > 0 ) { try { int count = protonTransport.input(frame.data, frame.offset, frame.length); fram...
public void onFrame(Buffer frame) throws Exception { // System.out.println("read: " + frame.toString().substring(5).replaceAll("(..)", "$1 ")); while( frame.length > 0 ) { try { int count = protonTransport.input(frame.data, frame.offset, frame.length); fram...
diff --git a/src/com/ensifera/animosity/craftirc/RelayedMessage.java b/src/com/ensifera/animosity/craftirc/RelayedMessage.java index ca0e4e5..c943230 100644 --- a/src/com/ensifera/animosity/craftirc/RelayedMessage.java +++ b/src/com/ensifera/animosity/craftirc/RelayedMessage.java @@ -1,199 +1,199 @@ package com.ensife...
false
true
public String getMessage(EndPoint currentTarget) { String result = template; EndPoint realTarget; //Resolve target realTarget = target; if (realTarget == null) { if (currentTarget == null) return result; realTarget = currentTarget; ...
public String getMessage(EndPoint currentTarget) { String result = template; EndPoint realTarget; //Resolve target realTarget = target; if (realTarget == null) { if (currentTarget == null) return result; realTarget = currentTarget; ...
diff --git a/java/org.ejs.coffee.core/src/org/ejs/coffee/core/sound/AlsaSoundListener.java b/java/org.ejs.coffee.core/src/org/ejs/coffee/core/sound/AlsaSoundListener.java index ec70dc982..20bcc3329 100644 --- a/java/org.ejs.coffee.core/src/org/ejs/coffee/core/sound/AlsaSoundListener.java +++ b/java/org.ejs.coffee.core/...
true
true
public synchronized void started(AudioFormat format) { if (handle != null) { if (soundFormat.equals(format)) return; stopped(); } soundQueue = new LinkedBlockingQueue<AudioChunk>(20); soundFormat = format; int pcmFormat; switch (format.getSampleSizeInBits()) { case 8: if (format.getEncod...
public synchronized void started(AudioFormat format) { if (handle != null) { if (soundFormat.equals(format)) return; stopped(); } soundQueue = new LinkedBlockingQueue<AudioChunk>(20); soundFormat = format; int pcmFormat; switch (format.getSampleSizeInBits()) { case 8: if (format.getEncod...
diff --git a/classpath/avian/Assembler.java b/classpath/avian/Assembler.java index 57cd605d..3e1eae27 100644 --- a/classpath/avian/Assembler.java +++ b/classpath/avian/Assembler.java @@ -1,116 +1,116 @@ /* Copyright (c) 2011, Avian Contributors Permission to use, copy, modify, and/or distribute this software ...
true
true
public static void writeClass(OutputStream out, List<PoolEntry> pool, int name, int super_, int[] interfaces, MethodData[] methods) throws IOException {...
public static void writeClass(OutputStream out, List<PoolEntry> pool, int name, int super_, int[] interfaces, MethodData[] methods) throws IOException {...
diff --git a/javasrc/src/org/ccnx/ccn/impl/repo/PolicyXML.java b/javasrc/src/org/ccnx/ccn/impl/repo/PolicyXML.java index a2677ecc2..80fcacaa4 100644 --- a/javasrc/src/org/ccnx/ccn/impl/repo/PolicyXML.java +++ b/javasrc/src/org/ccnx/ccn/impl/repo/PolicyXML.java @@ -1,157 +1,158 @@ package org.ccnx.ccn.impl.repo; imp...
true
true
public void decode(XMLDecoder decoder) throws ContentDecodingException { decoder.readStartElement(getElementLabel()); PolicyElement foundElement; do { foundElement = null; for (PolicyElement element : PolicyElement.values()) { if (decoder.peekStartElement(element._stringValue)) { foundElement = el...
public void decode(XMLDecoder decoder) throws ContentDecodingException { decoder.readStartElement(getElementLabel()); PolicyElement foundElement; do { foundElement = null; for (PolicyElement element : PolicyElement.values()) { if (decoder.peekStartElement(element._stringValue)) { foundElement = el...
diff --git a/example/com/opower/util/powerpool/ConnectionPoolExample.java b/example/com/opower/util/powerpool/ConnectionPoolExample.java index 8175f05..48fae75 100644 --- a/example/com/opower/util/powerpool/ConnectionPoolExample.java +++ b/example/com/opower/util/powerpool/ConnectionPoolExample.java @@ -1,60 +1,60 @@ ...
true
true
public static void main(String[] args) throws ClassNotFoundException, SQLException { SimpleConnectionPool pool = (args != null && args.length >= 4) ? SimpleConnectionPool.createDefaultPool(args[0],args[1], args[2], args[3]) : SimpleConnectionPool.createDefaultPool("org.hsqldb.jdbc.JDBCDriver"...
public static void main(String[] args) throws ClassNotFoundException, SQLException { SimpleConnectionPool pool = (args != null && args.length >= 4) ? SimpleConnectionPool.createDefaultPool(args[0],args[1], args[2], args[3]) : SimpleConnectionPool.createDefaultPool("org.hsqldb.jdbc.JDBCDriver"...
diff --git a/core/src/main/java/hudson/model/AbstractBuild.java b/core/src/main/java/hudson/model/AbstractBuild.java index ba981eb00..006a02c3e 100644 --- a/core/src/main/java/hudson/model/AbstractBuild.java +++ b/core/src/main/java/hudson/model/AbstractBuild.java @@ -1,786 +1,786 @@ /* * The MIT License * * Co...
true
true
public Result run(BuildListener listener) throws Exception { Node node = getCurrentNode(); assert builtOn==null; builtOn = node.getNodeName(); hudsonVersion = Hudson.VERSION; launcher = createLauncher(listener); if(!Hudson.getInstance().ge...
public Result run(BuildListener listener) throws Exception { Node node = getCurrentNode(); assert builtOn==null; builtOn = node.getNodeName(); hudsonVersion = Hudson.VERSION; launcher = createLauncher(listener); if(!Hudson.getInstance().ge...
diff --git a/lucene/src/test/org/apache/lucene/search/TestWildcard.java b/lucene/src/test/org/apache/lucene/search/TestWildcard.java index 56e2825e6..22f4cc52c 100644 --- a/lucene/src/test/org/apache/lucene/search/TestWildcard.java +++ b/lucene/src/test/org/apache/lucene/search/TestWildcard.java @@ -1,358 +1,360 @@ pa...
true
true
public void testParsingAndSearching() throws Exception { String field = "content"; QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, field, new MockAnalyzer()); qp.setAllowLeadingWildcard(true); String docs[] = { "\\ abcdefg1", "\\79 hijklmn1", "\\\\ opqrstu1", }; ...
public void testParsingAndSearching() throws Exception { String field = "content"; QueryParser qp = new QueryParser(TEST_VERSION_CURRENT, field, new MockAnalyzer()); qp.setAllowLeadingWildcard(true); String docs[] = { "\\ abcdefg1", "\\79 hijklmn1", "\\\\ opqrstu1", }; ...
diff --git a/SimpleClans2/src/main/java/com/p000ison/dev/simpleclans2/util/GeneralHelper.java b/SimpleClans2/src/main/java/com/p000ison/dev/simpleclans2/util/GeneralHelper.java index a8d6712..869bc90 100644 --- a/SimpleClans2/src/main/java/com/p000ison/dev/simpleclans2/util/GeneralHelper.java +++ b/SimpleClans2/src/mai...
true
true
public static boolean deleteDir(File path) { if (path == null || !path.isDirectory()) { return false; } File[] files = path.listFiles(); for (File file : path.listFiles()) { if (file.isDirectory()) { deleteDir(file); } ...
public static boolean deleteDir(File path) { if (path == null || !path.isDirectory()) { return false; } File[] files = path.listFiles(); for (File file : files) { if (file.isDirectory()) { deleteDir(file); } if (!fil...
diff --git a/src/twosnakes/TitleScreen.java b/src/twosnakes/TitleScreen.java index 13735c4..91a62d5 100644 --- a/src/twosnakes/TitleScreen.java +++ b/src/twosnakes/TitleScreen.java @@ -1,91 +1,91 @@ package twosnakes; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.WindowAdapter; impo...
false
true
public TitleScreen() { images = new BufferedImage[filenames.length]; for (int i = 0; i < filenames.length; i++) { try { images[i] = ImageIO.read(new File("Images\\" + filenames[i] + ".png")); } catch (IOException e1) { e1.printStackTrace(); } } try { backgroundImage ...
public TitleScreen() { images = new BufferedImage[filenames.length]; for (int i = 0; i < filenames.length; i++) { try { images[i] = ImageIO.read(new File("images/" + filenames[i] + ".png")); } catch (IOException e1) { e1.printStackTrace(); } } try { backgroundImage =...
diff --git a/src/bz/davide/dmxmljson/util/IntIntHashMap.java b/src/bz/davide/dmxmljson/util/IntIntHashMap.java index e326f1d..7982053 100644 --- a/src/bz/davide/dmxmljson/util/IntIntHashMap.java +++ b/src/bz/davide/dmxmljson/util/IntIntHashMap.java @@ -1,92 +1,93 @@ /* DMXmlJson - Java binding framework for xml and j...
false
true
public T put(int[] keys, T obj) { HashMap tmp = map; for (int i = 0; i < keys.length - 1; i++) { tmp = (HashMap) tmp.get(keys[i]); if (tmp == null) { HashMap newmap = new HashMap(); tmp.put(keys[i], newmap); tmp = newmap; } ...
public T put(int[] keys, T obj) { HashMap nextMap; HashMap tmp = map; for (int i = 0; i < keys.length - 1; i++) { nextMap = (HashMap) tmp.get(keys[i]); if (nextMap == null) { nextMap = new HashMap(); tmp.put(keys[i], nextMap); } ...
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetailFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetailFactory.java index d641c86ca..2855e310a 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetai...
false
true
private void loadCurrentPatchSet() throws OrmException, NoSuchEntityException, PatchSetInfoNotAvailableException, NoSuchChangeException { final PatchSet.Id psId = detail.getChange().currentPatchSetId(); final PatchSetDetailFactory loader = patchSetDetail.create(psId); loader.patchSet = detail....
private void loadCurrentPatchSet() throws OrmException, NoSuchEntityException, PatchSetInfoNotAvailableException, NoSuchChangeException { final PatchSet.Id psId = detail.getChange().currentPatchSetId(); final PatchSetDetailFactory loader = patchSetDetail.create(psId); loader.patchSet = detail....
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/generator/FileGenerator.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/generator/FileGenerator.java index f04335408..04d670bac 100644 --- a/editor/tools/plugins/com.google.dart.tools.core/s...
true
true
public void execute(IProgressMonitor monitor) throws CoreException { // Sanity Checks // Fail fast for null elements Assert.isNotNull(fileName); Assert.isNotNull(fileLocation); IStatus status = validate(); if (status.getSeverity() == IStatus.ERROR) { throw new IllegalStateException(stat...
public void execute(IProgressMonitor monitor) throws CoreException { // Sanity Checks // Fail fast for null elements Assert.isNotNull(fileName); Assert.isNotNull(fileLocation); IStatus status = validate(); if (status.getSeverity() == IStatus.ERROR) { throw new IllegalStateException(stat...
diff --git a/californium/src/main/java/ch/ethz/inf/vs/californium/network/connector/UDPConnector.java b/californium/src/main/java/ch/ethz/inf/vs/californium/network/connector/UDPConnector.java index cbbafbcb..b28b8b50 100644 --- a/californium/src/main/java/ch/ethz/inf/vs/californium/network/connector/UDPConnector.java ...
false
true
public synchronized void start() throws IOException { if (running) return; this.running = true; // if localAddr is null or port is 0, the system decides socket = new DatagramSocket(localAddr.getPort(), localAddr.getAddress()); int receiveBuffer = config.getInt( NetworkConfigDefaults.UDP_CONNECTOR_R...
public synchronized void start() throws IOException { if (running) return; this.running = true; // if localAddr is null or port is 0, the system decides socket = new DatagramSocket(localAddr.getPort(), localAddr.getAddress()); int receiveBuffer = config.getInt( NetworkConfigDefaults.UDP_CONNECTOR_R...
diff --git a/lenskit-core/src/main/java/org/grouplens/lenskit/util/TaskTimer.java b/lenskit-core/src/main/java/org/grouplens/lenskit/util/TaskTimer.java index 5486f21b9..dc749c0e2 100644 --- a/lenskit-core/src/main/java/org/grouplens/lenskit/util/TaskTimer.java +++ b/lenskit-core/src/main/java/org/grouplens/lenskit/uti...
true
true
public String elapsedPretty() { long elapsed = elapsedMillis(); double secs = (elapsed % 60000) / 1000.0; long mins = elapsed / 60000; long hrs = mins / 60; StringBuilder s = new StringBuilder(); if (hrs > 0) s.append(String.format("%dh", hrs)); if...
public String elapsedPretty() { long elapsed = elapsedMillis(); double secs = (elapsed % 60000) / 1000.0; long mins = elapsed / 60000; long hrs = mins / 60; StringBuilder s = new StringBuilder(); if (hrs > 0) s.append(String.format("%dh", hrs)); if...
diff --git a/uk.ac.gda.client/src/uk/ac/gda/client/liveplot/LivePlotComposite.java b/uk.ac.gda.client/src/uk/ac/gda/client/liveplot/LivePlotComposite.java index c95761722..c73573d9d 100644 --- a/uk.ac.gda.client/src/uk/ac/gda/client/liveplot/LivePlotComposite.java +++ b/uk.ac.gda.client/src/uk/ac/gda/client/liveplot/Li...
false
true
private void createUpdatePlot(String xLabelIn, String yLabelIn, final List<LineData> xys, final List<String> invis, boolean additionalYAxes) { final String xLabel = xLabelIn != null ? xLabelIn : UNKNOWN; f...
private void createUpdatePlot(String xLabelIn, String yLabelIn, final List<LineData> xys, final List<String> invis, boolean additionalYAxes) { final String xLabel = xLabelIn != null ? xLabelIn : UNKNOWN; f...
diff --git a/src/com/google/caliper/ConsoleReport.java b/src/com/google/caliper/ConsoleReport.java index 3bd8bb3..139ab92 100644 --- a/src/com/google/caliper/ConsoleReport.java +++ b/src/com/google/caliper/ConsoleReport.java @@ -1,232 +1,238 @@ /** * Copyright (C) 2009 Google Inc. * * Licensed under the Apache L...
false
true
public ConsoleReport(Result result) { this.result = result; double minValue = Double.POSITIVE_INFINITY; double maxValue = 0; Multimap<String, String> nameToValues = LinkedHashMultimap.create(); List<Parameter> parametersBuilder = new ArrayList<Parameter>(); for (Map.Entry<Run, Double> entry ...
public ConsoleReport(Result result) { this.result = result; double minValue = Double.POSITIVE_INFINITY; double maxValue = 0; Multimap<String, String> nameToValues = LinkedHashMultimap.create(); List<Parameter> parametersBuilder = new ArrayList<Parameter>(); for (Map.Entry<Run, Double> entry ...
diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Parallel.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Parallel.java index 00cbeef16..959004ca4 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Parallel.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Parallel.java @@ -1,102 +...
false
true
@Override public void act (float delta) { int len = actions.size(); boolean allDone = true; for (int i = 0; i < len; i++) { if (!actions.get(i).isDone()) { actions.get(i).act(delta); } else { if (!finished[i]) { actions.get(i).finish(); finished[i] = true; } allDone &= finished[i]...
@Override public void act (float delta) { int len = actions.size(); boolean allDone = true; Action action; for (int i = 0; i < len; i++) { action = actions.get(i); if (!action.isDone()) { action.act(delta); allDone = false; } else { if (!finished[i]) { action.finish(); finished[i...
diff --git a/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/LiveWebConnectorTemplatesTest.java b/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/LiveWebConnectorTemplatesTest.java index c5965ea..eb94e43 100644 --- a/org.eclipse.mylyn.tests/src/org/eclipse/mylyn/tests/integration/LiveWeb...
true
true
public void testRepositoryTemplate() throws Throwable { IProgressMonitor monitor = new NullProgressMonitor(); MultiStatus queryStatus = new MultiStatus(TasksUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null); final List<AbstractTask> hits = new ArrayList<AbstractTask>(); QueryHitCollector collector = new Qu...
public void testRepositoryTemplate() throws Throwable { IProgressMonitor monitor = new NullProgressMonitor(); MultiStatus queryStatus = new MultiStatus(TasksUiPlugin.PLUGIN_ID, IStatus.OK, "Query result", null); final List<AbstractTask> hits = new ArrayList<AbstractTask>(); QueryHitCollector collector = new Qu...
diff --git a/src/main/java/org/exolab/castor/xml/schema/reader/ImportUnmarshaller.java b/src/main/java/org/exolab/castor/xml/schema/reader/ImportUnmarshaller.java index fd99f2fb..da33cead 100644 --- a/src/main/java/org/exolab/castor/xml/schema/reader/ImportUnmarshaller.java +++ b/src/main/java/org/exolab/castor/xml/sch...
true
true
public ImportUnmarshaller (Schema schema, AttributeSet atts, Resolver resolver, URIResolver uriResolver, Locator locator, SchemaUnmarshallerState state) throws XMLException { super(); setResolver(resolver); setURIResolver(uriResolver); URILocation uri = null; ...
public ImportUnmarshaller (Schema schema, AttributeSet atts, Resolver resolver, URIResolver uriResolver, Locator locator, SchemaUnmarshallerState state) throws XMLException { super(); setResolver(resolver); setURIResolver(uriResolver); URILocation uri = null; ...
diff --git a/src/main/java/de/hydrox/bukkit/DroxPerms/data/flatfile/User.java b/src/main/java/de/hydrox/bukkit/DroxPerms/data/flatfile/User.java index 091522c..c4b191b 100644 --- a/src/main/java/de/hydrox/bukkit/DroxPerms/data/flatfile/User.java +++ b/src/main/java/de/hydrox/bukkit/DroxPerms/data/flatfile/User.java @@ ...
true
true
public User(String name, ConfigurationNode node) { this.name = name; System.out.println("users" + node.getKeys().toString()); System.out.println("users.subgroups" + node.getStringList("subgroups", new ArrayList<String>())); this.subgroups = (ArrayList<String>) node.getStringList("subgroups", new ArrayList<Stri...
public User(String name, ConfigurationNode node) { this.name = name; this.group = node.getString("group"); System.out.println("users" + node.getKeys().toString()); System.out.println("users.subgroups" + node.getStringList("subgroups", new ArrayList<String>())); this.subgroups = (ArrayList<String>) node.getSt...
diff --git a/framework/src/com/phonegap/DroidGap.java b/framework/src/com/phonegap/DroidGap.java index 5817c25c..956b4d61 100755 --- a/framework/src/com/phonegap/DroidGap.java +++ b/framework/src/com/phonegap/DroidGap.java @@ -1,1775 +1,1779 @@ /* * PhoneGap is available under *either* the terms of the modified BSD ...
false
true
public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) { //throws android.content.ActivityNotFoundException { LOG.d(TAG, "showWebPage(%s, %b, %b, HashMap", url, openExternal, clearHistory); // If clearing history if (clearHist...
public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) { //throws android.content.ActivityNotFoundException { LOG.d(TAG, "showWebPage(%s, %b, %b, HashMap", url, openExternal, clearHistory); // If clearing history if (clearHist...
diff --git a/src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java b/src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java index c94eb06..9da94b8 100644 --- a/src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java +++ b/src/main...
false
true
public void onCompleted(AbstractBuild<?,?> build, TaskListener listener) { // this is not terribly efficient, for(AbstractProject<?,?> j : Hudson.getInstance().getAllItems(AbstractProject.class)) { JobPropertyImpl p = j.getProperty(JobPropertyImpl.class); ...
public void onCompleted(AbstractBuild<?,?> build, TaskListener listener) { // this is not terribly efficient, for(AbstractProject<?,?> j : Hudson.getInstance().getAllItems(AbstractProject.class)) { JobPropertyImpl p = j.getProperty(JobPropertyImpl.class); ...
diff --git a/src/com/app/getconnected/activities/RateRideActivity.java b/src/com/app/getconnected/activities/RateRideActivity.java index 15222de..1b8b81f 100644 --- a/src/com/app/getconnected/activities/RateRideActivity.java +++ b/src/com/app/getconnected/activities/RateRideActivity.java @@ -1,60 +1,60 @@ package com....
true
true
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_rate_ride); // TODO find out why initLayout crashes // initLayout(R.string.title_activity_rate_ride, true, false, false, // false); rideId = getIntent().getStringExtra("rideId"); ride...
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_rate_ride); // TODO find out why initLayout crashes initLayout(R.string.title_activity_rate_ride, true, true, true, false); rideId = getIntent().getStringExtra("rideId"); rideRating...