nus-yam/ex-repair huggingface dataset:
Buggy code:
public class DeploymentReplaceHandler implements ModelUpdateOperationHandler , DescriptionProvider { public static final String OPERATION_NAME = "replace-deployment" ; static final ModelNode getOperation ( ModelNode address ) { } public static final DeploymentReplaceHandler INSTANCE = new DeploymentReplaceHandler ( ) ; private final ParametersValidator validator = new ParametersValidator ( ) ; private DeploymentReplaceHandler ( ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public OperationResult execute ( OperationContext context , ModelNode operation , ResultHandler resultHandler ) throws OperationFailedException { try { String failure = validator . validate ( operation ) ; if ( failure == null ) { ModelNode deployments = context . getSubModel ( ) . get ( DEPLOYMENT ) ; String name = operation . require ( NAME ) . asString ( ) ; String toReplace = operation . require ( TO_REPLACE ) . asString ( ) ; ModelNode deployNode = ( DeploymentReplaceHandler . has ( deployments , name ) ) ? deployments . get ( name ) : null ; ModelNode replaceNode = ( DeploymentReplaceHandler . has ( deployments , toReplace ) ) ? deployments . get ( toReplace ) : null ; if ( deployNode == null ) { failure = String . format ( "No<seq2seq4repair_space>deployment<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>%s<seq2seq4repair_space>found" , name ) ; } else if ( deployNode . get ( START ) . asBoolean ( ) ) { failure = String . format ( "Deployment<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>started" , toReplace ) ; } else if ( replaceNode == null ) { failure = String . format ( "No<seq2seq4repair_space>deployment<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>%s<seq2seq4repair_space>found" , toReplace ) ; } if ( failure == null ) { deployNode . get ( START ) . set ( true ) ; replaceNode . get ( START ) . set ( false ) ; ModelNode compensatingOp = operation . clone ( ) ; compensatingOp . get ( NAME ) . set ( toReplace ) ; compensatingOp . get ( TO_REPLACE ) . set ( name ) ; <START_BUG> DeploymentHandlerUtil . replace ( deployNode , toReplace , context , resultHandler , compensatingOp ) ; <END_BUG> } } if ( failure != null ) { throw new OperationFailedException ( new ModelNode ( ) . set ( failure ) ) ; } } catch ( Exception e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . getLocalizedMessage ( ) ) ) ; } return new BasicOperationResult ( ) ; } private static boolean has ( ModelNode node , String child ) { } }

Fix:
DeploymentHandlerUtil . replace ( deployNode , toReplace , context , resultHandler ) ;
Buggy code:
public class Config { private static final String configLocation = "AI\\RikBot\\config.xml" ; private String logOutputFolder = "AI\\RikBot\\logs\\" ; private String chatLog = "chatLog.txt" ; private String strategyFolder = "AI\\RikBot\\data\\" ; private String strategyFileName = "strategy.xml" ; public static void savePersistent ( Config conf ) { } public static Config loadConfig ( ) { } public String getLogOutputFolder ( ) { } public void setLogOutputFolder ( String logOutputFolder ) { } public String getChatLog ( ) { } public void setChatLog ( String chatLog ) { } public String getStrategyFolder ( ) { } public void setStrategyFolder ( String strategyFolder ) { } public String getStrategyFileName ( ) { } public void setStrategyFileName ( String strategyFileName ) { } public String getLogFilePath ( ) { <START_BUG> return ( Config . configLocation ) + ( chatLog ) ; <END_BUG> } public String getStrategyFilePath ( ) { } }

Fix:
return ( logOutputFolder ) + ( chatLog ) ;
Buggy code:
public class SortableListViewHeaders extends WebMarkupContainer { private final SortableListViewHeaderGroup group ; private final Log log = LogFactory . getLog ( SortableListViewHeaders . class ) ; public SortableListViewHeaders ( final String componentName , final ListView listView ) { } protected int compareTo ( final SortableListViewHeader header , final Object o1 , final Object o2 ) { } protected Comparable getObjectToCompare ( final SortableListViewHeader header , final Object object ) { } protected void onRender ( ) { final SortableListViewHeaders me = this ; MarkupStream markupStream = this . findMarkupStream ( ) ; final int markupStart = markupStream . getCurrentIndex ( ) ; ComponentTag tag = markupStream . getTag ( ) ; checkComponentTag ( tag , "thead" ) ; markupStream . next ( ) ; while ( markupStream . hasMore ( ) ) { final MarkupElement element = markupStream . get ( ) ; if ( element instanceof ComponentTag ) { tag = ( ( ComponentTag ) ( element ) ) ; if ( tag . getName ( ) . equalsIgnoreCase ( "th" ) ) { final String componentName = tag . getComponentName ( ) ; if ( ( componentName != null ) && ( ( get ( componentName ) ) == null ) ) { add ( new SortableListViewHeader ( componentName , group ) { <START_BUG> protected int compare ( final Object o1 , final Object o2 ) { <END_BUG> return me . compareTo ( this , o1 , o2 ) ; } protected Comparable getObjectToCompare ( final Object object ) { return me . getObjectToCompare ( this , object ) ; } } ) ; } } } markupStream . next ( ) ; } markupStream . setCurrentIndex ( markupStart ) ; super . onRender ( ) ; } }

Fix:
protected int compareTo ( final Object o1 , final Object o2 ) {
Buggy code:
class GenericOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final GenericOutboundConnectionAdd INSTANCE = new GenericOutboundConnectionAdd ( ) ; static ModelNode getAddOperation ( final String connectionName , final String uri , PathAddress address ) { } private GenericOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( final OperationContext context , final ModelNode operation , final ModelNode fullModel , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final PathAddress pathAddress = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String connectionName = pathAddress . getLastElement ( ) . getValue ( ) ; <START_BUG> final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( fullModel . get ( PROPERTY ) ) ; <END_BUG> final URI uri = getDestinationURI ( context , operation ) ; final GenericOutboundConnectionService outboundRemotingConnectionService = new GenericOutboundConnectionService ( connectionName , uri , connectionCreationOptions ) ; final ServiceName serviceName = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceName aliasServiceName = GENERIC_OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceBuilder < GenericOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundRemotingConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundRemotingConnectionService . getEndpointInjector ( ) ) ; if ( verificationHandler != null ) { svcBuilder . addListener ( verificationHandler ) ; } return svcBuilder . install ( ) ; } URI getDestinationURI ( final OperationContext context , final ModelNode outboundConnection ) throws OperationFailedException { } }

