nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Ambroscum { public static final String USAGE_MESSAGE = "Usage:<seq2seq4repair_space>ambroscum<seq2seq4repair_space>[-icRh]<seq2seq4repair_space>[file]<seq2seq4repair_space>[args]\n\nargs<seq2seq4repair_space>Command<seq2seq4repair_space>line<seq2seq4repair_space>arguments<seq2seq4repair_space>to<seq2seq4repair_space>pass<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>interpreted<seq2seq4repair_space>file\n\n[no<seq2seq4repair_space>args]<seq2seq4repair_space>Basic<seq2seq4repair_space>interactive<seq2seq4repair_space>session\n-i<seq2seq4repair_space>Execute<seq2seq4repair_space>file<seq2seq4repair_space>if<seq2seq4repair_space>given,<seq2seq4repair_space>then<seq2seq4repair_space>go<seq2seq4repair_space>to<seq2seq4repair_space>interactive<seq2seq4repair_space>session<seq2seq4repair_space>(if<seq2seq4repair_space>not<seq2seq4repair_space>specified,<seq2seq4repair_space>execute<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>file<seq2seq4repair_space>and<seq2seq4repair_space>exit)\n-c<seq2seq4repair_space>Compile<seq2seq4repair_space>file<seq2seq4repair_space>to<seq2seq4repair_space>arg0.java\n-R<seq2seq4repair_space>If<seq2seq4repair_space>-c<seq2seq4repair_space>was<seq2seq4repair_space>specified,<seq2seq4repair_space>invoke<seq2seq4repair_space>javac<seq2seq4repair_space>and<seq2seq4repair_space>java<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>output<seq2seq4repair_space>Java<seq2seq4repair_space>file\n-h<seq2seq4repair_space>Print<seq2seq4repair_space>this<seq2seq4repair_space>help<seq2seq4repair_space>message<seq2seq4repair_space>and<seq2seq4repair_space>exit" ; public static void main ( String [ ] args ) throws IOException , InterruptedException { <START_BUG> Ambroscum . compileMIPSTest ( "04<seq2seq4repair_space>sort" , true ) ; <END_BUG> } public static void commandLineMain ( String [ ] args ) throws IOException , InterruptedException { } private static void compileILTest ( File file ) throws IOException { } private static void compileMIPSTest ( String fileName , boolean execute ) throws IOException , InterruptedException { } private static void compileJavaTest ( File file , boolean execute ) throws IOException , InterruptedException { } }

Fix:
Ambroscum . compileMIPSTest ( "05<seq2seq4repair_space>literals" , false ) ;
Buggy code:
public class ExportDialogAction extends AbstractColumbaAction { public ExportDialogAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> new ExportDialog ( ) ; <END_BUG> } }

Fix:
new org . columba . mail . gui . config . export . ExportDialog ( getFrameMediator ( ) . getView ( ) . getFrame ( ) ) ;
Buggy code:
public class CookieTest extends TestCase { private MockHttpApplication application ; private SignInPanel panel ; private Form form ; private Cookie cookieUsername ; private Cookie cookiePassword ; private Cookie [ ] cookies ; private HtmlPage page ; private HttpRequestCycle cycle ; public CookieTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockHttpApplication ( null ) ; application . getSettings ( ) . setHomePage ( MockPage . class ) ; application . setupRequestAndResponse ( ) ; this . panel = new SignInPanel ( "panel" ) { public String signIn ( final RequestCycle cycle , final String username , final String password ) { return null ; } } ; this . panel . setPersistent ( true ) ; this . form = ( ( Form ) ( panel . get ( "signInForm" ) ) ) ; <START_BUG> final String encryptedPassword = application . getSettings ( ) . getCryptInstance ( ) . encryptStringToString ( "test" ) ; <END_BUG> this . cookieUsername = new Cookie ( "panel.signInForm.username" , "juergen" ) ; this . cookiePassword = new Cookie ( "panel.signInForm.password" , encryptedPassword ) ; this . cookies = new Cookie [ ] { cookieUsername , cookiePassword } ; application . getServletRequest ( ) . setCookies ( cookies ) ; cycle = new HttpRequestCycle ( application , application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; this . page = new MockPage ( null ) ; page . add ( this . panel ) ; } public void testSetCookieOnForm ( ) throws IOException , ServletException { } public void testSetCookieOnPage ( ) throws IOException , ServletException { } public void testPersistCookieWithPersistenceDisabled ( ) throws IOException , ServletException { } public void testPersistCookie ( ) throws IOException , ServletException { } public void testRemoveFromPage ( ) throws IOException , ServletException { } }

Fix:
final String encryptedPassword = application . getSettings ( ) . getCryptInstance ( ) . encryptString ( "test" ) ;
Buggy code:
public class MethodReader implements Reader < MethodScanModel > { private List < MethodScanModel > models = new ArrayList < MethodScanModel > ( ) ; @ Override public void read ( JClassType classType , GeneratorContext context ) { for ( JMethod method : classType . getMethods ( ) ) { <START_BUG> if ( method . isPublic ( ) ) { <END_BUG> MethodScanModel model = new MethodScanModel ( ) ; model . setName ( method . getName ( ) ) ; if ( ( method . getReturnType ( ) . isPrimitive ( ) ) != null ) { JPrimitiveType returnType = method . getReturnType ( ) . isPrimitive ( ) ; model . setReturnType ( returnType . getQualifiedBoxedSourceName ( ) ) ; if ( returnType == ( JPrimitiveType . VOID ) ) { model . setVoidMethod ( true ) ; } } else { model . setReturnType ( method . getReturnType ( ) . getQualifiedSourceName ( ) ) ; } model . setAnnotationScanModels ( ScanUtils . getAnnotations ( method ) ) ; model . setPramsLength ( method . getParameters ( ) . length ) ; String params = StringUtils . EMPTY ; int i = 0 ; for ( JParameter parameter : method . getParameters ( ) ) { if ( i > 0 ) { params = params + "," ; } params = ( ( ( ( params + "(" ) + ( parameter . getType ( ) . getQualifiedSourceName ( ) ) ) + ")params[" ) + i ) + "]" ; i ++ ; } model . setParams ( params ) ; models . add ( model ) ; } } } @ Override public boolean isMath ( Annotation checkAnnotation ) { } @ Override public List < MethodScanModel > getData ( ) { } }

