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/app/controllers/Application.java b/src/app/controllers/Application.java index ae574e8..ed29cd9 100644 --- a/src/app/controllers/Application.java +++ b/src/app/controllers/Application.java @@ -1,53 +1,53 @@ package controllers; import java.util.List; import models.Handshake; import models.Handsh...
false
true
public static void index() { int recentUserCount =5; int recentHandshakeCount = 5; List<User> newUsers = User.getNewUsers(recentUserCount); List<Handshake> newHandshakes = Handshake.find("(status='ACCEPTED' or status='STARTED' or status='DONE') order by creationDate desc").fetch(recentHandshake...
public static void index() { int recentUserCount =5; int recentHandshakeCount = 5; List<User> newUsers = User.getNewUsers(recentUserCount); //List<Handshake> newHandshakes = Handshake.find("(status='ACCEPTED' or status='STARTED' or status='DONE') order by creationDate desc").fetch(recentHandsha...
diff --git a/src/edu/jhu/thrax/util/amazon/AmazonConfigFileLoader.java b/src/edu/jhu/thrax/util/amazon/AmazonConfigFileLoader.java index 157d088..29e4a8e 100644 --- a/src/edu/jhu/thrax/util/amazon/AmazonConfigFileLoader.java +++ b/src/edu/jhu/thrax/util/amazon/AmazonConfigFileLoader.java @@ -1,31 +1,31 @@ package edu....
true
true
public static InputStream getConfigStream(URI configURI) throws IOException { InputStream resStream = AmazonConfigFileLoader.class.getResourceAsStream(CRED_PROPS); if (resStream == null) { resStream = AmazonConfigFileLoader.class.getResourceAsStream("/" + CRED_PROPS); } if (resStream == null) ...
public static InputStream getConfigStream(URI configURI) throws IOException { InputStream resStream = AmazonConfigFileLoader.class.getResourceAsStream(CRED_PROPS); if (resStream == null) { resStream = AmazonConfigFileLoader.class.getResourceAsStream("/" + CRED_PROPS); } if (resStream == null) ...
diff --git a/src/main/java/org/encog/neural/networks/structure/NeuralStructure.java b/src/main/java/org/encog/neural/networks/structure/NeuralStructure.java index 2681b2387..33557280d 100644 --- a/src/main/java/org/encog/neural/networks/structure/NeuralStructure.java +++ b/src/main/java/org/encog/neural/networks/struct...
false
true
public void finalizeStructure() { if( this.layers.size()<2 ) { throw new NeuralNetworkError("There must be at least two layers before the structure is finalized."); } FlatLayer[] flatLayers = new FlatLayer[this.layers.size()]; for(int i=0;i<this.layers.size();i++) { BasicLayer layer = (BasicLa...
public void finalizeStructure() { if( this.layers.size()<2 ) { throw new NeuralNetworkError("There must be at least two layers before the structure is finalized."); } FlatLayer[] flatLayers = new FlatLayer[this.layers.size()]; for(int i=0;i<this.layers.size();i++) { BasicLayer layer = (BasicLa...
diff --git a/OpERP/src/main/java/devopsdistilled/operp/client/party/panes/CreateVendorPane.java b/OpERP/src/main/java/devopsdistilled/operp/client/party/panes/CreateVendorPane.java index 273c2293..0757c885 100644 --- a/OpERP/src/main/java/devopsdistilled/operp/client/party/panes/CreateVendorPane.java +++ b/OpERP/src/ma...
true
true
public CreateVendorPane() { pane = new JPanel(); pane.setLayout(new MigLayout("", "[][grow]", "[][][grow][]")); JLabel lblVendorName = new JLabel("Vendor Name"); pane.add(lblVendorName, "cell 0 0,alignx trailing"); nameField = new JTextField(); pane.add(nameField, "cell 1 0,growx"); nameField.setColumn...
public CreateVendorPane() { pane = new JPanel(); pane.setLayout(new MigLayout("", "[][grow]", "[][][][]")); JLabel lblVendorName = new JLabel("Vendor Name"); pane.add(lblVendorName, "cell 0 0,alignx trailing"); nameField = new JTextField(); pane.add(nameField, "cell 1 0,growx"); nameField.setColumns(10...
diff --git a/src/purejavacomm/testsuite/Test2.java b/src/purejavacomm/testsuite/Test2.java index da4264e..af8111c 100644 --- a/src/purejavacomm/testsuite/Test2.java +++ b/src/purejavacomm/testsuite/Test2.java @@ -1,158 +1,158 @@ /* * Copyright (c) 2011, Kustaa Nyholm / SpareTimeLabs * All rights reserved. * * ...
true
true
static void run() throws Exception { try { m_Done = false; rnd = new Random(); m_BytesReceived = 0; m_TotalReceived = 0; m_TxCount = 0; m_RxCount = 0; m_ErrorCount = 0; begin("Test2 - tx/rx with event listener"); openPort(); m_Port.notifyOnDataAvailable(true); m_Port.notifyOnOutputE...
static void run() throws Exception { try { m_Done = false; rnd = new Random(); m_BytesReceived = 0; m_TotalReceived = 0; m_TxCount = 0; m_RxCount = 0; m_ErrorCount = 0; begin("Test2 - tx/rx with event listener"); openPort(); m_Port.notifyOnDataAvailable(true); m_Port.notifyOnOutputE...
diff --git a/shivas-data/src/main/java/org/shivas/data/loader/XmlLoader.java b/shivas-data/src/main/java/org/shivas/data/loader/XmlLoader.java index 999bb7d..cecea19 100644 --- a/shivas-data/src/main/java/org/shivas/data/loader/XmlLoader.java +++ b/shivas-data/src/main/java/org/shivas/data/loader/XmlLoader.java @@ -1,1...
true
true
private void loadBreed(BaseRepository<Breed> repo, File file) throws Exception { Document doc = builder.build(file); Element root = doc.getDescendants(new ElementFilter("breeds")).next(); for (Element element : root.getChildren("breed")) { Breed breed = factory.newBreed(); breed.setId(element.getAttr...
private void loadBreed(BaseRepository<Breed> repo, File file) throws Exception { Document doc = builder.build(file); Element root = doc.getDescendants(new ElementFilter("breeds")).next(); for (Element element : root.getChildren("breed")) { Breed breed = factory.newBreed(); breed.setId(element.getAttr...
diff --git a/org.caleydo.view.datagraph/src/org/caleydo/view/datagraph/bandlayout/SimpleEdgeRoutingStrategy.java b/org.caleydo.view.datagraph/src/org/caleydo/view/datagraph/bandlayout/SimpleEdgeRoutingStrategy.java index b1a13665e..2a7d7f117 100644 --- a/org.caleydo.view.datagraph/src/org/caleydo/view/datagraph/bandlay...
false
true
public void createEdge(List<Point2D> edgePoints) { if (edgePoints == null || edgePoints.size() < 2) return; Map<Point2D, IDataGraphNode> pointsOnBoundingBoxes = new HashMap<Point2D, IDataGraphNode>(); for (int i = 1; i < edgePoints.size(); i++) { Point2D point1 = edgePoints.get(i - 1); Point2D point2 ...
public void createEdge(List<Point2D> edgePoints) { if (edgePoints == null || edgePoints.size() < 2) return; Map<Point2D, IDataGraphNode> pointsOnBoundingBoxes = new HashMap<Point2D, IDataGraphNode>(); for (int i = 1; i < edgePoints.size(); i++) { Point2D point1 = edgePoints.get(i - 1); Point2D point2 ...
diff --git a/Npr/src/org/npr/android/news/StationDetailsActivity.java b/Npr/src/org/npr/android/news/StationDetailsActivity.java index 0534733..0f5aa90 100644 --- a/Npr/src/org/npr/android/news/StationDetailsActivity.java +++ b/Npr/src/org/npr/android/news/StationDetailsActivity.java @@ -1,223 +1,227 @@ // Copyright 2...
true
true
private void constructList() { int[] topLevel = new int[] { R.string.msg_station_streams, R.string.msg_station_podcasts }; List<AudioStream> streams = station.getAudioStreams(); List<Podcast> podcasts = station.getPodcasts(); int groupLayout = android.R.layout.simple_expandable_list_item_1; ...
private void constructList() { int[] topLevel = new int[] { R.string.msg_station_streams, R.string.msg_station_podcasts }; List<AudioStream> streams = station.getAudioStreams(); List<Podcast> podcasts = station.getPodcasts(); int groupLayout = android.R.layout.simple_expandable_list_item_1; ...
diff --git a/mycellar-java/mycellar-domain/src/main/java/fr/peralta/mycellar/domain/booking/comparator/BookingBottlePositionComparator.java b/mycellar-java/mycellar-domain/src/main/java/fr/peralta/mycellar/domain/booking/comparator/BookingBottlePositionComparator.java index 4664b423..7e7e6bf5 100644 --- a/mycellar-java...
true
true
public int compare(BookingBottle o1, BookingBottle o2) { if ((o1 == null) && (o2 == null)) { return 0; } if ((o1 != null) && (o2 == null)) { return -1; } if ((o1 == null) && (o2 != null)) { return 1; } return o1.getPosition(...
public int compare(BookingBottle o1, BookingBottle o2) { if ((o1 == null) && (o2 == null)) { return 0; } if ((o1 != null) && (o2 == null)) { return -1; } if ((o1 == null) && (o2 != null)) { return 1; } if (o1 == o2) { ...
diff --git a/scm-issue-check/src/test/java/dk/fujitsu/issuecheck/ShellTest.java b/scm-issue-check/src/test/java/dk/fujitsu/issuecheck/ShellTest.java index cacdff5..c0c9f02 100644 --- a/scm-issue-check/src/test/java/dk/fujitsu/issuecheck/ShellTest.java +++ b/scm-issue-check/src/test/java/dk/fujitsu/issuecheck/ShellTest....
true
true
private String[] getArguments(String... arguments) throws Exception { String[] args; if (System.getenv().containsKey("windir")) { args = new String[2 + arguments.length]; args[0] = System.getenv("windir") + "\\system32\\cmd.exe"; args[1] = "/C"; Syst...
private String[] getArguments(String... arguments) throws Exception { String[] args; if (System.getenv().containsKey("windir")) { args = new String[2 + arguments.length]; args[0] = System.getenv("windir") + "\\system32\\cmd.exe"; args[1] = "/C"; Syst...
diff --git a/server/src/de/hpi/bpmn2execpn/converter/ExecConverter.java b/server/src/de/hpi/bpmn2execpn/converter/ExecConverter.java index 6d7dab03..acb9847c 100644 --- a/server/src/de/hpi/bpmn2execpn/converter/ExecConverter.java +++ b/server/src/de/hpi/bpmn2execpn/converter/ExecConverter.java @@ -1,626 +1,626 @@ pack...
false
true
protected void handleTask(PetriNet net, Task task, ConversionContext c) { ExecTask exTask = new ExecTask(); exTask.setId(task.getId()); exTask.setLabel(task.getLabel()); // create proper model, form and bindings String model = null; String form = null; String bindings = null; DocumentBuilderFactory ...
protected void handleTask(PetriNet net, Task task, ConversionContext c) { ExecTask exTask = new ExecTask(); exTask.setId(task.getId()); exTask.setLabel(task.getLabel()); // create proper model, form and bindings String model = null; String form = null; String bindings = null; DocumentBuilderFactory ...
diff --git a/src/smartpool/web/form/CreateCarpoolFormValidator.java b/src/smartpool/web/form/CreateCarpoolFormValidator.java index f6a4e5a..dc1060e 100644 --- a/src/smartpool/web/form/CreateCarpoolFormValidator.java +++ b/src/smartpool/web/form/CreateCarpoolFormValidator.java @@ -1,55 +1,57 @@ package smartpool.web.fo...
true
true
public void validate(Object target, Errors errors) { CreateCarpoolForm form = (CreateCarpoolForm) target; if(form.from == null || form.from.trim().isEmpty() || form.from.equals("")) errors.rejectValue("from", Constants.FIELD_REQUIRED); if(form.to == null || form.to.trim().isEmpty() || form....
public void validate(Object target, Errors errors) { CreateCarpoolForm form = (CreateCarpoolForm) target; if(form.from == null || form.from.equals("")) errors.rejectValue("from", Constants.FIELD_REQUIRED); else if (form.from.trim().isEmpty())errors.rejectValue("from",Constants.FIELD_INVALID...
diff --git a/src/edu/agh/tunev/model/cellular/Model.java b/src/edu/agh/tunev/model/cellular/Model.java index a388270..27a18f7 100644 --- a/src/edu/agh/tunev/model/cellular/Model.java +++ b/src/edu/agh/tunev/model/cellular/Model.java @@ -1,118 +1,121 @@ package edu.agh.tunev.model.cellular; import java.util.Vector; ...
false
true
public void simulate(double duration, Vector<PersonProfile> profiles, ProgressCallback progressCallback, AddCallback addCallback) { // stwórz automat (planszę komórek) board = new Board(world); //TODO: exception handling try { allowedConfigs = new AllowedConfigs(PersonProfile.WIDTH, PersonProfil...
public void simulate(double duration, Vector<PersonProfile> profiles, ProgressCallback progressCallback, AddCallback addCallback) { // pokaż info o inicjalizacji w ui, bo trwa zanim zacznie iterować i nie // wiadomo ocb :b int num = (int) Math.round(Math.ceil(world.getDuration() / DT)); progressCallback.upd...
diff --git a/kangaroo/src/com/kangaroo/task/TaskLibrary.java b/kangaroo/src/com/kangaroo/task/TaskLibrary.java index a1fc3b8..4391550 100644 --- a/kangaroo/src/com/kangaroo/task/TaskLibrary.java +++ b/kangaroo/src/com/kangaroo/task/TaskLibrary.java @@ -1,103 +1,103 @@ package com.kangaroo.task; import java.util.Arr...
false
true
public int addTask(Task myTask) { CalendarEvent temp = getEventForTask(myTask); if(temp.getId().equalsIgnoreCase("")) { //no id set cl.insertEventToBackend(temp); } else { //id is set cl.updateEventInBackend(temp); } return 0; }
public int addTask(Task myTask) { CalendarEvent temp = getEventForTask(myTask); //if(temp.getId().equalsIgnoreCase("")) //{ //no id set cl.insertEventToBackend(temp); //} //else //{ //id is set // cl.updateEventInBackend(temp); //} return 0; }
diff --git a/src/main/java/org/vivoweb/harvester/update/ChangeNamespace.java b/src/main/java/org/vivoweb/harvester/update/ChangeNamespace.java index 83a969ea..e026bb6f 100644 --- a/src/main/java/org/vivoweb/harvester/update/ChangeNamespace.java +++ b/src/main/java/org/vivoweb/harvester/update/ChangeNamespace.java @@ -1...
false
true
public static List<String> getMatchingURIs(Resource current, String namespace, List<Property> properties, JenaConnect vivo) { StringBuilder sbQuery = new StringBuilder(); ArrayList<String> filters = new ArrayList<String>(); int valueCount = 0; sbQuery.append("SELECT ?uri\nWHERE\n{"); for(Property p : propert...
public static List<String> getMatchingURIs(Resource current, String namespace, List<Property> properties, JenaConnect vivo) { StringBuilder sbQuery = new StringBuilder(); ArrayList<String> filters = new ArrayList<String>(); int valueCount = 0; sbQuery.append("SELECT ?uri\nWHERE\n{"); for(Property p : propert...
diff --git a/AuctionHouse/src/webServer/messages/LoginResponse.java b/AuctionHouse/src/webServer/messages/LoginResponse.java index 851b68d..b4b01fe 100644 --- a/AuctionHouse/src/webServer/messages/LoginResponse.java +++ b/AuctionHouse/src/webServer/messages/LoginResponse.java @@ -1,18 +1,18 @@ package webServer.messag...
true
true
private LoginResponse(UserProfile profile) { this.profile = profile; }
public LoginResponse(UserProfile profile) { this.profile = profile; }
diff --git a/src/java/nextgen/core/scripture/AddEndRNASeqToScripture.java b/src/java/nextgen/core/scripture/AddEndRNASeqToScripture.java index 1294f2a..42a9375 100644 --- a/src/java/nextgen/core/scripture/AddEndRNASeqToScripture.java +++ b/src/java/nextgen/core/scripture/AddEndRNASeqToScripture.java @@ -1,2254 +1,2271 ...
false
true
public void numberOfIsoformsPerGene(String outputName,File fullBam) throws IOException{ IsoformMap isoformMap = buildIsoformMap(annotations); BufferedWriter bw = new BufferedWriter(new FileWriter(outputName+".isoforms.info")); BufferedWriter bwCov = new BufferedWriter(new FileWriter(outputName+".isoforms.c...
public void numberOfIsoformsPerGene(String outputName,File fullBam) throws IOException{ IsoformMap isoformMap = buildIsoformMap(annotations); BufferedWriter bw = new BufferedWriter(new FileWriter(outputName+".isoforms.info")); BufferedWriter bwCov = new BufferedWriter(new FileWriter(outputName+".isoforms.c...
diff --git a/app/controllers/Payments.java b/app/controllers/Payments.java index f79c946..6b4cc46 100644 --- a/app/controllers/Payments.java +++ b/app/controllers/Payments.java @@ -1,188 +1,189 @@ package controllers; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.H...
false
true
public static void show(Long userId) { validation.required(userId); if(!validate(userId)) return; //TODO(dschlyter) This operation is pretty expensive, but premature optimization is the root of all evil etc // Opt Idea 1: Cache result and invalidate on new receipt with user involved // Opt Idea 2: Cache r...
public static void show(Long userId) { validation.required(userId); if(!validate(userId)) return; //TODO(dschlyter) This operation is pretty expensive, but premature optimization is the root of all evil etc // Opt Idea 1: Cache result and invalidate on new receipt with user involved // Opt Idea 2: Cache r...
diff --git a/src/main/java/org/perfcake/message/sender/GroovySender.java b/src/main/java/org/perfcake/message/sender/GroovySender.java index 9d9a50eb..71f0ea40 100644 --- a/src/main/java/org/perfcake/message/sender/GroovySender.java +++ b/src/main/java/org/perfcake/message/sender/GroovySender.java @@ -1,72 +1,72 @@ /*...
true
true
public String getGroovyExecutable() { if (groovyExecutable == null) { groovyExecutable = System.getenv("GROOVY_HOME") + File.separator + "groovy"; } return groovyExecutable; }
public String getGroovyExecutable() { if (groovyExecutable == null) { groovyExecutable = System.getenv("GROOVY_HOME") + File.separator + "bin" + File.separator + "groovy"; } return groovyExecutable; }
diff --git a/SublimeJava.java b/SublimeJava.java index ca47af3..48bf81a 100644 --- a/SublimeJava.java +++ b/SublimeJava.java @@ -1,671 +1,671 @@ /* Copyright (c) 2012 Fredrik Ehnbom This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any dama...
false
true
public static void main(String... unusedargs) { try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); boolean first = true; while (true) { try { if (!first) ...
public static void main(String... unusedargs) { try { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); boolean first = true; while (true) { try { if (!first) ...
diff --git a/Client/src/me/draconia/chat/client/gui/FormMain.java b/Client/src/me/draconia/chat/client/gui/FormMain.java index 9e31719..133c006 100644 --- a/Client/src/me/draconia/chat/client/gui/FormMain.java +++ b/Client/src/me/draconia/chat/client/gui/FormMain.java @@ -1,224 +1,226 @@ package me.draconia.chat.clien...
false
true
public static void main(String[] args) { try { UIManager.setLookAndFeel("com.jtattoo.plaf.noire.NoireLookAndFeel"); } catch (Exception e) { System.out.println("Unable to load look and feel"); } new FormMain(); final SSLContext sslContext; try { // Initialize the SSLContext to work with our key ...
public static void main(String[] args) { try { Class.forName("com.jtattoo.plaf.noire.NoireLookAndFeel"); UIManager.setLookAndFeel("com.jtattoo.plaf.noire.NoireLookAndFeel"); } catch (Exception e) { e.printStackTrace(); System.out.println("Unable to load look and feel"); } new FormMain(); final ...
diff --git a/src/main/java/eel/seprphase2/App.java b/src/main/java/eel/seprphase2/App.java index b18865b..c8f4559 100644 --- a/src/main/java/eel/seprphase2/App.java +++ b/src/main/java/eel/seprphase2/App.java @@ -1,13 +1,13 @@ package eel.seprphase2; /** * Hello world! * */ public class App { public s...
true
true
public static void main( String[] args ) { System.out.println( "Hello, World!" ); }
public static void main( String[] args ) { System.out.println( "Hello World!" ); }
diff --git a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/StartLevelManager.java b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/StartLevelManager.java index 5ecc3e39..96e0c209 100644 --- a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/fr...
false
true
void doSetStartLevel(int newSL) { synchronized (lock) { ClassLoader previousTCCL = Thread.currentThread().getContextClassLoader(); ClassLoader contextFinder = framework.getContextFinder(); if (contextFinder == previousTCCL) contextFinder = null; else Thread.currentThread().setContextClassLoader(c...
void doSetStartLevel(int newSL) { synchronized (lock) { ClassLoader previousTCCL = Thread.currentThread().getContextClassLoader(); ClassLoader contextFinder = framework.getContextFinder(); if (contextFinder == previousTCCL) contextFinder = null; else Thread.currentThread().setContextClassLoader(c...
diff --git a/runtimeTests/src/main/java/ch/ethz/iks/slp/test/DistributedTestActivator.java b/runtimeTests/src/main/java/ch/ethz/iks/slp/test/DistributedTestActivator.java index 6c37bd0..f647e2a 100644 --- a/runtimeTests/src/main/java/ch/ethz/iks/slp/test/DistributedTestActivator.java +++ b/runtimeTests/src/main/java/ch...
true
true
public void serviceChanged(ServiceEvent event) { if (context == null) { return; } switch (event.getType()) { case ServiceEvent.REGISTERED: ServiceReference serviceReference = event.getServiceReference(); handleServiceAdded(serviceReference); break; } if (advertiser != null && locator != null)...
public void serviceChanged(ServiceEvent event) { if (context == null) { return; } switch (event.getType()) { case ServiceEvent.REGISTERED: ServiceReference serviceReference = event.getServiceReference(); handleServiceAdded(serviceReference); break; } if (advertiser != null && locator != null)...
diff --git a/code/src/at/photoselector/ui/drawer/ListItem.java b/code/src/at/photoselector/ui/drawer/ListItem.java index 5f86031..691e25e 100644 --- a/code/src/at/photoselector/ui/drawer/ListItem.java +++ b/code/src/at/photoselector/ui/drawer/ListItem.java @@ -1,185 +1,185 @@ package at.photoselector.ui.drawer; imp...
false
true
public ListItem(final Composite parent, final DrawerDialog dialog, ControlsDialog cDialog, Photo current) { photo = current; drawerDialog = dialog; this.controlsDialog = cDialog; final Display display = parent.getDisplay(); int boundingBox = drawerDialog.getBoundingBox(); final Composite imageContai...
public ListItem(final Composite parent, final DrawerDialog dialog, ControlsDialog cDialog, Photo current) { photo = current; drawerDialog = dialog; this.controlsDialog = cDialog; final Display display = parent.getDisplay(); int boundingBox = drawerDialog.getBoundingBox(); final Composite imageContai...
diff --git a/src/group/pals/android/lib/ui/filechooser/utils/E.java b/src/group/pals/android/lib/ui/filechooser/utils/E.java index 70679ec..a07ce84 100644 --- a/src/group/pals/android/lib/ui/filechooser/utils/E.java +++ b/src/group/pals/android/lib/ui/filechooser/utils/E.java @@ -1,50 +1,50 @@ /* * Copyright 2012 ...
true
true
public static void show(Context context) { String msg = null; try { msg = String.format("Hi pal, you've found Easter egg :-)\n\n" + "%s v%s\n" + "...by hai bison\n\n" + "http://sites.google.com/site/haitimeid/\n\n" + "Hope you ...
public static void show(Context context) { String msg = null; try { msg = String.format("Hi pal, you've found Easter egg :-)\n\n" + "%s v%s\n" + "...by hai bison\n\n" + "http://sites.google.com/site/haitimeid/\n\n" + "Hope you ...
diff --git a/SpagoBIProject/src/it/eng/spagobi/tools/dataset/dao/DataSetFactory.java b/SpagoBIProject/src/it/eng/spagobi/tools/dataset/dao/DataSetFactory.java index 6118ac10c..f1ef90c6e 100644 --- a/SpagoBIProject/src/it/eng/spagobi/tools/dataset/dao/DataSetFactory.java +++ b/SpagoBIProject/src/it/eng/spagobi/tools/dat...
false
true
public static IDataSet toDataSet(SbiDataSet sbiDataSet) { IDataSet ds = null; VersionedDataSet versionDS = null; String config = JSONUtils.escapeJsonString(sbiDataSet.getConfiguration()); JSONObject jsonConf = ObjectUtils.toJSONObject(config); try{ if(sbiDataSet.getType().equalsIgnoreCase(DataSetConsta...
public static IDataSet toDataSet(SbiDataSet sbiDataSet) { IDataSet ds = null; VersionedDataSet versionDS = null; String config = JSONUtils.escapeJsonString(sbiDataSet.getConfiguration()); JSONObject jsonConf = ObjectUtils.toJSONObject(config); try{ if(sbiDataSet.getType().equalsIgnoreCase(DataSetConsta...
diff --git a/trunk/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java b/trunk/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java index e1c79bc..ac3d33e 100644 --- a/trunk/codemodel/codemodel/src/main/java/com/sun/codemodel/JExpr.java +++ b/trunk/codemodel/codemodel/src/main/java/com/sun/codemode...
true
true
public static String quotify(char quote, String s) { int n = s.length(); StringBuilder sb = new StringBuilder(n + 2); sb.append(quote); for (int i = 0; i < n; i++) { char c = s.charAt(i); int j = charEscape.indexOf(c); if(j>=0) { sb...
public static String quotify(char quote, String s) { int n = s.length(); StringBuilder sb = new StringBuilder(n + 2); sb.append(quote); for (int i = 0; i < n; i++) { char c = s.charAt(i); int j = charEscape.indexOf(c); if(j>=0) { if...
diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java index f3f97e31..f8d9a9d6 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/DescendantTokenCheck.java +++ b/src/checkstyle/com/pu...
false
true
public void visitToken(DetailAST aAST) { //reset counts Arrays.fill(mCounts, 0); countTokens(aAST, 0); // name of this token final String name = TokenTypes.getTokenName(aAST.getType()); for (int i = 0; i < mLimitedTokens.length; i++) { final int tok...
public void visitToken(DetailAST aAST) { //reset counts Arrays.fill(mCounts, 0); countTokens(aAST, 0); // name of this token final String name = TokenTypes.getTokenName(aAST.getType()); for (int i = 0; i < mLimitedTokens.length; i++) { final int tok...
diff --git a/src/com/hyperactivity/android_app/activities/SettingsFragment.java b/src/com/hyperactivity/android_app/activities/SettingsFragment.java index 456b559..81fdd0a 100644 --- a/src/com/hyperactivity/android_app/activities/SettingsFragment.java +++ b/src/com/hyperactivity/android_app/activities/SettingsFragment....
true
true
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { // THIS WILL BE REMOVED, IT'S HERE SO THAT THE PAGE WILL NOT BE EMPTY View view = inflater.inflate(R.layout.search_fragment, null); searchResultList = new ThreadListFragment(); searchR...
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) { // THIS WILL BE REMOVED, IT'S HERE SO THAT THE PAGE WILL NOT BE EMPTY View view = inflater.inflate(R.layout.settings_fragment, null); searchResultList = new ThreadListFragment(); searc...
diff --git a/Compiler/tst/cs444/TestHelper.java b/Compiler/tst/cs444/TestHelper.java index 06d26fcf..7c5b8e95 100644 --- a/Compiler/tst/cs444/TestHelper.java +++ b/Compiler/tst/cs444/TestHelper.java @@ -1,49 +1,51 @@ package cs444; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertN...
true
true
public static void assertTokenFor(String string, Type tokenType) throws Exception { Lexer scanner = getScannerFor(string); Token token = scanner.getNextToken(); assertToken(tokenType, string, token); assertNull(scanner.getNextToken()); }
public static void assertTokenFor(String string, Type tokenType) throws Exception { Lexer scanner = getScannerFor(string); Token token = scanner.getNextToken(); assertToken(tokenType, string, token); token = scanner.getNextToken(); assertToken(Token.Type.EOF, "", token); assertNull(scanner.getNextToken())...
diff --git a/src/kaygan/Lexer.java b/src/kaygan/Lexer.java index ed04959..ea41850 100644 --- a/src/kaygan/Lexer.java +++ b/src/kaygan/Lexer.java @@ -1,302 +1,302 @@ package kaygan; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.List; public class Lexer { pri...
true
true
protected Token read() { try { int c = peekChar(); // eat any whitespace if( isWS(c) ) { do { int ws = reader.read(); if( ws == '\r' ) { crCount++; } } while( isWS( peekChar() ) ); c = peekChar(); } beginOffset = reader.getOffset() - crC...
protected Token read() { try { int c = peekChar(); // eat any whitespace if( isWS(c) ) { do { int ws = reader.read(); if( ws == '\r' ) { crCount++; } } while( isWS( peekChar() ) ); c = peekChar(); } beginOffset = reader.getOffset() - crC...
diff --git a/src/java/ImageToTiles.java b/src/java/ImageToTiles.java index 07daad8..f3d16f7 100644 --- a/src/java/ImageToTiles.java +++ b/src/java/ImageToTiles.java @@ -1,113 +1,113 @@ import java.io.File; import javax.swing.JProgressBar; import net.niconomicon.tile.source.app.Ref; import net.niconomicon.tile.s...
true
true
public static void main(String[] args) throws Exception { if (args.length < 4) { printOptions(); } int nThreads = 1; int nIters = 1; File fopen = null; File fWrite = null; try { nThreads = Integer.parseInt(args[0]); nIters = Integer.parseInt(args[1]); } catch (Exception ex) { printOptions()...
public static void main(String[] args) throws Exception { if (args.length < 4) { printOptions(); } int nThreads = 1; int nIters = 1; File fopen = null; File fWrite = null; try { nThreads = Integer.parseInt(args[0]); nIters = Integer.parseInt(args[1]); } catch (Exception ex) { printOptions()...
diff --git a/com.versionone.common/src/com/versionone/common/sdk/ApiDataLayer.java b/com.versionone.common/src/com/versionone/common/sdk/ApiDataLayer.java index 793d539..483333b 100644 --- a/com.versionone.common/src/com/versionone/common/sdk/ApiDataLayer.java +++ b/com.versionone.common/src/com/versionone/common/sdk/A...
true
true
public boolean connect(String path, String userName, String password, boolean integrated) throws DataLayerException { isConnected = false; boolean isUserChanged = true; if (this.userName != null && this.password != null && this.path != null) { isUserChanged = !this.userName.equal...
public boolean connect(String path, String userName, String password, boolean integrated) throws DataLayerException { isConnected = false; boolean isUserChanged = true; if (this.userName != null && this.password != null && this.path != null) { isUserChanged = !this.userName.equal...
diff --git a/src/main/java/com/github/kpacha/jkata/fizzBuzz/FizzBuzz.java b/src/main/java/com/github/kpacha/jkata/fizzBuzz/FizzBuzz.java index 6a6fa20..0ace8d0 100644 --- a/src/main/java/com/github/kpacha/jkata/fizzBuzz/FizzBuzz.java +++ b/src/main/java/com/github/kpacha/jkata/fizzBuzz/FizzBuzz.java @@ -1,16 +1,18 @@ ...
false
true
public static Object generate(int total) { Object answer = null; if (total % 3 == 0) { answer = "Fizz"; } else if (total % 5 == 0) { answer = "Buzz"; } else { answer = total; } return answer; }
public static Object generate(int total) { Object answer = ""; if (total % 3 == 0) { answer = "Fizz"; } if (total % 5 == 0) { answer += "Buzz"; } if (answer.equals("")) { answer = total; } return answer; }
diff --git a/src/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java b/src/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java index 52fc140ed..85fa2eee1 100644 --- a/src/java/org/apache/commons/math/ode/sampling/NordsieckStepInterpolator.java +++ b/src/java/org/apache/commons/...
true
true
protected void computeInterpolatedStateAndDerivatives(final double theta, final double oneMinusThetaH) { final double x = interpolatedTime - referenceTime; final double normalizedAbscissa = x / scalingH; Arrays.fill(interpolatedState, 0.0); Arrays.fill(interpolatedDerivatives, 0.0)...
protected void computeInterpolatedStateAndDerivatives(final double theta, final double oneMinusThetaH) { final double x = interpolatedTime - referenceTime; final double normalizedAbscissa = x / scalingH; Arrays.fill(interpolatedState, 0.0); Arrays.fill(interpolatedDerivatives, 0.0)...
diff --git a/src/com/iver/cit/gvsig/ExportTo.java b/src/com/iver/cit/gvsig/ExportTo.java index cdd42a8..4d1e195 100644 --- a/src/com/iver/cit/gvsig/ExportTo.java +++ b/src/com/iver/cit/gvsig/ExportTo.java @@ -1,860 +1,860 @@ package com.iver.cit.gvsig; import java.awt.Component; import java.awt.geom.Point2D; impo...
false
true
public void saveToPostGIS(MapContext mapContext, FLyrVect layer){ try { String tableName = null; boolean tableNameNotFilled = true; // show the input tableName dialog until user cancel or enter a valid identifier do { tableName = JOptionPane.showInputDialog(PluginServices.getText(this, "intro_tablen...
public void saveToPostGIS(MapContext mapContext, FLyrVect layer){ try { String tableName = null; boolean tableNameNotFilled = true; // show the input tableName dialog until user cancel or enter a valid identifier do { tableName = JOptionPane.showInputDialog(PluginServices.getText(this, "intro_tablen...
diff --git a/src/Astar.java b/src/Astar.java index 14c3ea9..1491873 100644 --- a/src/Astar.java +++ b/src/Astar.java @@ -1,188 +1,188 @@ import java.util.*; import java.lang.Math; public class Astar implements Search { public Environment env; public Astar(Environment lu_env) { this.env = lu_env; } ...
true
true
private int heuristicEstimate(Node n) { State s = n.state; // Create new list so we can remove from it. List<Point2D> tempDirts = new ArrayList<Point2D>(); for(Point2D d : s.dirts) newDirts.add(new Point2D(d.x(), d.y())); //Find nearest dirt int manhattan_total = 0; Point2D nearestDirt = null; Poi...
private int heuristicEstimate(Node n) { State s = n.state; // Create new list so we can remove from it. List<Point2D> tempDirts = new ArrayList<Point2D>(); for(Point2D d : s.dirts) newDirts.add(new Point2D(d.x(), d.y())); //Find nearest dirt int manhattan_total = 0; Point2D nearestDirt = null; Poi...
diff --git a/src/com/neuron/trafikanten/dataSets/RealtimeData.java b/src/com/neuron/trafikanten/dataSets/RealtimeData.java index 5305983..831fde0 100644 --- a/src/com/neuron/trafikanten/dataSets/RealtimeData.java +++ b/src/com/neuron/trafikanten/dataSets/RealtimeData.java @@ -1,232 +1,232 @@ /** * Copyright (C) ...
false
true
public void renderDepartures(TextView tv, Activity activity, Long currentTime) { if (_cachednextDepartures == nextDepartures.size()) { if (expectedDeparture - System.currentTimeMillis() > (HelperFunctions.MINUTE * 9)) { // We're not rendering a countdown, so lets not re render the same data. //Log.d("DEBU...
public void renderDepartures(TextView tv, Activity activity, Long currentTime) { if (_lastCacheUpdated != 0 && _cachednextDepartures == nextDepartures.size()) { if (expectedDeparture - System.currentTimeMillis() > (HelperFunctions.MINUTE * 9)) { // We're not rendering a countdown, so lets not re render the sa...
diff --git a/ide/ui/src/main/java/org/overture/ide/ui/outline/DisplayNameCreator.java b/ide/ui/src/main/java/org/overture/ide/ui/outline/DisplayNameCreator.java index 5a0550b4a0..0b68824305 100644 --- a/ide/ui/src/main/java/org/overture/ide/ui/outline/DisplayNameCreator.java +++ b/ide/ui/src/main/java/org/overture/ide/...
false
true
public static String getDisplayName(Object element) { try { StringBuilder sb = new StringBuilder(); if (element instanceof SClassDefinition) return ((SClassDefinition) element).getName().getName(); else if (element instanceof AModuleModules) return ((AModuleModules) element).getName().getName(); ...
public static String getDisplayName(Object element) { try { StringBuilder sb = new StringBuilder(); if (element instanceof SClassDefinition) return ((SClassDefinition) element).getName().getName(); else if (element instanceof AModuleModules) return ((AModuleModules) element).getName().getName(); ...
diff --git a/TKM/Block.java b/TKM/Block.java index e550ddb..580764c 100644 --- a/TKM/Block.java +++ b/TKM/Block.java @@ -1,204 +1,204 @@ package TKM; import TNM.*; public class Block extends TrackElement { public static final boolean DIRECTION_FWD = false; public static final boolean DIRECTION_REV = tru...
true
true
public static void advanceTrain(Train train, double distance) { /* TODO: Implement negative distance */ if (distance < SMALL_DOUBLE) { distance = 0.0; System.out.printf("Train traveling backwards!\n"); } /* Ensure we can legally travel in the requeste...
public static void advanceTrain(Train train, double distance) { /* TODO: Implement negative distance */ if (distance < -SMALL_DOUBLE) { distance = 0.0; System.out.printf("Train traveling backwards!\n"); } /* Ensure we can legally travel in the request...
diff --git a/railo-java/railo-core/src/railo/runtime/converter/JSONDateFormat.java b/railo-java/railo-core/src/railo/runtime/converter/JSONDateFormat.java index 03147dc30..321eecdc7 100644 --- a/railo-java/railo-core/src/railo/runtime/converter/JSONDateFormat.java +++ b/railo-java/railo-core/src/railo/runtime/converter...
true
true
public synchronized static String format(Date date, TimeZone tz) { tz=ThreadLocalPageContext.getTimeZone(tz); String id=locale.hashCode()+"-"+tz.getID(); DateFormat format = (DateFormat) map.get(id); if(format==null){ format=new SimpleDateFormat("MMMM, dd yyyy HH:mm:ssZ",locale); format.setTimeZone(tz);...
public synchronized static String format(Date date, TimeZone tz) { tz=ThreadLocalPageContext.getTimeZone(tz); String id=locale.hashCode()+"-"+tz.getID(); DateFormat format = (DateFormat) map.get(id); if(format==null){ format=new SimpleDateFormat("MMMM, dd yyyy HH:mm:ss Z",locale); format.setTimeZone(tz)...
diff --git a/wings2/src/java/org/wings/plaf/css/ProgressBarCG.java b/wings2/src/java/org/wings/plaf/css/ProgressBarCG.java index 1b3f8aac..ee1e088a 100644 --- a/wings2/src/java/org/wings/plaf/css/ProgressBarCG.java +++ b/wings2/src/java/org/wings/plaf/css/ProgressBarCG.java @@ -1,141 +1,141 @@ /* * $Id$ * Copyrigh...
false
true
public void writeContent(final Device device, final SComponent _c) throws IOException { final SProgressBar component = (SProgressBar) _c; //--- code from write-template. String style = component.getStyle(); /* FIXME: The problem here is that the com...
public void writeContent(final Device device, final SComponent _c) throws IOException { final SProgressBar component = (SProgressBar) _c; //--- code from write-template. String style = component.getStyle(); /* FIXME: The problem here is that the com...
diff --git a/modules/unsupported/jdbc-ng/jdbc-core/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java b/modules/unsupported/jdbc-ng/jdbc-core/src/main/java/org/geotools/jdbc/JDBCDataStoreFactory.java index d9dbd952..45240a19 100644 --- a/modules/unsupported/jdbc-ng/jdbc-core/src/main/java/org/geotools/jdbc/JDBCD...
true
true
public final DataStore createDataStore(Map params) throws IOException { JDBCDataStore dataStore = new JDBCDataStore(); //datasource + dialect dataStore.setDataSource(createDataSource(params)); dataStore.setSQLDialect(createSQLDialect(dataStore)); //namespace ...
public final DataStore createDataStore(Map params) throws IOException { JDBCDataStore dataStore = new JDBCDataStore(); //datasource + dialect dataStore.setDataSource(createDataSource(params)); dataStore.setSQLDialect(createSQLDialect(dataStore)); //namespace ...
diff --git a/src/kg/apc/jmeter/charting/AbstractGraphRow.java b/src/kg/apc/jmeter/charting/AbstractGraphRow.java index b0154031..2da7c98b 100644 --- a/src/kg/apc/jmeter/charting/AbstractGraphRow.java +++ b/src/kg/apc/jmeter/charting/AbstractGraphRow.java @@ -1,379 +1,378 @@ package kg.apc.jmeter.charting; import ja...
true
true
public double[] getMinMaxY(int maxPoints) { int factor; double[] minMax = new double[2]; minMax[0] = Double.MAX_VALUE; minMax[1] = 0; Entry<Long, AbstractGraphPanelChartElement> element; if (maxPoints > 0) { factor = this.size() / maxPoints; if (facto...
public double[] getMinMaxY(int maxPoints) { int factor; double[] minMax = new double[2]; minMax[0] = Double.MAX_VALUE; minMax[1] = 0; Entry<Long, AbstractGraphPanelChartElement> element; if (maxPoints > 0) { factor = (int)Math.floor(this.size() / maxPoints) + 1...
diff --git a/src/lib/com/izforge/izpack/rules/UserCondition.java b/src/lib/com/izforge/izpack/rules/UserCondition.java index bc0b7bbe..3b943513 100644 --- a/src/lib/com/izforge/izpack/rules/UserCondition.java +++ b/src/lib/com/izforge/izpack/rules/UserCondition.java @@ -1,85 +1,85 @@ /* * IzPack - Copyright 2001-200...
true
true
public boolean isTrue() { boolean result = false; if (this.requiredUsername == null) { Debug.log("Expected user name not set in user condition. Condition will return false."); } else { String actualUsername = System.getProperty(...
public boolean isTrue() { boolean result = false; if (this.requiredUsername == null) { Debug.log("Expected user name not set in user condition. Condition will return false."); } else { String actualUsername = System.getProperty(...
diff --git a/src/org/python/core/PyGetSetDescr.java b/src/org/python/core/PyGetSetDescr.java index d1f7118d..f47b8d99 100644 --- a/src/org/python/core/PyGetSetDescr.java +++ b/src/org/python/core/PyGetSetDescr.java @@ -1,158 +1,158 @@ package org.python.core; import java.lang.reflect.InvocationTargetException; imp...
false
true
public PyGetSetDescr(PyType dtype, String name, Class c, String get, String set, String del) { this.name = name; this.dtype = dtype; try { get_meth = c.get...
public PyGetSetDescr(PyType dtype, String name, Class c, String get, String set, String del) { this.name = name; this.dtype = dtype; try { get_meth = c.get...
diff --git a/ui_swing/src/com/dmdirc/addons/ui_swing/components/reorderablelist/ReorderableJList.java b/ui_swing/src/com/dmdirc/addons/ui_swing/components/reorderablelist/ReorderableJList.java index b07b5a68..9be313e1 100644 --- a/ui_swing/src/com/dmdirc/addons/ui_swing/components/reorderablelist/ReorderableJList.java ...
true
true
public void drop(final DropTargetDropEvent dtde) { //check source and reject if (dtde.getSource() != dropTarget) { dtde.rejectDrop(); return; } //get object location and index final Point dropPoint = dtde.getLocation(); int index = locationToIn...
public void drop(final DropTargetDropEvent dtde) { //check source and reject if (dtde.getSource() != dropTarget) { dtde.rejectDrop(); return; } //get object location and index final Point dropPoint = dtde.getLocation(); int index = locationToIn...
diff --git a/src/Main7.java b/src/Main7.java index 280c301..9d9afd9 100644 --- a/src/Main7.java +++ b/src/Main7.java @@ -1,6 +1,6 @@ public class Main7 { public static void main(String[] args) { - System.out.println("Hello World testing 007 !"); + System.out.println("Hello World testing 07 !"); ...
true
true
public static void main(String[] args) { System.out.println("Hello World testing 007 !"); }
public static void main(String[] args) { System.out.println("Hello World testing 07 !"); }
diff --git a/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/SearchResultEditorPreferencePage.java b/studio-ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/preferences/SearchResultEditorPreferencePage.java index fb9739d91..b0c8daa3c 1006...
true
true
protected Control createContents( Composite parent ) { Composite composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 ); BaseWidgetUtils.createSpacer( composite, 1 ); BaseWidgetUtils.createSpacer( composite, 1 ); showDnButton = BaseWidgetUtils.createCheckbox( composit...
protected Control createContents( Composite parent ) { Composite composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 ); BaseWidgetUtils.createSpacer( composite, 1 ); BaseWidgetUtils.createSpacer( composite, 1 ); showDnButton = BaseWidgetUtils.createCheckbox( composit...
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java index e688329ed..089acf156 100644 --- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace....
false
true
public IStatus validateLinkLocation(IResource resource, IPath unresolvedLocation) { String message; //check if resource linking is disabled if (ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING)) { message = Policy.bind("links.workspaceVeto", resource.getName());//$...
public IStatus validateLinkLocation(IResource resource, IPath unresolvedLocation) { String message; //check if resource linking is disabled if (ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING)) { message = Policy.bind("links.workspaceVeto", resource.getName());//$...
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 29b62957..93933f1b 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -1,585 +1,575 @@ /* * Copyright (C) 2008 The An...
false
true
public SuggestedWords.Builder getSuggestedWordBuilder(final View view, final WordComposer wordComposer, CharSequence prevWordForBigram, final ProximityInfo proximityInfo) { LatinImeLogger.onStartSuggestion(prevWordForBigram); mAutoCorrection.init(); mIsFirstCharCapita...
public SuggestedWords.Builder getSuggestedWordBuilder(final View view, final WordComposer wordComposer, CharSequence prevWordForBigram, final ProximityInfo proximityInfo) { LatinImeLogger.onStartSuggestion(prevWordForBigram); mAutoCorrection.init(); mIsFirstCharCapita...
diff --git a/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java b/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java index 2653299..3669482 100644 --- a/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java +++ b/src/com/onarandombox/MultiverseCore/command/com...
true
true
public void execute(CommandSender sender, String[] args) { // TODO: Permissions, check int numOfParams = args.length; boolean hasSeed = numOfParams == 3; String worldName = args[0]; String env = args[1]; String seed = ""; if(hasSeed) { se...
public void execute(CommandSender sender, String[] args) { // TODO: Permissions, check int numOfParams = args.length; boolean hasSeed = numOfParams == 3; String worldName = args[0]; String env = args[1]; String seed = ""; if(hasSeed) { se...
diff --git a/SI-Hauptprojekt/src/de/htw/queries/Queries.java b/SI-Hauptprojekt/src/de/htw/queries/Queries.java index bfd056b..6d48f70 100644 --- a/SI-Hauptprojekt/src/de/htw/queries/Queries.java +++ b/SI-Hauptprojekt/src/de/htw/queries/Queries.java @@ -1,416 +1,416 @@ package de.htw.queries; import business.model.K...
true
true
public static Map<String, Sportangebot> query4Attributes( Map<String, Sportangebot> inputClasses, Choices kampfsport, Choices exotisch, Choices koerperbetont, Choices wassersport) { String queryBegin = "Sport"; StringBuilder query = new StringBuilder(queryBegin); if...
public static Map<String, Sportangebot> query4Attributes( Map<String, Sportangebot> inputClasses, Choices kampfsport, Choices exotisch, Choices koerperbetont, Choices wassersport) { String queryBegin = "Sport"; StringBuilder query = new StringBuilder(queryBegin); if...
diff --git a/core/src/com/google/zxing/qrcode/decoder/Version.java b/core/src/com/google/zxing/qrcode/decoder/Version.java index b8ff6c4d..26cc864d 100755 --- a/core/src/com/google/zxing/qrcode/decoder/Version.java +++ b/core/src/com/google/zxing/qrcode/decoder/Version.java @@ -1,586 +1,586 @@ /* * Copyright 2007 ZX...
true
true
private static Version[] buildVersions() { return new Version[]{ new Version(1, new int[]{}, new ECBlocks(7, new ECB(1, 19)), new ECBlocks(10, new ECB(1, 16)), new ECBlocks(13, new ECB(1, 13)), new ECBlocks(17, new ECB(1, 9))), new Version(2, new int...
private static Version[] buildVersions() { return new Version[]{ new Version(1, new int[]{}, new ECBlocks(7, new ECB(1, 19)), new ECBlocks(10, new ECB(1, 16)), new ECBlocks(13, new ECB(1, 13)), new ECBlocks(17, new ECB(1, 9))), new Version(2, new int...
diff --git a/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java b/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java index 11341544..cf301261 100644 --- a/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java +++ b/src/com/sk89q/worldguard/bukkit/WorldGuardBlockListener.java @@ -1,371 +1,371 ...
true
true
public void onBlockIgnite(BlockIgniteEvent event) { IgniteCause cause = event.getCause(); Block block = event.getBlock(); Player player = event.getPlayer(); World world = block.getWorld(); boolean isFireSpread = cause == IgniteCause.SLOW_SPREAD || cause == Ign...
public void onBlockIgnite(BlockIgniteEvent event) { IgniteCause cause = event.getCause(); Block block = event.getBlock(); Player player = event.getPlayer(); World world = block.getWorld(); boolean isFireSpread = cause == IgniteCause.SLOW_SPREAD || cause == Ign...
diff --git a/src/soot/jimple/toolkits/scalar/DeadAssignmentEliminator.java b/src/soot/jimple/toolkits/scalar/DeadAssignmentEliminator.java index 56e953c2..9becd53b 100644 --- a/src/soot/jimple/toolkits/scalar/DeadAssignmentEliminator.java +++ b/src/soot/jimple/toolkits/scalar/DeadAssignmentEliminator.java @@ -1,258 +1,...
true
true
protected void internalTransform(Body b, String phaseName, Map options) { boolean eliminateOnlyStackLocals = PhaseOptions.getBoolean(options, "only-stack-locals"); if(Options.v().verbose()) G.v().out.println("[" + b.getMethod().getName() + "] Eliminating dead code......
protected void internalTransform(Body b, String phaseName, Map options) { boolean eliminateOnlyStackLocals = PhaseOptions.getBoolean(options, "only-stack-locals"); if(Options.v().verbose()) G.v().out.println("[" + b.getMethod().getName() + "] Eliminating dead code......
diff --git a/src/main/java/com/araeosia/ArcherGames/utils/Database.java b/src/main/java/com/araeosia/ArcherGames/utils/Database.java index 9a1747f..c6480e5 100644 --- a/src/main/java/com/araeosia/ArcherGames/utils/Database.java +++ b/src/main/java/com/araeosia/ArcherGames/utils/Database.java @@ -1,520 +1,520 @@ packag...
true
true
public void recordQuit(String name) { try { plugin.dbConnect(); PreparedStatement s = plugin.conn.prepareStatement("SELECT `time` FROM `joins` WHERE `player`=? ORDER BY `id` DESC"); s.setString(1, name); ResultSet rs = s.executeQuery(); s.close(); if(rs.next()){ String timeStamp = rs.getSt...
public void recordQuit(String name) { try { plugin.dbConnect(); PreparedStatement s = plugin.conn.prepareStatement("SELECT `joins` FROM `joins` WHERE `player`=? ORDER BY `id` DESC"); s.setString(1, name); ResultSet rs = s.executeQuery(); s.close(); if(rs.next()){ String timeStamp = rs.getS...
diff --git a/twitter4j-core/src/main/java/twitter4j/internal/json/AccountSettingsJSONImpl.java b/twitter4j-core/src/main/java/twitter4j/internal/json/AccountSettingsJSONImpl.java index 153b88fb..6f5de1a8 100644 --- a/twitter4j-core/src/main/java/twitter4j/internal/json/AccountSettingsJSONImpl.java +++ b/twitter4j-core/...
true
true
private AccountSettingsJSONImpl(HttpResponse res, JSONObject json) throws TwitterException { super(res); try { JSONObject sleepTime = json.getJSONObject("sleep_time"); SLEEP_TIME_ENABLED = getBoolean("enabled", sleepTime); SLEEP_START_TIME = sleepTime.getString("s...
private AccountSettingsJSONImpl(HttpResponse res, JSONObject json) throws TwitterException { super(res); try { JSONObject sleepTime = json.getJSONObject("sleep_time"); SLEEP_TIME_ENABLED = getBoolean("enabled", sleepTime); SLEEP_START_TIME = sleepTime.getString("s...
diff --git a/Mutation/MavenPlugin/src/main/java/com/mutation/driver/maven/MavenTestExecuter.java b/Mutation/MavenPlugin/src/main/java/com/mutation/driver/maven/MavenTestExecuter.java index 8ba17d2..04974ef 100644 --- a/Mutation/MavenPlugin/src/main/java/com/mutation/driver/maven/MavenTestExecuter.java +++ b/Mutation/Ma...
true
true
public Summary exeuteTests() throws MojoExecutionException { reportFile.getParentFile().mkdirs(); ClassPathResource springConfigResource = new ClassPathResource("mutationconfig.xml"); XmlBeanFactory factory = new XmlBeanFactory(springConfigResource); factory.registerSingleton("classesDir", new File(classesD...
public Summary exeuteTests() throws MojoExecutionException { reportFile.getParentFile().mkdirs(); ClassPathResource springConfigResource = new ClassPathResource("mutationConfig.xml"); XmlBeanFactory factory = new XmlBeanFactory(springConfigResource); factory.registerSingleton("classesDir", new File(classesD...
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java index 4b416d2b8..3fb9c5657 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java +++ ...
true
true
public void paint(int reason) { IDocument document= fDocument; if (document == null) { deactivate(false); return; } IRegion selection= getSignedSelection(fSourceViewer); IRegion pair; boolean characterPresentAtCaretLocation; if (fMatcher instanceof ICharacterPairMatcherExtension) { ICharacter...
public void paint(int reason) { IDocument document= fDocument; if (document == null) { deactivate(false); return; } IRegion selection= getSignedSelection(fSourceViewer); IRegion pair; boolean characterPresentAtCaretLocation; if (fMatcher instanceof ICharacterPairMatcherExtension) { ICharacter...
diff --git a/src/translator/Expressions/SubscriptExpression.java b/src/translator/Expressions/SubscriptExpression.java index 77037cb..70e4442 100644 --- a/src/translator/Expressions/SubscriptExpression.java +++ b/src/translator/Expressions/SubscriptExpression.java @@ -1,55 +1,55 @@ package translator.Expressions; i...
false
true
protected void setup(GNode n) { this.accessor = (JavaExpression)this.dispatch((GNode)n.get(0)); if (this.accessor instanceof SubscriptExpression) this.setType(this.accessor.getType()); this.value = (JavaExpression)this.dispatch((GNode)n.get(1)); this.setType(JavaType.getType(accessor.getType().getName(), ac...
protected void setup(GNode n) { this.accessor = (JavaExpression)this.dispatch((GNode)n.get(0)); this.setType(this.accessor.getType()); if (this.accessor instanceof SubscriptExpression) this.setType(JavaType.getType(this.accessor.getType().getName(), this.accessor.getType().getDimensions() - 1)); this.value ...
diff --git a/projects/common/junit/cryptocast/comm/TestDecoratingMessageOutChannel.java b/projects/common/junit/cryptocast/comm/TestDecoratingMessageOutChannel.java index 3c02b20..69ae494 100644 --- a/projects/common/junit/cryptocast/comm/TestDecoratingMessageOutChannel.java +++ b/projects/common/junit/cryptocast/comm/...
true
true
public void decoratesCorrectly() throws Exception { MessageOutChannel inner = mock(MessageOutChannel.class); DecoratingMessageOutChannel sut = new DecoratingMessageOutChannel( inner, str2bytes("abc"), str2bytes("hi")); sut.sendMessage(str2bytes("defg")); verify(inner...
public void decoratesCorrectly() throws Exception { MessageOutChannel inner = mock(MessageOutChannel.class); DecoratingMessageOutChannel sut = new DecoratingMessageOutChannel( inner, str2bytes("abc"), str2bytes("hi")); sut.sendMessage(str2bytes("defg")); verify(inner...
diff --git a/src/org/eclipse/jface/action/ActionContributionItem.java b/src/org/eclipse/jface/action/ActionContributionItem.java index 06cca6a1..70315e1a 100644 --- a/src/org/eclipse/jface/action/ActionContributionItem.java +++ b/src/org/eclipse/jface/action/ActionContributionItem.java @@ -1,1012 +1,1012 @@ /*********...
true
true
public void update(String propertyName) { if (widget != null) { // determine what to do boolean textChanged = propertyName == null || propertyName.equals(IAction.TEXT); boolean imageChanged = propertyName == null || propertyName....
public void update(String propertyName) { if (widget != null) { // determine what to do boolean textChanged = propertyName == null || propertyName.equals(IAction.TEXT); boolean imageChanged = propertyName == null || propertyName....
diff --git a/src/main/java/me/cmastudios/plugins/WarhubModChat/commands/DeafCommand.java b/src/main/java/me/cmastudios/plugins/WarhubModChat/commands/DeafCommand.java index 55eba36..6e191e8 100644 --- a/src/main/java/me/cmastudios/plugins/WarhubModChat/commands/DeafCommand.java +++ b/src/main/java/me/cmastudios/plugins...
false
true
public boolean onCommand(CommandSender sender, Command cmd, String arg2, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (args.length < 1) { player.sendMessage(ChatColor.YELLOW + "Deafened players:"); String plrs = ""; for (String plr : plugi...
public boolean onCommand(CommandSender sender, Command cmd, String arg2, String[] args) { Player player = null; if (sender instanceof Player) { player = (Player) sender; } if (args.length < 1) { player.sendMessage(ChatColor.YELLOW + "Deafened players:"); String plrs = ""; for (String plr : plugi...
diff --git a/JsTestDriver/src/com/google/jstestdriver/config/DefaultConfiguration.java b/JsTestDriver/src/com/google/jstestdriver/config/DefaultConfiguration.java index 5058fdf6..d8110205 100644 --- a/JsTestDriver/src/com/google/jstestdriver/config/DefaultConfiguration.java +++ b/JsTestDriver/src/com/google/jstestdrive...
true
true
public String getServer(String flagValue, int port, HandlerPathPrefix handlerPrefix) { if (flagValue != null && !flagValue.isEmpty()) { return handlerPrefix.suffixServer(flagValue); } if (port == -1) { throw new RuntimeException("Oh Snap! No server defined!"); } return handlerPrefix.s...
public String getServer(String flagValue, int port, HandlerPathPrefix handlerPrefix) { if (flagValue != null && !flagValue.isEmpty()) { return handlerPrefix.suffixServer(flagValue); } if (port == -1) { throw new RuntimeException("Oh Snap! No server defined!"); } return handlerPrefix.s...
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchConfigurationDelegate.java index ce0500bc3..29e738564 100644...
false
true
private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command, IProgressMonitor monitor, boolean retry) { String errorMessage = ""; //$NON-NLS-1$ try { File workDir = getWorkingDirectory(config); if (workDir == null) { workDir = new File(System.getProperty("user.home", ".")); ...
private void finishLaunch(ILaunch launch, ILaunchConfiguration config, String command, IProgressMonitor monitor, boolean retry) { String errorMessage = ""; //$NON-NLS-1$ try { File workDir = getWorkingDirectory(config); if (workDir == null) { workDir = new File(System.getProperty("user.home", ".")); ...
diff --git a/core/src/main/java/org/jboss/as/jpa/container/ExtendedEntityManager.java b/core/src/main/java/org/jboss/as/jpa/container/ExtendedEntityManager.java index 6b3df8b..503034d 100644 --- a/core/src/main/java/org/jboss/as/jpa/container/ExtendedEntityManager.java +++ b/core/src/main/java/org/jboss/as/jpa/containe...
true
true
protected EntityManager getEntityManager() { isInTx = TransactionUtil.getInstance().isInTx(); // ensure that a different XPC (with same name) is not already present in the TX if (isInTx) { // 7.6.3.1 throw EJBException if a different persistence context is already joined to th...
protected EntityManager getEntityManager() { isInTx = TransactionUtil.getInstance().isInTx(); // ensure that a different XPC (with same name) is not already present in the TX if (isInTx) { // 7.6.3.1 throw EJBException if a different persistence context is already joined to th...
diff --git a/crypto/src/org/bouncycastle/crypto/engines/HC256Engine.java b/crypto/src/org/bouncycastle/crypto/engines/HC256Engine.java index 7ae43c34..d09339bb 100644 --- a/crypto/src/org/bouncycastle/crypto/engines/HC256Engine.java +++ b/crypto/src/org/bouncycastle/crypto/engines/HC256Engine.java @@ -1,226 +1,227 @@ ...
false
true
private void init() { if (key.length != 32) { throw new java.lang.IllegalArgumentException( "The key must be 256 bit long"); } if (key.length != 32) { byte[] k = new byte[32]; System.arraycopy(key, 0, k, 0, key.length)...
private void init() { if (key.length != 32 && key.length != 16) { throw new java.lang.IllegalArgumentException( "The key must be 128/256 bit long"); } if (key.length != 32) { byte[] k = new byte[32]; System.arraycopy(k...
diff --git a/FregIDE/src/frege/imp/builders/FregeBuilder.java b/FregIDE/src/frege/imp/builders/FregeBuilder.java index d9970163..0c3fe573 100644 --- a/FregIDE/src/frege/imp/builders/FregeBuilder.java +++ b/FregIDE/src/frege/imp/builders/FregeBuilder.java @@ -1,321 +1,322 @@ package frege.imp.builders; import java.i...
false
true
protected boolean runParserForCompiler(final IFile file, final IProgressMonitor monitor) { // a class we can give the compiler as progress monitor class CompProgress extends org.eclipse.jdt.core.compiler.CompilationProgress implements IProgressMonitor { @Override public void begin(int arg0) { } @Ove...
protected boolean runParserForCompiler(final IFile file, final IProgressMonitor monitor) { // a class we can give the compiler as progress monitor class CompProgress extends org.eclipse.jdt.core.compiler.CompilationProgress implements IProgressMonitor { @Override public void begin(int arg0) { } @Ove...
diff --git a/Library/src/com/yandex/sample/droidcon/library/MyActivity.java b/Library/src/com/yandex/sample/droidcon/library/MyActivity.java index 3cb7023..c24beff 100644 --- a/Library/src/com/yandex/sample/droidcon/library/MyActivity.java +++ b/Library/src/com/yandex/sample/droidcon/library/MyActivity.java @@ -1,98 +1...
false
true
private void updateState() { final LibraryApplication application = (LibraryApplication) getApplication(); TextView level4 = (TextView) findViewById(R.id.level3); final boolean state = application.getEntitlementState(IN_APP_SKU); if (state) { level4.setTextColor(R.color.t...
private void updateState() { final LibraryApplication application = (LibraryApplication) getApplication(); TextView level4 = (TextView) findViewById(R.id.level3); final boolean state = application.getEntitlementState(IN_APP_SKU); if (state) { level4.setTextColor(getResour...
diff --git a/riot/src/org/riotfamily/riot/editor/IntermediateDefinition.java b/riot/src/org/riotfamily/riot/editor/IntermediateDefinition.java index c3f9ceee9..dbf668558 100644 --- a/riot/src/org/riotfamily/riot/editor/IntermediateDefinition.java +++ b/riot/src/org/riotfamily/riot/editor/IntermediateDefinition.java @@ ...
true
true
public IntermediateDefinition(ListDefinition parentListDefinition, ListDefinition nestedListDefinition) { setParentEditorDefinition(parentListDefinition); this.nestedListDefinition = nestedListDefinition; nestedListDefinition.setParentEditorDefinition(this); }
public IntermediateDefinition(ListDefinition parentListDefinition, ListDefinition nestedListDefinition) { setParentEditorDefinition(parentListDefinition); this.nestedListDefinition = nestedListDefinition; nestedListDefinition.setParentEditorDefinition(this); setEditorRepository(parentListDefinition.getEdit...
diff --git a/src/test/java/org/neo4j/cypherdsl/CypherQueryTest2.java b/src/test/java/org/neo4j/cypherdsl/CypherQueryTest2.java index 3acf8fe..38f5598 100644 --- a/src/test/java/org/neo4j/cypherdsl/CypherQueryTest2.java +++ b/src/test/java/org/neo4j/cypherdsl/CypherQueryTest2.java @@ -1,58 +1,58 @@ /** * Copyright (c...
true
true
public void testDSL() { assertEquals( "START john=node(0) RETURN john", new CypherQuery() {{ starts( node( "john", 0 ) ).returns( nodes( "john" ) ); }}.toString() ); assertEquals( "START john=node(0) MATCH r=(john)-[?:KNOWS*1..3]->(x) RETURN x", new CypherQuery() ...
public void testDSL() { assertEquals( "START john=node(0) RETURN john", new CypherQuery() {{ starts( node( "john", 0 ) ).returns( nodes( "john" ) ); }}.toString() ); assertEquals( "START john=node(0) MATCH r=(john)-[?:KNOWS*1..3]->(x) RETURN x", new CypherQuery() ...
diff --git a/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Backend.java b/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Backend.java index 33bef6cf7..c9237a6f7 100644 --- a/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/Backend.java +++ b/titan-core/src/main/java/com/thinkaur...
true
true
public Backend(Configuration storageConfig, Configuration metricsConfig) { this.storageConfig = storageConfig; storeManager = getStorageManager(storageConfig); indexes = getIndexes(storageConfig); storeFeatures = storeManager.getFeatures(); if (null == metricsConfig) { ...
public Backend(Configuration storageConfig, Configuration metricsConfig) { this.storageConfig = storageConfig; storeManager = getStorageManager(storageConfig); indexes = getIndexes(storageConfig); storeFeatures = storeManager.getFeatures(); if (null == metricsConfig) { ...
diff --git a/src/com/nullprogram/chess/pieces/ImageServer.java b/src/com/nullprogram/chess/pieces/ImageServer.java index 1501499..e3e84a2 100644 --- a/src/com/nullprogram/chess/pieces/ImageServer.java +++ b/src/com/nullprogram/chess/pieces/ImageServer.java @@ -1,104 +1,109 @@ package com.nullprogram.chess.pieces; i...
true
true
public static BufferedImage getTile(final String name, final int size) { CacheKey key = new CacheKey(name, size); BufferedImage cached = cache.get(key); if (cached != null) { return cached; } BufferedImage orig = null, image = null; try { orig...
public static BufferedImage getTile(final String name, final int size) { CacheKey key = new CacheKey(name, size); BufferedImage cached = cache.get(key); if (cached != null) { return cached; } BufferedImage orig = null, image = null; try { orig...
diff --git a/CocoNuestro/src/compilationunit/GenFinal.java b/CocoNuestro/src/compilationunit/GenFinal.java index fc74f2d..4455308 100644 --- a/CocoNuestro/src/compilationunit/GenFinal.java +++ b/CocoNuestro/src/compilationunit/GenFinal.java @@ -1,86 +1,86 @@ package compilationunit; import java.io.BufferedWriter; ...
true
true
public GenFinal(LinkedList<tupla_Tercetos> colaTercetos, Tablas tabla, String fichero) { int desp_total; //variable para el desplazamiento total de las tablas de simbolos archiEscri= new File(fichero); tupla_Tercetos tupla_actual; String terceto_actual; TablaSimbolos ambito_actual; //cola ...
public GenFinal(LinkedList<tupla_Tercetos> colaTercetos, Tablas tabla, String fichero) { int desp_total; //variable para el desplazamiento total de las tablas de simbolos archiEscri= new File(fichero); tupla_Tercetos tupla_actual; String terceto_actual; TablaSimbolos ambito_actual; //cola ...
diff --git a/src/main/java/org/thymeleaf/standard/expression/LinkExpression.java b/src/main/java/org/thymeleaf/standard/expression/LinkExpression.java index 9dd93512..d9bac5d7 100644 --- a/src/main/java/org/thymeleaf/standard/expression/LinkExpression.java +++ b/src/main/java/org/thymeleaf/standard/expression/LinkExpre...
true
true
static Object executeLink( final Arguments arguments, final LinkExpression expression, final IStandardExpressionEvaluator expressionEvaluator) { if (logger.isTraceEnabled()) { logger.trace("[THYMELEAF][{}] Evaluating link: \"{}\"", TemplateEngine.threadIndex(), expressi...
static Object executeLink( final Arguments arguments, final LinkExpression expression, final IStandardExpressionEvaluator expressionEvaluator) { if (logger.isTraceEnabled()) { logger.trace("[THYMELEAF][{}] Evaluating link: \"{}\"", TemplateEngine.threadIndex(), expressi...
diff --git a/src/uk/me/parabola/mkgmap/general/LevelInfo.java b/src/uk/me/parabola/mkgmap/general/LevelInfo.java index 9f2cadb1..6ea3d0e7 100644 --- a/src/uk/me/parabola/mkgmap/general/LevelInfo.java +++ b/src/uk/me/parabola/mkgmap/general/LevelInfo.java @@ -1,134 +1,137 @@ /* * Copyright (C) 2007 Steve Ratcliffe ...
false
true
public static LevelInfo[] createFromString(String levelSpec) { String[] desc = levelSpec.split("[, \\t\\n]+"); LevelInfo[] levels = new LevelInfo[desc.length]; int count = 0; for (String s : desc) { String[] keyVal = s.split("[=:]"); if (keyVal == null || keyVal.length < 2) { System.err.println("inc...
public static LevelInfo[] createFromString(String levelSpec) { String[] desc = levelSpec.split("[, \\t\\n]+"); LevelInfo[] levels = new LevelInfo[desc.length]; int count = 0; for (String s : desc) { String[] keyVal = s.split("[=:]"); if (keyVal == null || keyVal.length < 2) { throw new ExitException...
diff --git a/src/framework/Puzzle.java b/src/framework/Puzzle.java index 4d4c5fc..fef6f86 100644 --- a/src/framework/Puzzle.java +++ b/src/framework/Puzzle.java @@ -1,75 +1,75 @@ package framework; public class Puzzle { private Board board; private Piece[] p = new Piece[9]; public Puzzle(){ board = n...
false
true
public Puzzle(){ board = new Board(); p[1] = new Piece(new Side(Side.outSpade), new Side(Side.outDiamond), new Side(Side.inSpade), new Side(Side.inHeart)); p[2] = new Piece(new Side(Side.outSpade), new Side(Side.outSpade), new Side(Side.inHeart), new Side(Side.inClub)); p[3] = new Piece...
public Puzzle(){ board = new Board(); p[0] = new Piece(new Side(Side.outSpade), new Side(Side.outDiamond), new Side(Side.inSpade), new Side(Side.inHeart)); p[1] = new Piece(new Side(Side.outSpade), new Side(Side.outSpade), new Side(Side.inHeart), new Side(Side.inClub)); p[2] = new Piece...
diff --git a/src/main/java/com/epita/mti/plic/opensource/controlibserversample/observer/TrackpadObserver.java b/src/main/java/com/epita/mti/plic/opensource/controlibserversample/observer/TrackpadObserver.java index e20b6e3..f5c6ba9 100644 --- a/src/main/java/com/epita/mti/plic/opensource/controlibserversample/observer/...
true
true
public void update(Observable o, Object arg) { if (((CLSerializable) arg).getType().equals("button-pressure")) { mouseX = MouseInfo.getPointerInfo().getLocation().x; mouseY = MouseInfo.getPointerInfo().getLocation().y; float x = ((CLVector) arg).getX(); float y = ((CLVector) arg).ge...
public void update(Observable o, Object arg) { if (((CLSerializable) arg).getType().equals("vector")) { mouseX = MouseInfo.getPointerInfo().getLocation().x; mouseY = MouseInfo.getPointerInfo().getLocation().y; float x = ((CLVector) arg).getX(); float y = ((CLVector) arg).getY(); ...
diff --git a/app/src/org/orange/familylink/alarm/AccelerometerListener.java b/app/src/org/orange/familylink/alarm/AccelerometerListener.java index 769a484..a278c5e 100644 --- a/app/src/org/orange/familylink/alarm/AccelerometerListener.java +++ b/app/src/org/orange/familylink/alarm/AccelerometerListener.java @@ -1,150 +...
true
true
public void onSensorChanged(SensorEvent event) { long start; if(BuildConfig.DEBUG) start = System.currentTimeMillis(); if(event.sensor.getType() != Sensor.TYPE_ACCELEROMETER || event.accuracy == SensorManager.SENSOR_STATUS_UNRELIABLE) return; mSensorEvent = event; // In this example, alpha is calcula...
public void onSensorChanged(SensorEvent event) { long start; if(BuildConfig.DEBUG) start = System.currentTimeMillis(); if(event.sensor.getType() != Sensor.TYPE_ACCELEROMETER || event.accuracy == SensorManager.SENSOR_STATUS_UNRELIABLE) return; mSensorEvent = event; // In this example, alpha is calcula...
diff --git a/src/main/java/net/lankylord/simplehomes/managers/HomeManager.java b/src/main/java/net/lankylord/simplehomes/managers/HomeManager.java index 6bfb4cf..62e0991 100644 --- a/src/main/java/net/lankylord/simplehomes/managers/HomeManager.java +++ b/src/main/java/net/lankylord/simplehomes/managers/HomeManager.java...
false
true
public void loadPlayerHomes(String playerName) { ConfigurationSection homes = fileManager.getHomes().getConfigurationSection(playerName.toLowerCase()); Map<String, Location> homeLocation = new HashMap<>(); for (String homeName : homes.getKeys(false)) { ConfigurationSection home ...
public void loadPlayerHomes(String playerName) { ConfigurationSection homes = fileManager.getHomes().getConfigurationSection(playerName.toLowerCase()); if (homes != null) { Map<String, Location> homeLocation = new HashMap<>(); for (String homeName : homes.getKeys(false)) { ...
diff --git a/src/main/java/com/github/kpacha/jkata/primeFactors/PrimeFactors.java b/src/main/java/com/github/kpacha/jkata/primeFactors/PrimeFactors.java index 6a64b0d..350bb06 100644 --- a/src/main/java/com/github/kpacha/jkata/primeFactors/PrimeFactors.java +++ b/src/main/java/com/github/kpacha/jkata/primeFactors/Prime...
false
true
public static List<Integer> generate(final int number) { List<Integer> primes = new ArrayList<Integer>(); if (number > 1) { primes.add(number); } return primes; }
public static List<Integer> generate(int number) { List<Integer> primes = new ArrayList<Integer>(); if (number > 1) { if (number % 2 == 0) { primes.add(2); number /= 2; } if (number > 1) { primes.add(number); } } return primes; }
diff --git a/src/org/omegat/filters3/xml/opendoc/OpenDocFilter.java b/src/org/omegat/filters3/xml/opendoc/OpenDocFilter.java index a8cdb6f7..c5cc6042 100644 --- a/src/org/omegat/filters3/xml/opendoc/OpenDocFilter.java +++ b/src/org/omegat/filters3/xml/opendoc/OpenDocFilter.java @@ -1,248 +1,249 @@ /*******************...
true
true
public List<File> processFile(File inFile, String inEncoding, File outFile, String outEncoding) throws IOException, TranslationException { ZipFile zipfile = new ZipFile(inFile); ZipOutputStream zipout = null; if (outFile!=null) zipout = new ZipOutputStream(new FileOutputStrea...
public List<File> processFile(File inFile, String inEncoding, File outFile, String outEncoding) throws IOException, TranslationException { ZipFile zipfile = new ZipFile(inFile); ZipOutputStream zipout = null; if (outFile!=null) zipout = new ZipOutputStream(new FileOutputStrea...
diff --git a/test/pt/uac/cafeteria/model/MealMenuTest.java b/test/pt/uac/cafeteria/model/MealMenuTest.java index b7cee65..9dbe583 100644 --- a/test/pt/uac/cafeteria/model/MealMenuTest.java +++ b/test/pt/uac/cafeteria/model/MealMenuTest.java @@ -1,71 +1,71 @@ package pt.uac.cafeteria.model; import java.util.List; ...
true
true
public void canCreateMenu() { MealMenu menu = createMenu(); Meal meat_expected = new Meal(day, time, Meal.Type.MEAT, "Pork", soup, dessert); Meal fish_expected = new Meal(day, time, Meal.Type.FISH, "Tuna", soup, dessert); Meal veggie_expected = new Meal(day, time, Meal.Type.VEGETARI...
public void canCreateMenu() { MealMenu menu = createMenu(); Meal meat_expected = new Meal(day, time, Meal.Type.MEAT, soup, "Pork", dessert); Meal fish_expected = new Meal(day, time, Meal.Type.FISH, soup, "Tuna", dessert); Meal veggie_expected = new Meal(day, time, Meal.Type.VEGETARI...
diff --git a/src/org/yogpstop/qp/TileQuarry.java b/src/org/yogpstop/qp/TileQuarry.java index ffbbfec..efdeb91 100644 --- a/src/org/yogpstop/qp/TileQuarry.java +++ b/src/org/yogpstop/qp/TileQuarry.java @@ -1,713 +1,722 @@ package org.yogpstop.qp; import static org.yogpstop.qp.QuarryPlus.data; import java.io.ByteA...
false
true
private boolean checkTarget() { if (this.targetY > this.box.yMax) this.targetY = this.box.yMax; int bid = this.worldObj.getBlockId(this.targetX, this.targetY, this.targetZ); switch (this.now) { case BREAKBLOCK: case MOVEHEAD: if (this.targetY < 1) { destroy(); sendNowPacket(); return true; ...
private boolean checkTarget() { if (this.targetY > this.box.yMax) this.targetY = this.box.yMax; int bid = this.worldObj.getBlockId(this.targetX, this.targetY, this.targetZ); switch (this.now) { case BREAKBLOCK: case MOVEHEAD: if (this.targetY < 1) { destroy(); sendNowPacket(); return true; ...
diff --git a/subsystem/src/main/java/org/jboss/as/weld/ejb/EjbDescriptorImpl.java b/subsystem/src/main/java/org/jboss/as/weld/ejb/EjbDescriptorImpl.java index 28734d6..255cc04 100644 --- a/subsystem/src/main/java/org/jboss/as/weld/ejb/EjbDescriptorImpl.java +++ b/subsystem/src/main/java/org/jboss/as/weld/ejb/EjbDescrip...
false
true
public EjbDescriptorImpl(EJBComponentDescription componentDescription, BeanDeploymentArchiveImpl beanDeploymentArchive, final DeploymentReflectionIndex reflectionIndex) { final SessionBeanComponentDescription description = componentDescription instanceof SessionBeanComponentDescription ? (SessionBeanCompone...
public EjbDescriptorImpl(EJBComponentDescription componentDescription, BeanDeploymentArchiveImpl beanDeploymentArchive, final DeploymentReflectionIndex reflectionIndex) { final SessionBeanComponentDescription description = componentDescription instanceof SessionBeanComponentDescription ? (SessionBeanCompone...
diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.java index 339df2877..f3cd08636 100755 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/DiskIndexLinkedList.jav...
false
true
public synchronized IndexItem getNextEntry(IndexItem current) { IndexItem result = null; if (current != null && current.getNextItem() >= 0) { try { result = indexManager.getIndex(current.getNextItem()); } catch (IOException e) { throw new Runti...
public synchronized IndexItem getNextEntry(IndexItem current) { IndexItem result = null; if (current != null ) { current = (IndexItem) refreshEntry(current); if(current.getNextItem() >= 0){ try { result = indexManager.getIndex(current.getNextItem()); ...
diff --git a/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ModificationScopeStack.java b/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ModificationScopeStack.java index f589480a8..1b3c8e20c 100644 --- a/parser/org/eclipse/cdt/internal/core/dom/rewrite/changegenerator/ModificationSc...
true
true
public void clean(IASTNode actualNode) { while(scopeStack.size() > 1){ for (IASTNode currentModifiedNode : getModifiedNodes()) { for (ASTModification currentMod : getModificationsForNode(currentModifiedNode)) { if(currentMod.getNewNode() == actualNode){ return; } } } if(!nodeIsChildO...
public void clean(IASTNode actualNode) { while(scopeStack.size() > 1){ for (IASTNode currentModifiedNode : getModifiedNodes()) { for (ASTModification currentMod : getModificationsForNode(currentModifiedNode)) { if(currentMod.getNewNode() == actualNode){ return; } } } if(!nodeIsChildO...
diff --git a/alchemy-midlet/src/alchemy/evm/EFunction.java b/alchemy-midlet/src/alchemy/evm/EFunction.java index dbbb9d8..8fd06aa 100644 --- a/alchemy-midlet/src/alchemy/evm/EFunction.java +++ b/alchemy-midlet/src/alchemy/evm/EFunction.java @@ -1,776 +1,776 @@ /* * This file is a part of Alchemy OS project. * Cop...
true
true
public Object exec(Context c, Object[] args) throws AlchemyException { //initializing final Object[] stack = new Object[stacksize]; int head = -1; final byte[] code = this.bcode; Object[] locals; if (args.length == localsize) { locals = args; } else { locals = new Object[localsize]; System.array...
public Object exec(Context c, Object[] args) throws AlchemyException { //initializing final Object[] stack = new Object[stacksize]; int head = -1; final byte[] code = this.bcode; Object[] locals; if (args.length == localsize) { locals = args; } else { locals = new Object[localsize]; System.array...
diff --git a/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java b/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java index 323e2fb..a31cc7b 100644 --- a/src/test/java/org/apache/commons/beanutils/bugs/Jira298TestCase.java +++ b/src/test/java/org/apache/commons/beanutils/bugs/Jira298T...
true
true
public void testIssue_BEANUTILS_298_MethodUtils_getAccessibleMethod() { Object bean = Jira298BeanFactory.createImplX(); Object result = null; try { Method m2 = MethodUtils.getAccessibleMethod(bean.getClass(), "getName", new Class[0]); result = m2.invoke(bean, null); ...
public void testIssue_BEANUTILS_298_MethodUtils_getAccessibleMethod() { Object bean = Jira298BeanFactory.createImplX(); Object result = null; try { Method m2 = MethodUtils.getAccessibleMethod(bean.getClass(), "getName", new Class[0]); result = m2.invoke(bean); ...
diff --git a/scm-core/src/main/java/sonia/scm/i18n/Bundle.java b/scm-core/src/main/java/sonia/scm/i18n/Bundle.java index bdf3487ef..9523948cd 100644 --- a/scm-core/src/main/java/sonia/scm/i18n/Bundle.java +++ b/scm-core/src/main/java/sonia/scm/i18n/Bundle.java @@ -1,140 +1,140 @@ /** * Copyright (c) 2010, Sebastian ...
true
true
public String getString(String key, Object... args) { String msg = bundle.getString(key); if (Util.isNotEmpty(args)) { msg = MessageFormat.format(key, args); } return msg; }
public String getString(String key, Object... args) { String msg = bundle.getString(key); if (Util.isNotEmpty(args)) { msg = MessageFormat.format(msg, args); } return msg; }
diff --git a/common/MysticWorld/Items/ItemHandler$1.java b/common/MysticWorld/Items/ItemHandler$1.java index 4e610cb..e33cd96 100644 --- a/common/MysticWorld/Items/ItemHandler$1.java +++ b/common/MysticWorld/Items/ItemHandler$1.java @@ -1,109 +1,109 @@ package MysticWorld.Items; import cpw.mods.fml.common.registry....
true
true
public static void init(){ staffParts = new ItemStaffParts(ItemIds.STAFF_PARTS).setUnlocalizedName(Strings.STAFF_NAME); imbuedShard = new ItemImbuedShard(ItemIds.IMBUED_SHARD).setUnlocalizedName(Strings.IMBUED_SHARD_NAME); fireStaff = new ItemStaffFire(ItemIds.FIRE_STAFF).setUnlocalizedName(Strings.FIRE_S...
public static void init(){ staffParts = new ItemStaffParts(ItemIds.STAFF_PARTS).setUnlocalizedName(Strings.STAFF_NAME); imbuedShard = new ItemImbuedShard(ItemIds.IMBUED_SHARD).setUnlocalizedName(Strings.IMBUED_SHARD_NAME); fireStaff = new ItemStaffFire(ItemIds.FIRE_STAFF).setUnlocalizedName(Strings.FIRE_S...
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/frameworkadmin/equinox/internal/EquinoxBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/frameworkadmin/equinox/internal/EquinoxBundlesState.java index 8fb27e80a..9fc14f662 100644 --- a/b...
true
true
private boolean composeState(BundleInfo[] bInfos, Dictionary props, File fwPersistentDataLocation) throws IllegalArgumentException, FrameworkAdminRuntimeException { this.manipulator.getConfigData().setBundles(null); SimpleBundlesState.checkAvailability(fwAdmin); this.setStateObjectFactory(); BundleDescription[...
private boolean composeState(BundleInfo[] bInfos, Dictionary props, File fwPersistentDataLocation) throws IllegalArgumentException, FrameworkAdminRuntimeException { this.manipulator.getConfigData().setBundles(null); SimpleBundlesState.checkAvailability(fwAdmin); this.setStateObjectFactory(); BundleDescription[...
diff --git a/flyway-core/src/main/java/com/googlecode/flyway/core/dbsupport/oracle/OracleSqlStatementBuilder.java b/flyway-core/src/main/java/com/googlecode/flyway/core/dbsupport/oracle/OracleSqlStatementBuilder.java index a8a462981..c085fad02 100644 --- a/flyway-core/src/main/java/com/googlecode/flyway/core/dbsupport/...
false
true
protected Delimiter changeDelimiterIfNecessary(String line, Delimiter delimiter) { if (line.matches("DECLARE|DECLARE\\s.*") || line.matches("BEGIN|BEGIN\\s.*")) { return PLSQL_DELIMITER; } if (StringUtils.countOccurrencesOf(statementStart, " ") < 4) { statementStart ...
protected Delimiter changeDelimiterIfNecessary(String line, Delimiter delimiter) { if (line.matches("DECLARE|DECLARE\\s.*") || line.matches("BEGIN|BEGIN\\s.*")) { return PLSQL_DELIMITER; } if (StringUtils.countOccurrencesOf(statementStart, " ") < 4) { statementStart ...
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifPidMenuAction.java b/valgrind/org.eclipse.linuxtools.valgrind.massif/src/org/eclipse/linuxtools/valgrind/massif/MassifPidMenuAction.java index 14998fb83..9c4de2962 100644 --- a/valgrind/org.eclipse.linuxtools.v...
false
true
public Menu getMenu(Control parent) { if (menu == null) { if (pids != null) { menu = new Menu(parent); for (int i = 0; i < pids.length; i++) { final Integer pid = pids[i]; ActionContributionItem item = new ActionContributionItem(new Action("PID " + String.valueOf(pids[i]), IAction.AS_RADIO_BUTTO...
public Menu getMenu(Control parent) { if (menu == null) { if (pids != null) { menu = new Menu(parent); for (int i = 0; i < pids.length; i++) { final Integer pid = pids[i]; ActionContributionItem item = new ActionContributionItem(new Action("PID " + String.valueOf(pids[i]), IAction.AS_RADIO_BUTTO...
diff --git a/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarRenderer.java b/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarRenderer.java index 2f20c45..18be11d 100644 --- a/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarRenderer.java +++ b/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarRende...
true
true
public void encodeChildren(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } String clientId = null; if (component.getId() != null && !component.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { clientId = comp...
public void encodeChildren(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } String clientId = null; if (component.getId() != null && !component.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { clientId = comp...
diff --git a/opentaps-1.5/opentaps/dataimport/src/org/opentaps/dataimport/domain/ProjectImportService.java b/opentaps-1.5/opentaps/dataimport/src/org/opentaps/dataimport/domain/ProjectImportService.java index f50b98b0..cdf21d08 100644 --- a/opentaps-1.5/opentaps/dataimport/src/org/opentaps/dataimport/domain/ProjectImpo...
true
true
public void importProject() throws ServiceException { try { this.session = this.getInfrastructure().getSession(); ProjectDataImportRepositoryInterface imp_repo = this .getDomainsDirectory().getDataImportDomain() .getProjectDataImportRepository(); LedgerRepositoryInterface ledger_repo = this.getDo...
public void importProject() throws ServiceException { try { this.session = this.getInfrastructure().getSession(); ProjectDataImportRepositoryInterface imp_repo = this .getDomainsDirectory().getDataImportDomain() .getProjectDataImportRepository(); LedgerRepositoryInterface ledger_repo = this.getDo...
diff --git a/src/test/cli/cloudify/cloud/services/rackspace/RackspaceCloudService.java b/src/test/cli/cloudify/cloud/services/rackspace/RackspaceCloudService.java index de1e70ec..8e64d553 100644 --- a/src/test/cli/cloudify/cloud/services/rackspace/RackspaceCloudService.java +++ b/src/test/cli/cloudify/cloud/services/ra...
true
true
public void injectAuthenticationDetails() throws IOException { String cloudTestPath = (SGTestHelper.getSGTestRootDir() + "/apps/cloudify/cloud/" + cloudName).replace('\\', '/'); // cloud plugin should include recipe that includes secret key File cloudPluginDir = new File(ScriptUtils.getBuildPath() , "tools/c...
public void injectAuthenticationDetails() throws IOException { String cloudTestPath = (SGTestHelper.getSGTestRootDir() + "/apps/cloudify/cloud/" + cloudName).replace('\\', '/'); // cloud plugin should include recipe that includes secret key File cloudPluginDir = new File(ScriptUtils.getBuildPath() , "tools/c...
diff --git a/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/io/IOWizard.java b/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/io/IOWizard.java index e12ee9276..04f186575 100644 --- a/ui/plugins/eu.esdihumboldt.hale.ui/src/eu/esdihumboldt/hale/ui/io/IOWizard.java +++ b/ui/plugins/eu.esdih...
true
true
public boolean performFinish() { if (getProvider() == null) { return false; } // process main pages for (int i = 0; i < mainPages.size(); i++) { // validating is still necessary as it is not guaranteed to be up to date by handlePageChanging boolean valid = validatePage(mainPages.get(i)); if (!va...
public boolean performFinish() { if (getProvider() == null) { return false; } // process main pages for (int i = 0; i < mainPages.size(); i++) { // validating is still necessary as it is not guaranteed to be up to date by handlePageChanging boolean valid = validatePage(mainPages.get(i)); if (!va...