Fix:
final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( context , fullModel . get ( PROPERTY ) ) ;
Buggy code:
@ Path ( "booth" ) @ Produces ( MediaType . APPLICATION_JSON ) public class BookBoothResource { @ GET public String getBookedBooth ( ) throws SQLException { } @ POST public Response insertBookedBoth ( String postData ) throws SQLException , ParseException { String q = "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>book_booth(persons,<seq2seq4repair_space>date_time,<seq2seq4repair_space>name,<seq2seq4repair_space>phone,<seq2seq4repair_space>email)<seq2seq4repair_space>VALUES((?),<seq2seq4repair_space>(?),<seq2seq4repair_space>(?),<seq2seq4repair_space>(?),<seq2seq4repair_space>(?))" ; <START_BUG> try ( Connection conn = Database . getConnection ( ) ; PreparedStatement st = conn . prepareStatement ( q ) ) { <END_BUG> Gson gson = new Gson ( ) ; BookBooth booth = gson . fromJson ( postData , BookBooth . class ) ; Date dateTime = new SimpleDateFormat ( "yy-MM-dd<seq2seq4repair_space>hh:mm" ) . parse ( ( ( ( booth . book_date . trim ( ) ) + "<seq2seq4repair_space>" ) + ( booth . book_time . trim ( ) ) ) ) ; st . setInt ( 1 , booth . persons ) ; st . setTimestamp ( 2 , new Timestamp ( dateTime . getTime ( ) ) ) ; st . setString ( 3 , booth . name ) ; st . setString ( 4 , booth . phone ) ; st . setString ( 5 , booth . email ) ; st . executeUpdate ( ) ; return Response . ok ( new model . UpdateMessage ( "created" , Database . getAutoIncrementID ( st ) ) . toJson ( ) ) . build ( ) ; } } @ PUT @ Path ( "{id:<seq2seq4repair_space>[0-9]+}" ) public Response updateBoothStatus ( @ PathParam ( "id" ) int id , String postData ) throws SQLException { } }