Fix:
if ( ( method . isPublic ( ) ) || ( method . isDefaultAccess ( ) ) ) {
Buggy code:
public class OfflineBedLocation { public static Location getBedLocation ( final String playername , final IEssentials ess ) { try { final CraftServer cserver = ( ( CraftServer ) ( ess . getServer ( ) ) ) ; if ( cserver == null ) { return null ; } final WorldNBTStorage wnbtStorage = ( ( WorldNBTStorage ) ( cserver . getHandle ( ) . playerFileData ) ) ; if ( wnbtStorage == null ) { return null ; } final NBTTagCompound playerStorage = wnbtStorage . getPlayerData ( playername ) ; if ( playerStorage == null ) { return null ; } if ( ( ( playerStorage . hasKey ( "SpawnX" ) ) && ( playerStorage . hasKey ( "SpawnY" ) ) ) && ( playerStorage . hasKey ( "SpawnZ" ) ) ) { String spawnWorld = playerStorage . getString ( "SpawnWorld" ) ; if ( "" . equals ( spawnWorld ) ) { spawnWorld = cserver . getWorlds ( ) . get ( 0 ) . getName ( ) ; } <START_BUG> return new Location ( cserver . getWorld ( spawnWorld ) , playerStorage . getInt ( "SpawnX" ) , playerStorage . getInt ( "SpawnY" ) , playerStorage . getInt ( "SpawnZ" ) ) ; <END_BUG> } return null ; } catch ( Throwable ex ) { Logger . getLogger ( "Minecraft" ) . log ( Level . SEVERE , null , ex ) ; return null ; } } }

Fix:
return new BetterLocation ( spawnWorld , playerStorage . getInt ( "SpawnX" ) , playerStorage . getInt ( "SpawnY" ) , playerStorage . getInt ( "SpawnZ" ) ) ;
Buggy code:
public class ServerDeploymentRepositoryDisable extends AbstractServerModelUpdate < Void > { private static final long serialVersionUID = 4421499058480729575L ; private final String path ; public ServerDeploymentRepositoryDisable ( String path ) { } protected void applyUpdate ( ServerModel element ) throws UpdateFailedException { } public AbstractServerModelUpdate < ? > getCompensatingUpdate ( ServerModel original ) { } public < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final ServiceController < ? > controller = context . getServiceContainer ( ) . getService ( DeploymentScannerService . getServiceName ( path ) ) ; <END_BUG> if ( controller == null ) { resultHandler . handleFailure ( notConfigured ( ) , param ) ; } else { try { final DeploymentScanner scanner = ( ( DeploymentScanner ) ( controller . getValue ( ) ) ) ; scanner . stopScanner ( ) ; resultHandler . handleSuccess ( null , param ) ; } catch ( Throwable t ) { resultHandler . handleFailure ( t , param ) ; } } } private UpdateFailedException notConfigured ( ) { } }

Fix:
final ServiceController < ? > controller = context . getServiceRegistry ( ) . getService ( DeploymentScannerService . getServiceName ( path ) ) ;
Buggy code:
public class JDBCFetchConfigurationImpl extends FetchConfigurationImpl implements JDBCFetchConfiguration { private static final Localizer _loc = Localizer . forPackage ( JDBCFetchConfigurationImpl . class ) ; private static class JDBCConfigurationState implements Serializable { public int eagerMode = 0 ; public int subclassMode = 0 ; public int type = 0 ; public int direction = 0 ; public int size = 0 ; public int syntax = 0 ; public Set joins = null ; public int isolationLevel = - 1 ; } private final JDBCFetchConfigurationImpl . JDBCConfigurationState _state ; public JDBCFetchConfigurationImpl ( ) { } private JDBCFetchConfigurationImpl ( ConfigurationState state , JDBCFetchConfigurationImpl . JDBCConfigurationState jstate ) { } protected FetchConfigurationImpl newInstance ( ConfigurationState state ) { } public void setContext ( StoreContext ctx ) { } public void copy ( FetchConfiguration fetch ) { } public int getEagerFetchMode ( ) { } public JDBCFetchConfiguration setEagerFetchMode ( int mode ) { } public int getSubclassFetchMode ( ) { } public int getSubclassFetchMode ( ClassMapping cls ) { } public JDBCFetchConfiguration setSubclassFetchMode ( int mode ) { } public int getResultSetType ( ) { } public JDBCFetchConfiguration setResultSetType ( int type ) { } public int getFetchDirection ( ) { } public JDBCFetchConfiguration setFetchDirection ( int direction ) { } public int getLRSSize ( ) { } public JDBCFetchConfiguration setLRSSize ( int size ) { } public int getJoinSyntax ( ) { } public JDBCFetchConfiguration setJoinSyntax ( int syntax ) { } public ResultList newResultList ( ResultObjectProvider rop ) { } public Set getJoins ( ) { } public boolean hasJoin ( String field ) { } public JDBCFetchConfiguration addJoin ( String join ) { } public JDBCFetchConfiguration addJoins ( Collection joins ) { } public JDBCFetchConfiguration removeJoin ( String field ) { } public JDBCFetchConfiguration removeJoins ( Collection joins ) { } public JDBCFetchConfiguration clearJoins ( ) { } public int getIsolation ( ) { } public JDBCFetchConfiguration setIsolation ( int level ) { if ( ( ( ( ( ( ( level != ( - 1 ) ) && ( level != ( DEFAULT ) ) ) && ( level != ( Connection . TRANSACTION_NONE ) ) ) && ( level != ( Connection . TRANSACTION_READ_UNCOMMITTED ) ) ) && ( level != ( Connection . TRANSACTION_READ_COMMITTED ) ) ) && ( level != ( Connection . TRANSACTION_REPEATABLE_READ ) ) ) && ( level != ( Connection . TRANSACTION_SERIALIZABLE ) ) ) <START_BUG> throw new IllegalArgumentException ( JDBCFetchConfigurationImpl . _loc . get ( "bad-level" , Integer . valueOf ( level ) ) . getMessage ( ) ) ; <END_BUG> if ( level == ( DEFAULT ) ) _state . isolationLevel = - 1 ; else _state . isolationLevel = level ; return this ; } public JDBCFetchConfiguration traverseJDBC ( FieldMetaData fm ) { } private JDBCConfiguration getJDBCConfiguration ( ) { } }

Fix:
throw new IllegalArgumentException ( JDBCFetchConfigurationImpl . _loc . get ( "bad-level" , new Integer ( level ) ) . getMessage ( ) ) ;
Buggy code:
public class JSONParser { static InputStream is = null ; static JSONObject jObj = null ; static String json = "" ; public JSONParser ( ) { } public JSONObject getJSONFromUrl ( String url ) { try { DefaultHttpClient httpClient = new DefaultHttpClient ( ) ; HttpGet httpGet = new HttpGet ( url ) ; Log . d ( "JSONParser" , ( "url<seq2seq4repair_space>is<seq2seq4repair_space>" + url ) ) ; HttpResponse httpResponse = httpClient . execute ( httpGet ) ; Log . d ( "JSONParser" , "posted" ) ; HttpEntity httpEntity = httpResponse . getEntity ( ) ; JSONParser . is = httpEntity . getContent ( ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } catch ( ClientProtocolException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } try { BufferedReader reader = new BufferedReader ( new InputStreamReader ( JSONParser . is , "iso-8859-1" ) , 8 ) ; StringBuilder sb = new StringBuilder ( ) ; String line = null ; while ( ( line = reader . readLine ( ) ) != null ) { sb . append ( ( line + "\n" ) ) ; } JSONParser . is . close ( ) ; <START_BUG> JSONParser . json = sb . toString ( ) ; <END_BUG> Log . d ( "JSONParser" , JSONParser . json ) ; } catch ( Exception e ) { Log . e ( "Buffer<seq2seq4repair_space>Error" , ( "Error<seq2seq4repair_space>converting<seq2seq4repair_space>result<seq2seq4repair_space>" + ( e . toString ( ) ) ) ) ; } try { JSONParser . jObj = new JSONObject ( JSONParser . json ) ; } catch ( JSONException e ) { Log . e ( "JSON<seq2seq4repair_space>Parser" , ( "Error<seq2seq4repair_space>parsing<seq2seq4repair_space>data<seq2seq4repair_space>" + ( e . toString ( ) ) ) ) ; } return JSONParser . jObj ; } No newline ; at end ; of file ; }

Fix:
JSONParser . json = sb . toString ( ) . replace ( ",}" , "}}" ) ;
Buggy code:
public class ComparisonVisualizer extends AbstractVisualizer implements Clearable { private JTree resultsTree ; private DefaultTreeModel treeModel ; private DefaultMutableTreeNode root ; private JTextPane base ; private JTextPane secondary ; public ComparisonVisualizer ( ) { } public void add ( SampleResult sample ) { } public String getLabelResource ( ) { } private void init ( ) { } private JComponent getSideBySidePanel ( ) { } private JTextPane getBaseTextPane ( ) { } private JTextPane getSecondaryTextPane ( ) { } private JComponent getTreePanel ( ) { } private class Selector implements TreeSelectionListener { public void valueChanged ( TreeSelectionEvent e ) { try { DefaultMutableTreeNode node = ( ( DefaultMutableTreeNode ) ( resultsTree . getLastSelectedPathComponent ( ) ) ) ; SampleResult sr = ( ( SampleResult ) ( node . getUserObject ( ) ) ) ; AssertionResult [ ] results = sr . getAssertionResults ( ) ; CompareAssertionResult result = null ; for ( AssertionResult r : results ) { if ( r instanceof CompareAssertionResult ) { result = ( ( CompareAssertionResult ) ( r ) ) ; break ; } } if ( result == null ) <START_BUG> result = new CompareAssertionResult ( ) ; <END_BUG> base . setText ( result . getBaseResult ( ) ) ; secondary . setText ( result . getSecondaryResult ( ) ) ; } catch ( Exception err ) { base . setText ( ( ( JMeterUtils . getResString ( "comparison_invalid_node" ) ) + err ) ) ; secondary . setText ( ( ( JMeterUtils . getResString ( "comparison_invalid_node" ) ) + err ) ) ; } base . setCaretPosition ( 0 ) ; secondary . setCaretPosition ( 0 ) ; } } public void clearData ( ) { } }

Fix:
result = new CompareAssertionResult ( getName ( ) ) ;
Buggy code:
public class PojoMetadata { private Map < String , Setter > propertySetters ; private Map < String , Field > fields ; private boolean caseSensitive ; private Class clazz ; private Map < String , String > columnMappings ; public Map < String , String > getColumnMappings ( ) { } public PojoMetadata ( Class clazz , boolean caseSensitive , Map < String , String > columnMappings ) { } public Setter getPropertySetter ( String propertyName ) { } public Class getType ( ) { } public Object getValueOfProperty ( String propertyName , Object object ) { String name = ( this . caseSensitive ) ? propertyName : propertyName . toLowerCase ( ) ; <START_BUG> Field field = this . fields . get ( propertyName ) ; <END_BUG> try { return field . get ( object ) ; } catch ( IllegalAccessException e ) { throw new Sql2oException ( ( ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>read<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>field<seq2seq4repair_space>" + ( field . getName ( ) ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>class<seq2seq4repair_space>" ) + ( object . getClass ( ) . toString ( ) ) ) , e ) ; } } }

Fix:
Field field = this . fields . get ( name ) ;
Buggy code:
public class FontWeightProperty extends AbstractProperty { private static final int FONT_WEIGHT_NORMAL = 400 ; private static final int FONT_WEIGHT_BOLD = 700 ; public FontWeightProperty ( ) { } public Object calculate ( LexicalUnit lu , Styles parentStyles , Styles styles ) { <START_BUG> return new Integer ( this . calculateInternal ( lu , parentStyles , styles ) ) ; <END_BUG> } public int calculateInternal ( LexicalUnit lu , Styles parentStyles , Styles styles ) { } public static boolean isFontWeight ( LexicalUnit lu ) { } private static int getFontWeight ( LexicalUnit lu , Styles parentStyles ) { } }

Fix:
return Integer . valueOf ( calculateInternal ( lu , parentStyles , styles ) ) ;
Buggy code:
public class IDMSubsystemExampleConfigurationUnitTestCase extends AbstractSubsystemBaseTest { public IDMSubsystemExampleConfigurationUnitTestCase ( ) { } @ Override protected String getSubsystemXml ( ) throws IOException { <START_BUG> return readResource ( "identity-management-subsystem-example-1.0.xml" ) ; <END_BUG> } @ Test public void testRuntime ( ) throws Exception { } @ Override protected void assertRemoveSubsystemResources ( KernelServices kernelServices , Set < PathAddress > ignoredChildAddresses ) { } }