Fix:
try ( Connection conn = Database . getConnection ( ) ; PreparedStatement st = conn . prepareStatement ( q , Statement . RETURN_GENERATED_KEYS ) ) {
Buggy code:
public class SplashScreen extends Canvas { public SplashScreen ( ) { } public void dispose ( ) { } public synchronized void advance ( ) { } public void update ( Graphics g ) { } public synchronized void paint ( Graphics g ) { Dimension size = getSize ( ) ; if ( ( offscreenImg ) == null ) { offscreenImg = createImage ( size . width , size . height ) ; offscreenGfx = offscreenImg . getGraphics ( ) ; offscreenGfx . setFont ( getFont ( ) ) ; } offscreenGfx . setColor ( Color . gray ) ; offscreenGfx . drawRect ( 0 , 0 , ( ( size . width ) - 1 ) , ( ( size . height ) - 1 ) ) ; offscreenGfx . drawImage ( image , 1 , 1 , this ) ; offscreenGfx . setColor ( new Color ( 168 , 173 , 189 ) ) ; offscreenGfx . fillRect ( 1 , ( ( image . getHeight ( this ) ) + 1 ) , ( ( ( ( win . getWidth ( ) ) - 2 ) * ( progress ) ) // 5 ) , SplashScreen . PROGRESS_HEIGHT ) ; offscreenGfx . setColor ( Color . gray ) ; String str = "Version<seq2seq4repair_space>" + ( jEdit . getVersion ( ) ) ; <START_BUG> offscreenGfx . drawString ( str , ( ( ( getWidth ( ) ) - ( fm . stringWidth ( str ) ) ) // 2 ) , ( ( ( ( image . getHeight ( this ) ) + 1 ) - ( fm . getDescent ( ) ) ) - 10 ) ) ; <END_BUG> g . drawImage ( offscreenImg , 0 , 0 , this ) ; notify ( ) ; } private FontMetrics fm ; private Window win ; private Image image ; private Image offscreenImg ; private Graphics offscreenGfx ; private int progress ; private static final int PROGRESS_HEIGHT = 20 ; }

Fix:
offscreenGfx . drawString ( str , ( ( ( getWidth ( ) ) - ( fm . stringWidth ( str ) ) ) // 2 ) , ( ( ( image . getHeight ( this ) ) - ( fm . getDescent ( ) ) ) - 6 ) ) ;
Buggy code:
public class ZoneMobWatcher implements Runnable { private BlockDoor plugin ; private Server server ; private DataWriter dataWriter ; private List < AllZonesList > allZonesList ; private AllZonesListHelper allzoneslisthelper ; private ArrayList < LivingEntity > entityList = new ArrayList < LivingEntity > ( ) ; private double largestSize = 0 ; private int findLiving ; private boolean shouldToggle = false ; public ZoneMobWatcher ( BlockDoor instance ) { } public void run ( ) { } private void testZones ( Zone z , LivingEntity e ) { } private void updateOccupants ( Zone z ) { } private boolean isAggressiveMob ( LivingEntity e ) { } private boolean isPassiveMob ( LivingEntity e ) { } private boolean uzoneDetect ( LivingEntity e , SelectedEntityZone uz ) { Map < Class < ? > , List < String > > mobMap = plugin . datawriter . mobs ; if ( e instanceof Player ) { Player p = ( ( Player ) ( e ) ) ; if ( p . getName ( ) . equals ( uz . uzone_trigger ) ) return true ; <START_BUG> } else <END_BUG> if ( ( ( mobMap . get ( e . getClass ( ) ) ) != null ) && ( mobMap . get ( e . getClass ( ) ) . contains ( uz . uzone_trigger . trim ( ) . toLowerCase ( ) ) ) ) { return true ; } return false ; } private boolean uzoneInteralDetect ( LivingEntity e , SelectedEntityZone uz ) { } private void clearDespawns ( ) { } private boolean findLivingEntity ( Entity entity ) { } private void updateZone ( Zone z ) { } }

Fix:
}
Buggy code:
public class NotLogging { static int runLength ; static final int INITIAL_HASH_SIZE = 101 ; static String SHORT_MSG = "Hello<seq2seq4repair_space>World" ; static Category SHORT_CAT = Category . getInstance ( "A0123456789" ) ; static Category MEDIUM_CAT = Category . getInstance ( "A0123456789.B0123456789" ) ; static Category LONG_CAT = Category . getInstance ( "A0123456789.B0123456789.C0123456789" ) ; static Category INEXISTENT_SHORT_CAT = Category . getInstance ( "I0123456789" ) ; static Category INEXISTENT_MEDIUM_CAT = Category . getInstance ( "I0123456789.B0123456789" ) ; static Category INEXISTENT_LONG_CAT = Category . getInstance ( "I0123456789.B0123456789.C0123456789" ) ; static Category [ ] CAT_ARRAY = new Category [ ] { NotLogging . SHORT_CAT , NotLogging . MEDIUM_CAT , NotLogging . LONG_CAT , NotLogging . INEXISTENT_SHORT_CAT , NotLogging . INEXISTENT_MEDIUM_CAT , NotLogging . INEXISTENT_LONG_CAT } ; static void Usage ( ) { } public static void main ( String [ ] argv ) { } static void ProgramInit ( String [ ] args ) { try { NotLogging . runLength = Integer . parseInt ( args [ 1 ] ) ; } catch ( NumberFormatException e ) { System . err . println ( e ) ; NotLogging . Usage ( ) ; } ConsoleAppender appender = new ConsoleAppender ( new SimpleLayout ( ) ) ; if ( "false" . equals ( args [ 0 ] ) ) { } else if ( "true" . equals ( args [ 0 ] ) ) { System . out . println ( "Flagging<seq2seq4repair_space>as<seq2seq4repair_space>shipped<seq2seq4repair_space>code." ) ; <START_BUG> Category . getDefaultHierarchy ( ) . enable ( Level . WARN ) ; <END_BUG> } else NotLogging . Usage ( ) ; NotLogging . SHORT_CAT . setLevel ( Level . INFO ) ; Category . getRoot ( ) . setLevel ( Level . INFO ) ; } static double SimpleMessage ( Category category , String msg , long runLength ) { } static double FullyOptimizedComplexMessage ( Category category , long runLength ) { } static double ComplexMessage ( Category category , long runLength ) { } }

Fix:
Category . getDefaultHierarchy ( ) . setThreshold ( Level . WARN ) ;
Buggy code:
@ Component ( "cloudify-paas-provider-bean" ) @ Scope ( BeanDefinition . SCOPE_PROTOTYPE ) public class CloudifyPaaSProvider extends AbstractCloudifyPaaSProvider { private PluginConfigurationBean configurationBean = new PluginConfigurationBean ( ) ; private Map < String , CloudifyComputeTemplate > templates ; @ Override protected PluginConfigurationBean getPluginConfigurationBean ( ) { } @ Override public void setConfiguration ( PluginConfigurationBean configuration ) throws PluginConfigurationException { this . configurationBean = configuration ; this . cloudifyRestClientManager . setCloudifyConnectionConfiguration ( configuration . getCloudifyConnectionConfigurations ( ) , configuration . getConnectionTimeOutInSeconds ( ) ) ; try { this . templates = this . cloudifyRestClientManager . getRestClient ( ) . getCloudifyComputeTemplates ( ) ; } catch ( RestClientException e ) { <START_BUG> throw new PluginConfigurationException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>compute<seq2seq4repair_space>templates<seq2seq4repair_space>from<seq2seq4repair_space>cloudify" ) ; <END_BUG> } configureDefault ( ) ; } @ Override public void updateMatcherConfig ( CloudResourceMatcherConfig cloudResourceMatcherConfig ) { } @ Override public String [ ] getAvailableResourceIds ( CloudResourceType resourceType ) { } @ Override public String [ ] getAvailableResourceIds ( CloudResourceType resourceType , String imageId ) { } @ Override public PaaSComputeTemplate [ ] getAvailablePaaSComputeTemplates ( ) { } No newline ; at end ; of file ; }

Fix:
throw new PluginConfigurationException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>compute<seq2seq4repair_space>templates<seq2seq4repair_space>from<seq2seq4repair_space>cloudify:<seq2seq4repair_space>" + ( e . getMessageFormattedText ( ) ) ) , e ) ;
Buggy code:
public class VectorSelectionGenerator { private final int [ ] [ ] query ; private final int [ ] vector ; private boolean eof = false ; private final List < Integer > sizes ; public VectorSelectionGenerator ( Map < Integer , List < Integer > > query , List < Integer > sizes ) { } public boolean hasNext ( ) { } public int [ ] seek ( int [ ] newPosition ) { } private int [ ] reset ( int index ) { } private int seekPos ( int value , int index ) { int [ ] values = query [ index ] ; if ( ( values . length ) == 0 ) { <START_BUG> return ( sizes . get ( index ) ) > value ? value : - 1 ; <END_BUG> } for ( int i = 0 ; i < ( values . length ) ; i ++ ) { if ( ( values [ i ] ) >= value ) { return i ; } } return - 1 ; } public int [ ] getVector ( ) { } public void next ( ) { } }

Fix:
return ( sizes . get ( index ) ) >= value ? value : - 1 ;
Buggy code:
public class SourcePos { private final String _compilationUnit ; private final String _callableName ; private final int _lineNumber ; public SourcePos ( String compilationUnit , String callableName , int lineNumber ) { } public String getCallableName ( ) { } public String getCompilationUnit ( ) { } public int getLineNumber ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( "line<seq2seq4repair_space>" + ( _lineNumber ) ) + "@" ) + ( _callableName ) ) + "<seq2seq4repair_space>[" ) + ( _compilationUnit ) ) + "]" ; <END_BUG> } }

Fix:
return ( ( ( ( ( _callableName ) + "@" ) + ( _lineNumber ) ) + "<seq2seq4repair_space>[" ) + ( _compilationUnit ) ) + "]" ;
Buggy code:
public class BZip2UtilsTestCase extends TestCase { public void testIsCompressedFilename ( ) { } public void testGetUncompressedFilename ( ) { } public void testGetCompressedFilename ( ) { assertEquals ( ".bz2" , BZip2Utils . getCompressedFilename ( "" ) ) ; assertEquals ( "<seq2seq4repair_space>.bz2" , BZip2Utils . getCompressedFilename ( "<seq2seq4repair_space>" ) ) ; assertEquals ( "x.bz2" , BZip2Utils . getCompressedFilename ( "x" ) ) ; assertEquals ( "X.bz2" , BZip2Utils . getCompressedFilename ( "X" ) ) ; assertEquals ( "x.tar.bz2" , BZip2Utils . getCompressedFilename ( "x.tar" ) ) ; <START_BUG> assertEquals ( "x.TAR.bz2" , BZip2Utils . getCompressedFilename ( "x.TAR" ) ) ; <END_BUG> } }

Fix:
assertEquals ( "x.tar.bz2" , BZip2Utils . getCompressedFilename ( "x.TAR" ) ) ;
Buggy code:
public class PlamPictureDetailActivity extends BaseActivity { private ImageView mPicView ; private TextView mContentText ; private AssetManager manager ; private GrowPictureBean detailBean ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void loadRes ( ) { try { InputStream stream = manager . open ( detailBean . getPicture ( ) ) ; mPicView . setImageBitmap ( BitmapFactory . decodeStream ( stream ) ) ; <START_BUG> mContentText . setText ( IOUtils . convertStreamToString ( manager . open ( detailBean . getPicture ( ) . replace ( ".jpg" , ".txt" ) ) ) ) ; <END_BUG> } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
mContentText . setText ( IOUtils . convertStreamToString ( manager . open ( ( ( detailBean . getPicture ( ) . split ( "\\." ) [ 0 ] ) + ".txt" ) ) ) ) ;
Buggy code:
public abstract class ModelTaskAction < O extends ModelIdHoldingOrder > extends DefaultTaskAction < O > { private DirectoryAux directoryAux ; public ModelTaskAction ( final Class < O > orderClass ) { } protected < M > M getModelEntity ( final Class < M > modelClass ) { } protected < M > M getEntity ( final Class < M > modelClass , final String modelId ) { } protected < M > void deleteModelEntity ( final Class < M > modelClass ) { } protected < M > void deleteEntity ( final Class < M > modelClass , final String modelId ) { M model ; EntityManager em = ModelTaskAction . getEmf ( ) . createEntityManager ( ) ; TxFrame tx = new TxFrame ( em ) ; try { model = em . find ( modelClass , modelId ) ; <START_BUG> ModelTaskAction . getEntityManager ( ) . remove ( model ) ; <END_BUG> tx . commit ( ) ; } finally { tx . finish ( ) ; } } public DirectoryAux getDirectoryAux ( ) { } @ Inject public void setDirectoryAux ( final DirectoryAux directoryAux ) { } }

Fix:
em . remove ( model ) ;
Buggy code:
public class PojoTest extends TestCase { @ SuppressWarnings ( "unchecked" ) public void testFunctionStrategy ( ) throws Exception { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public void testFunctionUpper ( ) { PojoExample example = new PojoExample ( ) ; <START_BUG> PojoModel model = new PojoParser ( ) . parse ( example , new FunctionsStrategy ( true , false , "." , false , ( ( Class ) ( null ) ) ) ) . filter ( new DefaultFilter ( ) ) . getModel ( ) ; <END_BUG> System . out . println ( ( "Attributes:<seq2seq4repair_space>" + ( MString . join ( model . getAttributeNames ( ) , ',' ) ) ) ) ; System . out . println ( ( "Actions:<seq2seq4repair_space>" + ( MString . join ( model . getActionNames ( ) , ',' ) ) ) ) ; PojoAttribute < String > myString = model . getAttribute ( "MyString" ) ; assertNotNull ( myString ) ; PojoAction doClean = model . getAction ( "doClean" ) ; assertNotNull ( doClean ) ; PojoAttribute < String > line1 = model . getAttribute ( "MyEmbedded.Line1" ) ; assertNotNull ( line1 ) ; PojoAttribute < String > myhidden = model . getAttribute ( "MyHidden" ) ; assertNull ( myhidden ) ; } @ SuppressWarnings ( { "unchecked" , "unused" } ) public void testAttributeStrategy ( ) throws Exception { } @ SuppressWarnings ( { "unchecked" , "unused" } ) public void testDefaultStrategy ( ) throws Exception { } }

Fix:
PojoModel model = new PojoParser ( ) . parse ( example , new FunctionsStrategy ( true , false , "." , false ) ) . filter ( new DefaultFilter ( ) ) . getModel ( ) ;
Buggy code:
public class AbstractLeastSquaresOptimizerTest { public static AbstractLeastSquaresOptimizer createOptimizer ( ) { <START_BUG> return new AbstractLeastSquaresOptimizer ( ) { <END_BUG> @ Override protected PointVectorValuePair doOptimize ( ) { updateResidualsAndCost ( ) ; updateJacobian ( ) ; return null ; } } ; } @ Test public void testGetChiSquare ( ) throws IOException { } @ Test public void testGetRMS ( ) throws IOException { } @ Test public void testGetSigma ( ) throws IOException { } }

Fix:
return new AbstractLeastSquaresOptimizer ( null ) {
Buggy code:
public class ProcessFile { public static void main ( String [ ] args ) throws IOException { } public static void process ( File file ) throws IOException { String filename = file . getName ( ) ; FileHasher hasher = new FileHasher ( ) ; String ac = hasher . makeArtifactCode ( new FileInputStream ( file ) ) ; String ext = "" ; String base = filename ; if ( filename . matches ( ".+\\.[A-Za-z0-9\\-_]{0,20}" ) ) { ext = filename . replaceFirst ( "^(.*)(\\.[A-Za-z0-9\\-_]{0,20})$" , "$2" ) ; base = filename . replaceFirst ( "^(.*)(\\.[A-Za-z0-9\\-_]{0,20})$" , "$1" ) ; } String glue = "" ; if ( ( ( base . length ( ) ) > 0 ) && ( ( base . charAt ( ( ( base . length ( ) ) - 1 ) ) ) != '.' ) ) { glue = "." ; } <START_BUG> File hashFile = new File ( ( ( ( base + glue ) + ac ) + ext ) ) ; <END_BUG> file . renameTo ( hashFile ) ; } }

Fix:
File hashFile = new File ( file . getParentFile ( ) , ( ( ( base + glue ) + ac ) + ext ) ) ;
Buggy code:
public class EmbededTomcat { ContextManager contextM = null ; Object application ; Vector requestInt = null ; Vector contextInt = null ; FacadeManager facadeM = null ; Vector connectors = new Vector ( ) ; String workDir ; Helper loghelper = new Logger . Helper ( "tc_log" , this ) ; int debug = 0 ; public EmbededTomcat ( ) { } public void setDebug ( int debug ) { } public void addApplicationAdapter ( Object adapter ) { } public void setApplication ( Object app ) { } public Object getApplication ( ) { } public void setWorkDir ( String dir ) { } public void addEndpoint ( int port , InetAddress addr , String hostname ) { } public void addSecureEndpoint ( int port , InetAddress addr , String hostname , String keyFile , String keyPass ) { if ( ( debug ) > 0 ) log ( ( ( ( ( ( "addSecureConnector<seq2seq4repair_space>" + port ) + "<seq2seq4repair_space>" ) + addr ) + "<seq2seq4repair_space>" ) + hostname ) ) ; PoolTcpConnector sc = new PoolTcpConnector ( ) ; sc . setServer ( contextM ) ; sc . setAttribute ( "vhost_port" , new Integer ( port ) ) ; if ( addr != null ) sc . setAttribute ( "vhost_address" , addr ) ; if ( hostname != null ) sc . setAttribute ( "vhost_name" , hostname ) ; sc . setAttribute ( "socketFactory" , "org.apache.tomcat.net.SSLSocketFactory" ) ; <START_BUG> HttpConnectionHandler ch = new HttpConnectionHandler ( ) ; <END_BUG> hc . setSecure ( true ) ; sc . setTcpConnectionHandler ( hc ) ; contextM . addServerConnector ( sc ) ; } public ServletContext addContext ( String ctxPath , URL docRoot ) { } public void removeContext ( ServletContext sctx ) { } Hashtable extraClassPaths = new Hashtable ( ) ; public void addClassPath ( ServletContext context , String cpath ) { } public ServletContext getServletContext ( String host , String cpath ) { } public void initContext ( ServletContext sctx ) { } public void destroyContext ( ServletContext ctx ) { } public void start ( ) { } public void stop ( ) { } public void addRequestInterceptor ( RequestInterceptor ri ) { } public void addContextInterceptor ( ContextInterceptor ci ) { } private void initContextManager ( ) { } private void initDefaultInterceptors ( ) { } private void log ( String s ) { } private void log ( String s , Throwable t ) { } private void log ( String s , int level ) { } private void log ( String s , Throwable t , int level ) { } public static void main ( String [ ] args ) { } }

Fix:
HttpConnectionHandler hc = new HttpConnectionHandler ( ) ;
Buggy code:
class JPASubSystemAdd extends AbstractBoottimeAddStepHandler implements DescriptionProvider { static ModelNode getAddOperation ( ModelNode address , ModelNode currentModel ) { } static final String OPERATION_NAME = ADD ; static final JPASubSystemAdd INSTANCE = new JPASubSystemAdd ( ) ; private ParametersValidator modelValidator = new ParametersValidator ( ) ; private ParametersValidator runtimeValidator = new ParametersValidator ( ) ; private JPASubSystemAdd ( ) { } protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { runtimeValidator . validate ( operation . resolve ( ) ) ; context . addStep ( new AbstractDeploymentChainStep ( ) { protected void execute ( DeploymentProcessorTarget processorTarget ) { PersistenceProviderResolverHolder . setPersistenceProviderResolver ( PersistenceProviderResolverImpl . getInstance ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_PERSISTENCE_UNIT , new PersistenceUnitParseProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( PARSE , PARSE_PERSISTENCE_ANNOTATION , new JPAAnnotationParseProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( DEPENDENCIES , DEPENDENCIES__INJECT_JPA_DEPENDENCIES , new JPADependencyProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( POST_MODULE , POST_MODULE_PERSISTENCE_REF , new PersistenceRefProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_JPA_INTERCEPTORS , new JPAInterceptorProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_PERSISTENCE_PROVIDER , new PersistenceProviderProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( INSTALL , INSTALL_PERSISTENTUNIT , new PersistenceUnitDeploymentProcessor ( ) ) ; } } , RUNTIME ) ; final ModelNode defaultDSNode = operation . require ( DEFAULT_DATASOURCE ) ; final String dataSourceName = defaultDSNode . resolve ( ) . asString ( ) ; final ServiceTarget target = context . getServiceTarget ( ) ; newControllers . add ( JPAService . addService ( target , dataSourceName , verificationHandler ) ) ; } @ Override public ModelNode getModelDescription ( Locale locale ) { } }

Fix:
processorTarget . addDeploymentProcessor ( DEPENDENCIES , DEPENDENCIES_JPA , new JPADependencyProcessor ( ) ) ;
Buggy code:
class JobInfo extends JobTreeElement { private IStatus blockedStatus ; private volatile boolean canceled = false ; private List children = Collections . synchronizedList ( new ArrayList ( ) ) ; private Job job ; private GroupInfo parent ; private TaskInfo taskInfo ; private int ticks = - 1 ; JobInfo ( Job enclosingJob ) { } void addSubTask ( String subTaskName ) { } void addWork ( double workIncrement ) { } void beginTask ( String taskName , int work ) { } public void cancel ( ) { } void clearChildren ( ) { } void clearTaskInfo ( ) { } private int compareJobs ( JobInfo jobInfo ) { } public int compareTo ( Object arg0 ) { } void dispose ( ) { } public IStatus getBlockedStatus ( ) { } Object [ ] getChildren ( ) { } String getCondensedDisplayString ( ) { } public Image getDisplayImage ( ) { } String getDisplayString ( ) { } String getDisplayString ( boolean showProgress ) { } private String getDisplayStringWithStatus ( boolean showProgress ) { } GroupInfo getGroupInfo ( ) { <START_BUG> if ( ( ( parent ) != null ) && ( parent . isActive ( ) ) ) { <END_BUG> return parent ; } return null ; } Job getJob ( ) { } Object getParent ( ) { } int getPercentDone ( ) { } TaskInfo getTaskInfo ( ) { } boolean hasChildren ( ) { } boolean hasTaskInfo ( ) { } boolean isActive ( ) { } public boolean isBlocked ( ) { } public boolean isCanceled ( ) { } public boolean isCancellable ( ) { } boolean isJobInfo ( ) { } public void setBlockedStatus ( IStatus blockedStatus ) { } void setGroupInfo ( GroupInfo group ) { } void setTaskName ( String name ) { } public void setTicks ( int ticks ) { } }

Fix:
if ( ( parent ) != null ) {
Buggy code:
public class TransformerSubsystemTestCase extends AbstractSubsystemBaseTest { public TransformerSubsystemTestCase ( ) { } @ BeforeClass public static void createLegacyJar ( ) throws MalformedURLException { } @ Override protected String getSubsystemXml ( ) throws IOException { } @ Test public void testTransformers ( ) throws Exception { ModelVersion oldVersion = ModelVersion . create ( 1 , 0 , 0 ) ; KernelServicesBuilder builder = createKernelServicesBuilder ( null ) . setSubsystemXml ( getSubsystemXml ( ) ) ; builder . createLegacyKernelServicesBuilder ( null , oldVersion ) . setExtensionClassName ( VersionedExtension1 . class . getName ( ) ) . addSimpleResourceURL ( "target//legacy-archive.jar" ) ; KernelServices mainServices = builder . build ( ) ; KernelServices legacyServices = mainServices . getLegacyServices ( oldVersion ) ; Assert . assertNotNull ( legacyServices ) ; ModelNode mainModel = mainServices . readWholeModel ( ) ; ModelNode mainSubsystem = mainModel . get ( SUBSYSTEM , "test-subsystem" ) ; Assert . assertEquals ( 3 , mainSubsystem . keys ( ) . size ( ) ) ; Assert . assertEquals ( "This<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>a<seq2seq4repair_space>test" , mainSubsystem . get ( "test-attribute" ) . asString ( ) ) ; Assert . assertTrue ( mainSubsystem . hasDefined ( "new-element" ) ) ; Assert . assertTrue ( mainSubsystem . get ( "new-element" ) . hasDefined ( "test" ) ) ; Assert . assertTrue ( mainSubsystem . hasDefined ( "renamed" ) ) ; Assert . assertTrue ( mainSubsystem . get ( "renamed" ) . hasDefined ( "element" ) ) ; ModelNode legacyModel = legacyServices . readWholeModel ( ) ; ModelNode legacySubsystem = legacyModel . get ( SUBSYSTEM , "test-subsystem" ) ; Assert . assertEquals ( 2 , legacySubsystem . keys ( ) . size ( ) ) ; Assert . assertEquals ( "This<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>a<seq2seq4repair_space>test" , legacySubsystem . get ( "test-attribute" ) . asString ( ) ) ; Assert . assertTrue ( legacySubsystem . hasDefined ( "element" ) ) ; Assert . assertTrue ( legacySubsystem . get ( "element" ) . hasDefined ( "renamed" ) ) ; generateLegacySubsystemResourceRegistrationDmr ( mainServices , oldVersion ) ; <START_BUG> checkSubsystemTransformer ( mainServices , oldVersion ) ; <END_BUG> } }

Fix:
checkSubsystemModelTransformation ( mainServices , oldVersion ) ;
Buggy code:
public class dbcontrol { public ArrayList < Entry > entrylist = new ArrayList < > ( ) ; public ArrayList < user > userlist = new ArrayList < > ( ) ; public ArrayList < entrykind > entrykindlist = new ArrayList < > ( ) ; public ArrayList < userrole > userrolelist = new ArrayList < > ( ) ; ArrayList < Entry > choosedlist = new ArrayList < > ( ) ; public user CurrentUser = null ; public userrole CurrentUserRole = null ; public dbcontrol ( ) { } public void refresh ( ) { } public Boolean backup ( ) { } public Boolean readdb ( String table ) { } public Boolean readdb ( ) { } public Boolean writedb ( ) { } public Boolean writedb ( String path ) { } public String [ ] getentrydata ( int euid ) { } public ArrayList getsearchedlist ( String pattern ) { } public Boolean setentryinactive ( int uid ) { } public void setcurrentuser ( int id ) { } public void setcurrentuser ( String loginname ) { } public Boolean candelete ( ) { } public Boolean canchangerole ( ) { } public Boolean candeleteuser ( ) { } public Boolean canedit ( ) { } public Boolean canedituser ( ) { } public Boolean cannew ( ) { } public Boolean cannewuser ( ) { } public Boolean cannewpw ( ) { } public Boolean canrestore ( ) { } public Boolean updateentry ( int kUID , String kname , String kone , String ktwo , String kthree , String kfour , String kfive , Boolean kcheck , String ksp ) { } public Boolean newentry ( String kname , String kone , String ktwo , String kthree , String kfour , String kfive , Boolean kcheck , int kkindid , String ksp ) { } public Entry getPrevEntry ( Entry now ) { } public Entry getNextEntry ( Entry now ) { } public int logincheck ( String klogin , String kpw ) { } public Boolean deleteentry ( int kuid ) { } public void setnewpassword ( String loginname , String newpw ) { } public void setnewpasswordindicator ( int kuid ) { for ( user i : userlist ) { if ( ( i . UID ) == kuid ) { <START_BUG> i . getnewpassword ( ) ; <END_BUG> } } } public void setnewpassword ( int kuid , String newpw ) { } public String getcurrentname ( ) { } public void login ( String klogin ) { } public void logoff ( ) { } public void logoffforce ( ) { } public entrykind getentrydesc ( int kuid ) { } public void tsetnewuser ( int UID , String kname , String kloginname , String kpasswort , int kroleid ) { } public void tsetnewrole ( int UID , String kname , Boolean kcanNew , Boolean kcanEdit , Boolean kcanDelete , Boolean kcanRestore , Boolean kcanNewUser , Boolean kcanNewPW , Boolean kcanEditUser , Boolean kcanChangeRole , Boolean kcanDeleteUser ) { } public void tsetnewentry ( int kuid , String kname , String kone , String ktwo , String kthree , String kfour , String kfive , String kcomment , int kprev , int knext , int kkindid , Boolean check , String ksp , Calendar modified ) { } public void tsetnewentrykind ( int kUID , String kdesc , String kone , String ktwo , String kthree , String kfour , String kfive , String kchecktext ) { } }

Fix:
i . setnewpassword ( ) ;
Buggy code:
public class DsXmlParser extends DsParser { private final PropertyResolver propertyResolver ; public DsXmlParser ( PropertyResolver propertyResolver ) { } @ Override protected DsSecurity parseDsSecurity ( XMLStreamReader reader ) throws XMLStreamException , ValidateException , ParserException { String userName = null ; String password = null ; String securityDomain = null ; Extension reauthPlugin = null ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case XMLStreamConstants . END_ELEMENT : { if ( ( Tag . forName ( reader . getLocalName ( ) ) ) == ( Tag . SECURITY ) ) { return new org . jboss . jca . common . metadata . ds . DsSecurityImpl ( userName , password , securityDomain , reauthPlugin ) ; } else { if ( ( DsSecurity . Tag . forName ( reader . getLocalName ( ) ) ) == ( DsSecurity . Tag . UNKNOWN ) ) { throw new ParserException ( bundle . unexpectedEndTag ( reader . getLocalName ( ) ) ) ; } } break ; } case XMLStreamConstants . START_ELEMENT : { DsSecurity . Tag tag = DsSecurity . Tag . forName ( reader . getLocalName ( ) ) ; switch ( tag ) { case PASSWORD : { password = elementAsString ( reader ) ; <START_BUG> if ( ( ( propertyResolver ) != null ) && ( password != null ) ) { <END_BUG> String resolvedPassword = propertyResolver . resolve ( password ) ; if ( resolvedPassword != null ) password = resolvedPassword ; } break ; } case USER_NAME : { userName = elementAsString ( reader ) ; break ; } case SECURITY_DOMAIN : { securityDomain = elementAsString ( reader ) ; break ; } case REAUTH_PLUGIN : { reauthPlugin = parseExtension ( reader , tag . getLocalName ( ) ) ; break ; } default : throw new ParserException ( bundle . unexpectedElement ( reader . getLocalName ( ) ) ) ; } break ; } } } throw new ParserException ( bundle . unexpectedEndOfDocument ( ) ) ; } @ Override protected Credential parseCredential ( XMLStreamReader reader ) throws XMLStreamException , ValidateException , ParserException { } }

Fix:
if ( ( ( ( propertyResolver ) != null ) && ( password != null ) ) && ( ( password . trim ( ) . length ( ) ) != 0 ) ) {
Buggy code:
public class EqualsBuilder implements Builder < Boolean > { private static final ThreadLocal < Set < Pair < IDKey , IDKey > > > REGISTRY = new ThreadLocal < Set < Pair < IDKey , IDKey > > > ( ) ; static Set < Pair < IDKey , IDKey > > getRegistry ( ) { } static Pair < IDKey , IDKey > getRegisterPair ( Object lhs , Object rhs ) { } static boolean isRegistered ( Object lhs , Object rhs ) { Set < Pair < IDKey , IDKey > > registry = EqualsBuilder . getRegistry ( ) ; Pair < IDKey , IDKey > pair = EqualsBuilder . getRegisterPair ( lhs , rhs ) ; <START_BUG> Pair < IDKey , IDKey > swappedPair = Pair . of ( pair . getLeftElement ( ) , pair . getRightElement ( ) ) ; <END_BUG> return ( registry != null ) && ( ( registry . contains ( pair ) ) || ( registry . contains ( swappedPair ) ) ) ; } static void register ( Object lhs , Object rhs ) { } static void unregister ( Object lhs , Object rhs ) { } private boolean isEquals = true ; public EqualsBuilder ( ) { } public static boolean reflectionEquals ( Object lhs , Object rhs , Collection < String > excludeFields ) { } public static boolean reflectionEquals ( Object lhs , Object rhs , String ... excludeFields ) { } public static boolean reflectionEquals ( Object lhs , Object rhs , boolean testTransients ) { } public static boolean reflectionEquals ( Object lhs , Object rhs , boolean testTransients , Class < ? > reflectUpToClass , String ... excludeFields ) { } private static void reflectionAppend ( Object lhs , Object rhs , Class < ? > clazz , EqualsBuilder builder , boolean useTransients , String [ ] excludeFields ) { } public EqualsBuilder appendSuper ( boolean superEquals ) { } public EqualsBuilder append ( Object lhs , Object rhs ) { } public EqualsBuilder append ( long lhs , long rhs ) { } public EqualsBuilder append ( int lhs , int rhs ) { } public EqualsBuilder append ( short lhs , short rhs ) { } public EqualsBuilder append ( char lhs , char rhs ) { } public EqualsBuilder append ( byte lhs , byte rhs ) { } public EqualsBuilder append ( double lhs , double rhs ) { } public EqualsBuilder append ( float lhs , float rhs ) { } public EqualsBuilder append ( boolean lhs , boolean rhs ) { } public EqualsBuilder append ( Object [ ] lhs , Object [ ] rhs ) { } public EqualsBuilder append ( long [ ] lhs , long [ ] rhs ) { } public EqualsBuilder append ( int [ ] lhs , int [ ] rhs ) { } public EqualsBuilder append ( short [ ] lhs , short [ ] rhs ) { } public EqualsBuilder append ( char [ ] lhs , char [ ] rhs ) { } public EqualsBuilder append ( byte [ ] lhs , byte [ ] rhs ) { } public EqualsBuilder append ( double [ ] lhs , double [ ] rhs ) { } public EqualsBuilder append ( float [ ] lhs , float [ ] rhs ) { } public EqualsBuilder append ( boolean [ ] lhs , boolean [ ] rhs ) { } public boolean isEquals ( ) { } public Boolean build ( ) { } protected void setEquals ( boolean isEquals ) { } public void reset ( ) { } }

Fix:
Pair < IDKey , IDKey > swappedPair = Pair . of ( pair . getLeft ( ) , pair . getRight ( ) ) ;
Buggy code:
public class PresentationFactoryUtil { public static final int ROLE_EDITOR = 1 ; public static final int ROLE_VIEW = 2 ; public static final int ROLE_STANDALONE = 3 ; public static final int ROLE_STANDALONE_NOTITLE = 4 ; public static StackPresentation createPresentation ( AbstractPresentationFactory factory , int role , Composite parent , IStackPresentationSite site , IPresentationSerializer serializer , IMemento memento ) { StackPresentation presentation = null ; switch ( role ) { case PresentationFactoryUtil . ROLE_EDITOR : presentation = factory . createEditorPresentation ( parent , site ) ; break ; case PresentationFactoryUtil . ROLE_STANDALONE : presentation = factory . createStandaloneViewPresentation ( parent , site , true ) ; break ; case PresentationFactoryUtil . ROLE_STANDALONE_NOTITLE : <START_BUG> presentation = factory . createStandaloneViewPresentation ( parent , site , true ) ; <END_BUG> break ; default : presentation = factory . createViewPresentation ( parent , site ) ; } if ( ( memento != null ) && ( serializer != null ) ) { presentation . restoreState ( serializer , memento ) ; } return presentation ; } private PresentationFactoryUtil ( ) { } }

Fix:
presentation = factory . createStandaloneViewPresentation ( parent , site , false ) ;
Buggy code:
public class LazilyCompactedRow extends AbstractCompactedRow implements IIterableColumns { private final List < SSTableIdentityIterator > rows ; private final boolean shouldPurge ; private final int gcBefore ; private final DataOutputBuffer headerBuffer ; private ColumnFamily emptyColumnFamily ; private LazilyCompactedRow . LazyColumnIterator iter ; private int columnCount ; private long columnSerializedSize ; public LazilyCompactedRow ( ColumnFamilyStore cfStore , List < SSTableIdentityIterator > rows , boolean major , int gcBefore ) { } public void write ( DataOutput out ) throws IOException { <START_BUG> if ( ( ( rows . size ( ) ) == 1 ) && ( ! ( shouldPurge ) ) ) { <END_BUG> SSTableIdentityIterator row = rows . get ( 0 ) ; out . writeLong ( row . dataSize ) ; row . echoData ( out ) ; return ; } DataOutputBuffer clockOut = new DataOutputBuffer ( ) ; ColumnFamily . serializer ( ) . serializeCFInfo ( emptyColumnFamily , clockOut ) ; out . writeLong ( ( ( ( headerBuffer . getLength ( ) ) + ( clockOut . getLength ( ) ) ) + ( columnSerializedSize ) ) ) ; out . write ( headerBuffer . getData ( ) , 0 , headerBuffer . getLength ( ) ) ; out . write ( clockOut . getData ( ) , 0 , clockOut . getLength ( ) ) ; out . writeInt ( columnCount ) ; Iterator < IColumn > iter = iterator ( ) ; while ( iter . hasNext ( ) ) { IColumn column = iter . next ( ) ; emptyColumnFamily . getColumnSerializer ( ) . serialize ( column , out ) ; } } public void update ( MessageDigest digest ) { } public boolean isEmpty ( ) { } public int getEstimatedColumnCount ( ) { } public AbstractType getComparator ( ) { } public Iterator < IColumn > iterator ( ) { } public int columnCount ( ) { } private class LazyColumnIterator extends ReducingIterator < IColumn , IColumn > { ColumnFamily container = emptyColumnFamily . cloneMeShallow ( ) ; long serializedSize = 4 ; int size = 0 ; public LazyColumnIterator ( Iterator < IColumn > source ) { } @ Override protected boolean isEqual ( IColumn o1 , IColumn o2 ) { } public void reduce ( IColumn current ) { } protected IColumn getReduced ( ) { } } }

Fix:
if ( ( ( ( rows . size ( ) ) == 1 ) && ( ! ( shouldPurge ) ) ) && ( rows . get ( 0 ) . sstable . descriptor . isLatestVersion ) ) {
Buggy code:
class GenericOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final GenericOutboundConnectionAdd INSTANCE = new GenericOutboundConnectionAdd ( ) ; static ModelNode getAddOperation ( final String connectionName , final String uri , final Map < String , String > connectionCreationOptions ) { if ( ( connectionName == null ) || ( connectionName . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( "Connection<seq2seq4repair_space>name<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>or<seq2seq4repair_space>empty" ) ; } if ( ( uri == null ) || ( uri . trim ( ) . isEmpty ( ) ) ) { throw new IllegalArgumentException ( ( "Connection<seq2seq4repair_space>URI<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null<seq2seq4repair_space>for<seq2seq4repair_space>connection<seq2seq4repair_space>named<seq2seq4repair_space>" + connectionName ) ) ; } final ModelNode addOperation = new ModelNode ( ) ; addOperation . get ( OP ) . set ( ADD ) ; final PathAddress address = PathAddress . pathAddress ( PathElement . pathElement ( SUBSYSTEM , SUBSYSTEM_NAME ) , PathElement . pathElement ( OUTBOUND_CONNECTION , connectionName ) ) ; addOperation . get ( OP_ADDR ) . set ( address . toModelNode ( ) ) ; addOperation . get ( URI ) . set ( uri ) ; if ( connectionCreationOptions != null ) { for ( final Map . Entry < String , String > entry : connectionCreationOptions . entrySet ( ) ) { if ( ( entry . getKey ( ) ) == null ) { continue ; } <START_BUG> addOperation . get ( CONNECTION_CREATION_OPTIONS ) . set ( entry . getKey ( ) , entry . getValue ( ) ) ; <END_BUG> } } return addOperation ; } private GenericOutboundConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } ServiceController installRuntimeService ( OperationContext context , final String connectionName , ModelNode outboundConnection , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } java . net . URI getDestinationURI ( final OperationContext context , final ModelNode outboundConnection ) throws OperationFailedException { } }

Fix:
addOperation . get ( CONNECTION_CREATION_OPTIONS ) . add ( entry . getKey ( ) , entry . getValue ( ) ) ;