Fix:
return readResource ( "identity-management-subsystem-example-2.0.xml" ) ;
Buggy code:
public class Util { protected static Gson gson = new Gson ( ) ; public static String toJsonp ( Response resp ) { } public static String toJson ( Response resp ) { } public static String decrypt ( String encryptedData , String key ) { } public static byte [ ] encrypt ( byte [ ] data , byte [ ] keyBytes ) throws Exception { } public static byte [ ] decrypt ( byte [ ] data , byte [ ] keyBytes ) throws Exception { } public static byte [ ] getKey ( ) throws Exception { } public static String getHexString ( byte [ ] b ) { } public static byte [ ] getByteArray ( String hex ) { } private static int toByte ( char c ) { } public static byte [ ] blobToBytes ( Blob blob ) { } public static String blobToBase64 ( Blob b ) { } public static byte [ ] base64ToBytes ( String b64 ) { } public static void quickSort ( byte [ ] list , int low , int high ) { } public static int findBytes ( LinkedList < Byte > arr , byte value ) { int i = 0 ; <START_BUG> while ( ( ( arr . get ( i ) ) != value ) && ( i < ( arr . size ( ) ) ) ) <END_BUG> i ++ ; if ( i < ( arr . size ( ) ) ) return i ; return - 1 ; } public static int insBytes ( LinkedList < Byte > arr , byte value ) { } }

Fix:
while ( ( i < ( arr . size ( ) ) ) && ( ( arr . get ( i ) ) != value ) )
Buggy code:
public final class ServerStartTask implements ObjectInputValidation , Serializable , ServerTask { private static final long serialVersionUID = - 1037124182656400874L ; private final String serverName ; private final int portOffset ; private final String hostControllerName ; private final String home ; private final List < ServiceActivator > startServices ; private final List < ModelNode > updates ; private final Properties properties = new Properties ( ) ; public ServerStartTask ( final String hostControllerName , final String serverName , final int portOffset , final List < ServiceActivator > startServices , final List < ModelNode > updates , final Map < String , String > launchProperties ) { } @ Override public AsyncFuture < ServiceContainer > run ( final List < ServiceActivator > runServices ) { final Bootstrap bootstrap = Factory . newInstance ( ) ; final ProductConfig productConfig = new ProductConfig ( Module . getBootModuleLoader ( ) , home ) ; <START_BUG> final ServerEnvironment providedEnvironment = new ServerEnvironment ( hostControllerName , properties , SecurityActions . getSystemEnvironment ( ) , null , LaunchType . DOMAIN , RunningMode . NORMAL , productConfig ) ; <END_BUG> final Bootstrap . Configuration configuration = new Bootstrap . Configuration ( providedEnvironment ) ; final ExtensionRegistry extensionRegistry = configuration . getExtensionRegistry ( ) ; final Bootstrap . ConfigurationPersisterFactory configurationPersisterFactory = new Bootstrap . ConfigurationPersisterFactory ( ) { @ Override public ExtensibleConfigurationPersister createConfigurationPersister ( ServerEnvironment serverEnvironment , ExecutorService executorService ) { ExtensibleConfigurationPersister persister = new AbstractConfigurationPersister ( new org . jboss . as . server . parsing . StandaloneXml ( configuration . getModuleLoader ( ) , executorService , extensionRegistry ) ) { private final PersistenceResource pr = new PersistenceResource ( ) { @ Override public void commit ( ) { } @ Override public void rollback ( ) { } } ; @ Override public PersistenceResource store ( final ModelNode model , Set < PathAddress > affectedAddresses ) throws ConfigurationPersistenceException { return pr ; } @ Override public List < ModelNode > load ( ) throws ConfigurationPersistenceException { return updates ; } } ; extensionRegistry . setWriterRegistry ( persister ) ; return persister ; } } ; configuration . setConfigurationPersisterFactory ( configurationPersisterFactory ) ; return bootstrap . bootstrap ( configuration , startServices ) ; } @ Override public void validateObject ( ) throws InvalidObjectException { } private void readObject ( ObjectInputStream ois ) throws IOException , ClassNotFoundException { } static void setPropertyIfFound ( final Map < String , String > launchProperties , final String key , final Properties properties ) { } }

Fix:
final ServerEnvironment providedEnvironment = new ServerEnvironment ( hostControllerName , properties , SecurityActions . getSystemEnvironment ( ) , null , null , LaunchType . DOMAIN , RunningMode . NORMAL , productConfig ) ;
Buggy code:
public abstract class HeaderResponse implements IHeaderResponse { private static final long serialVersionUID = 1L ; private final Set < Object > rendered = new HashSet < Object > ( ) ; private boolean closed ; public HeaderResponse ( ) { } public final void markRendered ( Object object ) { } public void renderCSSReference ( ResourceReference reference ) { } public void renderCSSReference ( ResourceReference reference , String media ) { } public void renderCSSReference ( String url ) { } public void renderCSSReference ( String url , String media ) { } public void renderJavascriptReference ( ResourceReference reference ) { } public void renderJavascriptReference ( ResourceReference reference , String id ) { } public void renderJavascriptReference ( String url ) { } public void renderJavascriptReference ( String url , String id ) { } public void renderJavascript ( CharSequence javascript , String id ) { } public void renderString ( CharSequence string ) { } public final boolean wasRendered ( Object object ) { } public void renderOnDomReadyJavascript ( String javascript ) { } public void renderOnLoadJavascript ( String javascript ) { } public void renderOnEventJavascript ( String target , String event , String javascript ) { if ( ! ( closed ) ) { List < Object > token = Arrays . asList ( new Object [ ] { "javascript-event" , target , event , javascript } ) ; if ( ( wasRendered ( token ) ) == false ) { renderJavascriptReference ( INSTANCE ) ; <START_BUG> JavascriptUtils . writeJavascript ( getResponse ( ) , ( ( ( ( ( ( "Wicket.Event.add(" + target ) + ",<seq2seq4repair_space>\"" ) + event ) + "\",<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) + javascript ) + ";});" ) ) ; <END_BUG> markRendered ( token ) ; } } } public void close ( ) { } public final Response getResponse ( ) { } public boolean isClosed ( ) { } protected abstract Response getRealResponse ( ) { } }

Fix:
JavascriptUtils . writeJavascript ( getResponse ( ) , ( ( ( ( ( ( "Wicket.Event.add(" + target ) + ",<seq2seq4repair_space>\"" ) + event ) + "\",<seq2seq4repair_space>function(event)<seq2seq4repair_space>{<seq2seq4repair_space>" ) + javascript ) + ";});" ) ) ;
Buggy code:
public class MvngwtApi { public String hello ( ) { <START_BUG> return "gwt-client-api-hello-24" ; <END_BUG> } }

Fix:
return "gwt-client-api-hello-24ee" ;
Buggy code:
public class Annotations extends TestUtils { protected void setUp ( ) throws Exception { } public void test001_itdsOnAnnotationsNotAllowed ( ) { } public void test002_decpOnAnnotationNotAllowed_errors ( ) { <START_BUG> CompilationResult cR = binaryWeave ( "testcode.jar" , "AnnotationAspect04.aj" , 3 , 0 , true ) ; <END_BUG> IMessage msg = ( ( IMessage ) ( cR . getErrorMessages ( ) . get ( 1 ) ) ) ; assertTrue ( ( "Expected<seq2seq4repair_space>a<seq2seq4repair_space>message<seq2seq4repair_space>about<seq2seq4repair_space>can't<seq2seq4repair_space>use<seq2seq4repair_space>decp<seq2seq4repair_space>to<seq2seq4repair_space>alter<seq2seq4repair_space>supertype<seq2seq4repair_space>of<seq2seq4repair_space>an<seq2seq4repair_space>annotation:<seq2seq4repair_space>" + msg ) , ( ( msg . toString ( ) . indexOf ( "to<seq2seq4repair_space>alter<seq2seq4repair_space>supertype<seq2seq4repair_space>of<seq2seq4repair_space>annotation<seq2seq4repair_space>type" ) ) != ( - 1 ) ) ) ; msg = ( ( IMessage ) ( cR . getErrorMessages ( ) . get ( 2 ) ) ) ; assertTrue ( ( "Expected<seq2seq4repair_space>a<seq2seq4repair_space>message<seq2seq4repair_space>about<seq2seq4repair_space>can't<seq2seq4repair_space>use<seq2seq4repair_space>decp<seq2seq4repair_space>to<seq2seq4repair_space>make<seq2seq4repair_space>annotation<seq2seq4repair_space>implement<seq2seq4repair_space>interface:<seq2seq4repair_space>" + msg ) , ( ( msg . toString ( ) . indexOf ( "implement<seq2seq4repair_space>an<seq2seq4repair_space>interface" ) ) != ( - 1 ) ) ) ; msg = ( ( IMessage ) ( cR . getErrorMessages ( ) . get ( 0 ) ) ) ; assertTrue ( ( "Expected<seq2seq4repair_space>a<seq2seq4repair_space>message<seq2seq4repair_space>about<seq2seq4repair_space>can't<seq2seq4repair_space>use<seq2seq4repair_space>decp<seq2seq4repair_space>to<seq2seq4repair_space>make<seq2seq4repair_space>Annotation<seq2seq4repair_space>parent<seq2seq4repair_space>of<seq2seq4repair_space>another<seq2seq4repair_space>type:<seq2seq4repair_space>" + msg ) , ( ( msg . toString ( ) . indexOf ( "the<seq2seq4repair_space>parent<seq2seq4repair_space>of<seq2seq4repair_space>type" ) ) != ( - 1 ) ) ) ; verifyWeavingMessagesOutput ( cR , new String [ ] { } ) ; } public void test004_decpOnAnnotationNotAllowed_xlints ( ) { } }

Fix:
CompilationResult cR = binaryWeave ( "testcode.jar" , "AnnotationAspect04.aj" , 3 , 0 , true , new String [ ] { "-source" , "1.5" } ) ;
Buggy code:
public class CurrencyPair extends org . yccheok . jstock . engine . Pair < Currency , Currency > { public CurrencyPair ( Currency from , Currency to ) { } public Currency from ( ) { } public Currency to ( ) { <START_BUG> return this . first ; <END_BUG> } }

Fix:
return this . second ;
Buggy code:
public class MockWebApplicationTest extends TestCase { private MockWebApplication application ; public MockWebApplicationTest ( String name ) { } protected void setUp ( ) throws Exception { } public void testRenderHomePage ( ) throws Exception { } public void testClickLink ( ) throws Exception { } private boolean validateDocument ( String document , int expectedLinkClickCount ) { HtmlDocumentValidator validator = new HtmlDocumentValidator ( ) ; Tag html = new Tag ( "html" ) ; Tag head = new Tag ( "head" ) ; html . addExpectedChild ( head ) ; Tag title = new Tag ( "title" ) ; head . addExpectedChild ( title ) ; title . addExpectedChild ( new TextContent ( "Mock<seq2seq4repair_space>Page" ) ) ; Tag body = new Tag ( "body" ) ; html . addExpectedChild ( body ) ; Tag a = new Tag ( "a" ) ; <START_BUG> a . addExpectedAttribute ( "href" , "//MockWebApplication//MockWebApplication\\?component=[0-9]+.actionLink(&amp;version=[0-9]+)?&amp;interface=ILinkListener" ) ; <END_BUG> a . addExpectedAttribute ( "wicket:id" , "actionLink" ) ; body . addExpectedChild ( a ) ; a . addExpectedChild ( new TextContent ( "Action<seq2seq4repair_space>link<seq2seq4repair_space>clicked<seq2seq4repair_space>" ) ) ; Tag span = new Tag ( "span" ) ; span . addExpectedChild ( new TextContent ( ( "" + expectedLinkClickCount ) ) ) ; a . addExpectedChild ( span ) ; a . addExpectedChild ( new TextContent ( "<seq2seq4repair_space>times" ) ) ; validator . addRootElement ( html ) ; return validator . isDocumentValid ( document ) ; } }

Fix:
a . addExpectedAttribute ( "href" , "//MockWebApplication//MockWebApplication\\?path=[0-9]+.actionLink(&amp;version=[0-9]+)?&amp;interface=ILinkListener" ) ;
Buggy code:
public class MMetrics extends AbstractMetamataTask { private String granularity = null ; private File outFile = null ; private File tmpFile ; private Path path = null ; public MMetrics ( ) { } public static class GranularityAttribute extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setGranularity ( MMetrics . GranularityAttribute granularity ) { } public void setTofile ( File file ) { } public Path createPath ( ) { if ( ( path ) == null ) { <START_BUG> path = new Path ( project ) ; <END_BUG> } return path ; } protected void checkOptions ( ) throws BuildException { } protected void execute0 ( ExecuteStreamHandler handler ) throws BuildException { } protected void transformFile ( ) throws BuildException { } protected void cleanUp ( ) throws BuildException { } protected ExecuteStreamHandler createStreamHandler ( ) { } protected Vector getOptions ( ) { } }

Fix:
path = new Path ( getProject ( ) ) ;
Buggy code:
public class TestMockCharFilter extends BaseTokenStreamTestCase { public void test ( ) throws IOException { Analyzer analyzer = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; return new TokenStreamComponents ( tokenizer , tokenizer ) ; } @ Override <START_BUG> protected Reader initReader ( Reader reader ) { <END_BUG> return new MockCharFilter ( CharReader . get ( reader ) , 7 ) ; } } ; assertAnalyzesTo ( analyzer , "ab" , new String [ ] { "aab" } , new int [ ] { 0 } , new int [ ] { 2 } ) ; assertAnalyzesTo ( analyzer , "aba" , new String [ ] { "aabaa" } , new int [ ] { 0 } , new int [ ] { 3 } ) ; assertAnalyzesTo ( analyzer , "abcdefga" , new String [ ] { "aabcdefgaa" } , new int [ ] { 0 } , new int [ ] { 8 } ) ; } }

Fix:
protected Reader initReader ( String fieldName , Reader reader ) {
Buggy code:
public class InterleaveControlGui extends AbstractControllerGui { private JCheckBox style ; public InterleaveControlGui ( ) { } public void configure ( TestElement el ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement ic ) { } public void clear ( ) { } public String getLabelResource ( ) { } private void init ( ) { <START_BUG> setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT , VerticalLayout . TOP ) ) ; <END_BUG> setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) ) ; style = new JCheckBox ( JMeterUtils . getResString ( "ignore_subcontrollers" ) ) ; add ( style ) ; } }

Fix:
setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH , VerticalLayout . TOP ) ) ;
Buggy code:
public class LongExecutionProblemHandler extends ProblemHandler implements Initializable { public static final String ID = "long-execution" ; @ Inject private ServerConfigManager m_configManager ; private int [ ] m_defaultLongServiceDuration = new int [ ] { 50 , 100 , 500 , 1000 , 3000 , 5000 } ; private int [ ] m_defaultLongSqlDuration = new int [ ] { 100 , 500 , 1000 , 3000 , 5000 } ; private int [ ] m_defaultLongUrlDuration = new int [ ] { 1000 , 2000 , 3000 , 5000 } ; private int [ ] m_defalutLongCallDuration = new int [ ] { 100 , 500 , 1000 , 3000 , 5000 } ; private int [ ] m_defaultLongCacheDuration = new int [ ] { 10 , 50 , 100 , 500 } ; private Map < String , Integer > m_longServiceThresholds = new HashMap < String , Integer > ( ) ; private Map < String , Integer > m_longSqlThresholds = new HashMap < String , Integer > ( ) ; private Map < String , Integer > m_longUrlThresholds = new HashMap < String , Integer > ( ) ; private Map < String , Integer > m_longCallThresholds = new HashMap < String , Integer > ( ) ; private Map < String , Integer > m_longCacheThresholds = new HashMap < String , Integer > ( ) ; public int computeLongDuration ( long duration , String domain , int [ ] defaultLongDuration , Map < String , Integer > longThresholds ) { } @ Override public void handle ( Machine machine , MessageTree tree ) { } @ Override public void initialize ( ) throws InitializationException { } private void processLongCache ( Machine machine , Transaction transaction , MessageTree tree ) { long duration = ( ( Transaction ) ( transaction ) ) . getDurationInMillis ( ) ; long nomarizeDuration = computeLongDuration ( duration , tree . getDomain ( ) , m_defaultLongCacheDuration , m_longCacheThresholds ) ; if ( nomarizeDuration > 0 ) { String type = LONG_CACHE . getName ( ) ; String status = transaction . getName ( ) ; Entity entity = findOrCreateEntity ( machine , type , status ) ; <START_BUG> updateEntity ( tree , entity , 0 ) ; <END_BUG> } } private void processLongCall ( Machine machine , Transaction transaction , MessageTree tree ) { } private void processLongService ( Machine machine , Transaction transaction , MessageTree tree ) { } private void processLongSql ( Machine machine , Transaction transaction , MessageTree tree ) { } private void processLongUrl ( Machine machine , Transaction transaction , MessageTree tree ) { } private void processTransaction ( Machine machine , Transaction transaction , MessageTree tree ) { } }

Fix:
updateEntity ( tree , entity , ( ( int ) ( nomarizeDuration ) ) ) ;
Buggy code:
public class InterTypeMemberFinder implements IMemberFinder { private List interTypeFields = new ArrayList ( ) ; private List interTypeMethods = new ArrayList ( ) ; public SourceTypeBinding sourceTypeBinding ; public FieldBinding getField ( SourceTypeBinding sourceTypeBinding , char [ ] fieldName , InvocationSite site , Scope scope ) { <START_BUG> FieldBinding retField = sourceTypeBinding . getFieldBase ( fieldName , false ) ; <END_BUG> if ( interTypeFields . isEmpty ( ) ) return retField ; int fieldLength = fieldName . length ; for ( int i = 0 , len = interTypeFields . size ( ) ; i < len ; i ++ ) { FieldBinding field = ( ( FieldBinding ) ( interTypeFields . get ( i ) ) ) ; if ( ( ( field . name . length ) == fieldLength ) && ( CharOperation . prefixEquals ( field . name , fieldName ) ) ) { retField = resolveConflicts ( sourceTypeBinding , retField , field , site , scope ) ; } } return retField ; } private FieldBinding resolveConflicts ( SourceTypeBinding sourceTypeBinding , FieldBinding retField , FieldBinding field , InvocationSite site , Scope scope ) { } private boolean isVisible ( MethodBinding m1 , ReferenceBinding s ) { } public MethodBinding [ ] getMethods ( SourceTypeBinding sourceTypeBinding , char [ ] selector ) { } public MethodBinding getExactMethod ( SourceTypeBinding sourceTypeBinding , char [ ] selector , TypeBinding [ ] argumentTypes ) { } private boolean matches ( MethodBinding m1 , MethodBinding m2 ) { } private boolean matches ( MethodBinding method , char [ ] selector , TypeBinding [ ] argumentTypes ) { } public void addInterTypeField ( FieldBinding binding ) { } public void addInterTypeMethod ( MethodBinding binding ) { } }

Fix:
FieldBinding retField = sourceTypeBinding . getFieldBase ( fieldName , true ) ;
Buggy code:
public class MutableBoolean implements Serializable , Comparable , Mutable { private static final long serialVersionUID = - 4830728138360036487L ; private boolean value ; public MutableBoolean ( ) { } public MutableBoolean ( boolean value ) { } public MutableBoolean ( Boolean value ) { } public boolean booleanValue ( ) { } public int compareTo ( Object obj ) { } @ Override public boolean equals ( Object obj ) { } public Object getValue ( ) { <START_BUG> return BooleanUtils . toBooleanObject ( this . value ) ; <END_BUG> } @ Override public int hashCode ( ) { } public void setValue ( boolean value ) { } public void setValue ( Object value ) { } @ Override public String toString ( ) { } }

Fix:
return Boolean . valueOf ( this . value ) ;
Buggy code:
public class TestPriorityBuffer < E > extends AbstractTestCollection < E > { public static void main ( String [ ] args ) { } public static Test suite ( ) { } public TestPriorityBuffer ( String testName ) { } @ SuppressWarnings ( "unchecked" ) public void verify ( ) { } public boolean isFailFastSupported ( ) { } public Collection < E > makeConfirmedCollection ( ) { } public Collection < E > makeConfirmedFullCollection ( ) { } public Buffer < E > makeObject ( ) { } @ SuppressWarnings ( "unchecked" ) public E [ ] getFullElements ( ) { } @ SuppressWarnings ( "unchecked" ) public E [ ] getOtherElements ( ) { } public void testBufferEmpty ( ) { } @ SuppressWarnings ( "unchecked" ) public void testBasicOps ( ) { } @ SuppressWarnings ( "unchecked" ) public void testBasicComparatorOps ( ) { } @ SuppressWarnings ( "unchecked" ) public void testAddRemove ( ) { } public void testRandom ( ) { } protected void checkOrder ( PriorityBuffer < ? > h ) { } protected String showTree ( PriorityBuffer < ? > h ) { int count = 1 ; <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> for ( int offset = 1 ; count < ( ( h . size ( ) ) + 1 ) ; offset *= 2 ) { for ( int i = offset ; i < ( offset * 2 ) ; i ++ ) { if ( ( i < ( h . elements . length ) ) && ( ( h . elements [ i ] ) != null ) ) buffer . append ( ( ( h . elements [ i ] ) + "<seq2seq4repair_space>" ) ) ; count ++ ; } buffer . append ( '\n' ) ; } return buffer . toString ( ) ; } @ SuppressWarnings ( "unchecked" ) public void testSerialization ( ) { } public PriorityBuffer < ? > serializeAndRestore ( PriorityBuffer < E > h ) { } public String getCompatibilityVersion ( ) { } @ Override public PriorityBuffer < E > getCollection ( ) { } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public class MenuActivity extends ActionBarActivity { private TextView textView ; SharedPreferences sp ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void onClick ( View view ) { } private void loadStatus ( ) { } private void storeStatus ( ) { JSONArray array = new JSONArray ( ) ; JSONObject blackTeaObject = new JSONObject ( ) ; JSONObject greenTeaObject = new JSONObject ( ) ; String blackTeaL = ( ( android . widget . Button ) ( findViewById ( R . id . button1_l ) ) ) . getText ( ) . toString ( ) ; String blackTeaM = ( ( android . widget . Button ) ( findViewById ( R . id . button1_m ) ) ) . getText ( ) . toString ( ) ; String blackTeaS = ( ( android . widget . Button ) ( findViewById ( R . id . button1_s ) ) ) . getText ( ) . toString ( ) ; try { blackTeaObject . put ( "drinkName" , "BlackTea" ) ; blackTeaObject . put ( "l" , Integer . valueOf ( blackTeaL ) ) ; blackTeaObject . put ( "m" , Integer . valueOf ( blackTeaM ) ) ; blackTeaObject . put ( "s" , Integer . valueOf ( blackTeaS ) ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } String greenTeaL = ( ( android . widget . Button ) ( findViewById ( R . id . button2_l ) ) ) . getText ( ) . toString ( ) ; String greenTeaM = ( ( android . widget . Button ) ( findViewById ( R . id . button2_m ) ) ) . getText ( ) . toString ( ) ; String greenTeaS = ( ( android . widget . Button ) ( findViewById ( R . id . button2_s ) ) ) . getText ( ) . toString ( ) ; try { <START_BUG> greenTeaObject . put ( "greenName" , "GreenTea" ) ; <END_BUG> greenTeaObject . put ( "l" , Integer . valueOf ( greenTeaL ) ) ; greenTeaObject . put ( "m" , Integer . valueOf ( greenTeaM ) ) ; greenTeaObject . put ( "s" , Integer . valueOf ( greenTeaS ) ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } array . put ( blackTeaObject ) ; array . put ( greenTeaObject ) ; Log . d ( "debug" , array . toString ( ) ) ; SharedPreferences . Editor editor = sp . edit ( ) ; editor . putString ( "status" , array . toString ( ) ) ; editor . commit ( ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
greenTeaObject . put ( "drinkName" , "GreenTea" ) ;
Buggy code:
class RemoveFolderFromIndex extends IndexRequest { IPath folderPath ; char [ ] [ ] exclusionPatterns ; IProject project ; public RemoveFolderFromIndex ( IPath folderPath , char [ ] [ ] exclusionPatterns , IProject project , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { <START_BUG> if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) <END_BUG> return true ; IIndex index = manager . getIndex ( this . indexPath , true , false ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; IQueryResult [ ] results = index . queryInDocumentNames ( this . folderPath . toString ( ) ) ; for ( int i = 0 , max = ( results == null ) ? 0 : results . length ; i < max ; i ++ ) { String documentPath = results [ i ] . getPath ( ) ; if ( ( ( this . exclusionPatterns ) == null ) || ( ! ( Util . isExcluded ( new Path ( documentPath ) , this . exclusionPatterns ) ) ) ) { manager . remove ( documentPath , this . indexPath ) ; } } } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } finally { monitor . exitRead ( ) ; } return true ; } public String toString ( ) { } }

Fix:
if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) )
Buggy code:
public class CallTargetTest extends BuildFileTest { public CallTargetTest ( String name ) { } public void setUp ( ) { } public void testInheritRefFileSet ( ) { } public void testInheritFilterset ( ) { <START_BUG> project . executeTarget ( "testinheritfilterset" ) ; <END_BUG> } public void tearDown ( ) { } }

Fix:
project . executeTarget ( "testinheritreffilterset" ) ;
Buggy code:
public class RestConfigTest extends AbstractTest { private static final String DEVELOPMENT_SQL_SEED_FILE = "src//main//resources//JEngineV2.sql" ; private WebTarget base ; @ AfterClass public static void resetDatabase ( ) throws IOException , SQLException { } @ Override protected Application configure ( ) { <START_BUG> return new ResourceConfig ( RestConfig . class ) ; <END_BUG> } @ Before public void setUpBase ( ) { } public void testChangingConfigOfeMailTasks ( ) { } No newline ; at end ; of file ; }

Fix:
return new ResourceConfig ( RestConfigurator . class ) ;
Buggy code:
public class MissioneWindowAdmin extends AbstractWindow < Missione , MissioneWindowAdmin > { public static final String ID = "missioneadminwindow" ; private static final long serialVersionUID = - 233114930128321445L ; private User user ; private ITipoMissioneForm tipoMissioneForm ; private ILocalitaOggettoMissioneForm localitaOggettoMissioneForm ; private IFondoGAEMissioneForm fondoGAEMissioneForm ; private IVeicoloMissioneForm veicoloMissioneForm ; private IDatiPeriodoMissioneForm datiPeriodoMissioneForm ; protected MissioneWindowAdmin ( ) { } public static MissioneWindowAdmin getMissioneWindowAdmin ( ) { } public MissioneWindowAdmin build ( ) { } private void buildTabs ( ) { } private void buildTabTipoMissione ( ) { } private void buildTabLocalitaOggetto ( ) { <START_BUG> this . localitaOggettoMissioneForm = ILocalitaOggettoMissioneForm . LocalitaOggettoMissioneForm . getDatiPeriodoMissioneForm ( ) . withBean ( bean ) . withIsAdmin ( isAdmin ) . withEnabled ( enabled ) . withIsVisible ( bean . isMissioneEstera ( ) ) . withModifica ( modifica ) . build ( ) ; <END_BUG> detailsWrapper . addComponent ( buildTab ( "Localita\\Oggetto" , SUITCASE , this . localitaOggettoMissioneForm ) ) ; } private void buildTabFondoGAE ( ) { } private void buildTabVeicoloMissione ( ) { } private void buildTabPeriodoMissione ( ) { } private void getUser ( ) { } protected Component buildFooter ( ) { } public MissioneWindowAdmin self ( ) { } }

Fix:
this . localitaOggettoMissioneForm = ILocalitaOggettoMissioneForm . LocalitaOggettoMissioneForm . getDatiPeriodoMissioneForm ( ) . withBean ( bean ) . withIsAdmin ( isAdmin ) . withEnabled ( enabled ) . withModifica ( modifica ) . build ( ) . withIsVisible ( bean . isMissioneEstera ( ) ) ;
Buggy code:
public class RedBlueGraph { protected ArrayLearningGraph brGraph ; protected Set < String > reds ; protected Set < String > blues ; protected SymbolTable < String > nodes = new SymbolTable < String > ( ) ; protected int magicNumber ; public RedBlueGraph ( ) { } public RedBlueGraph ( int mn ) { } @ Before public void setup ( ) { if ( ! ( Logger . getRootLogger ( ) . getAllAppenders ( ) . hasMoreElements ( ) ) ) { BasicConfigurator . configure ( ) ; Logger . getRootLogger ( ) . setLevel ( Level . WARN ) ; } LearningGraphBuilder lgb = new ArrayLearningGraph . ArrayLearningGraphBuilder ( ) ; brGraph = ( ( ArrayLearningGraph ) ( lgb . create ( ) ) ) ; lgb . index ( 1 ) ; <START_BUG> lgb . setGraphSize ( brGraph , 6 , ( - 1 ) ) ; <END_BUG> addColor ( lgb , brGraph , magicNumber , "r" ) ; addColor ( lgb , brGraph , magicNumber , "b" ) ; { int u = nodes . getId ( "b0" ) ; int v = nodes . getId ( "r0" ) ; TObjectDoubleMap < String > ff = new TObjectDoubleHashMap < String > ( ) ; ff . put ( "fromb" , 1.0 ) ; ff . put ( "tor" , 1.0 ) ; lgb . addOutlink ( brGraph , u , new RWOutlink ( ff , v ) ) ; ff = new TObjectDoubleHashMap < String > ( ) ; ff . put ( "fromr" , 1.0 ) ; ff . put ( "tob" , 1.0 ) ; lgb . addOutlink ( brGraph , v , new RWOutlink ( ff , u ) ) ; } reds = new TreeSet < String > ( ) ; blues = new TreeSet < String > ( ) ; for ( int ui = 1 ; ui < 7 ; ui ++ ) { String u = nodes . getSymbol ( ui ) ; if ( u . startsWith ( "b" ) ) blues . add ( u ) ; else reds . add ( u ) ; } moreSetup ( lgb ) ; lgb . freeze ( brGraph ) ; } public void moreSetup ( LearningGraphBuilder lgb ) { } public void addColor ( LearningGraphBuilder lgb , LearningGraph graph , int num , String label ) { } public TIntDoubleMap bluePart ( TIntDoubleMap vec ) { } public Map < String , Double > bluePart ( Map < String , Double > vec ) { } public TIntDoubleMap redPart ( TIntDoubleMap vec ) { } public Map < String , Double > redPart ( Map < String , Double > vec ) { } public Map < String , Double > colorPart ( Set < String > color , Map < String , Double > vec ) { } public TIntDoubleMap colorPart ( final Set < String > color , TIntDoubleMap vec ) { } public void equalScores ( TIntDoubleMap vec1 , TIntDoubleMap vec2 ) { } public void lowerScores ( TObjectDoubleMap < String > vec1 , TObjectDoubleMap < String > vec2 ) { } public void lowerScores ( TIntDoubleMap vec1 , TIntDoubleMap vec2 ) { } No newline ; at end ; of file ; }

Fix:
lgb . setGraphSize ( brGraph , ( ( magicNumber ) * 2 ) , ( - 1 ) ) ;