nus-yam/ex-repair huggingface dataset:
Buggy code:
public class StreamTweets { private ConfigurationBuilder cb = new ConfigurationBuilder ( ) ; public void authenticate ( ) { } public void stream ( Database database ) { TwitterStream twitterStream = new twitter4j . TwitterStreamFactory ( cb . build ( ) ) . getInstance ( ) ; StatusListener listener = new StatusListener ( ) { @ Override public void onException ( Exception arg0 ) { } @ Override public void onDeletionNotice ( StatusDeletionNotice arg0 ) { } @ Override public void onScrubGeo ( long arg0 , long arg1 ) { } @ Override public void onStatus ( Status status ) { User user = status . getUser ( ) ; String name = user . getName ( ) ; String username = status . getUser ( ) . getScreenName ( ) ; String profileLocation = user . getLocation ( ) ; String language = user . getLang ( ) ; long tweetId = status . getId ( ) ; Date dateTime = status . getCreatedAt ( ) ; SimpleDateFormat sdf = new SimpleDateFormat ( ) ; sdf . applyPattern ( "dd//MM//yyyy<seq2seq4repair_space>HH:mm<seq2seq4repair_space>z" ) ; String time = sdf . format ( dateTime ) ; String content = status . getText ( ) ; username = database . makeCompatible ( username ) ; name = database . makeCompatible ( name ) ; profileLocation = database . makeCompatible ( profileLocation ) ; language = database . makeCompatible ( language ) ; time = database . makeCompatible ( time ) ; content = database . makeCompatible ( content ) ; database . insertIntoDatabase ( username , name , profileLocation , language , time , content ) ; } @ Override public void onTrackLimitationNotice ( int arg0 ) { } @ Override public void onStallWarning ( StallWarning warning ) { } } ; FilterQuery fq = new FilterQuery ( ) ; <START_BUG> String [ ] keywords = new String [ ] { "swag" } ; <END_BUG> fq . track ( keywords ) ; twitterStream . addListener ( listener ) ; twitterStream . filter ( fq ) ; } }

Fix:
String [ ] keywords = new String [ ] { "euromast" } ;
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( { ConfiguredResourceAdapterNameTestCase . JmsQueueSetup . class } ) public class ConfiguredResourceAdapterNameTestCase { private static final Logger logger = Logger . getLogger ( ConfiguredResourceAdapterNameTestCase . class ) ; private static final String REPLY_QUEUE_JNDI_NAME = "java:jboss//override-resource-adapter-name-test//replyQueue" ; public static final String QUEUE_JNDI_NAME = "java:jboss//override-resource-adapter-name-test//queue" ; @ EJB ( mappedName = "java:module//JMSMessagingUtil" ) private JMSMessagingUtil jmsUtil ; @ Resource ( mappedName = ConfiguredResourceAdapterNameTestCase . REPLY_QUEUE_JNDI_NAME ) private Queue replyQueue ; @ Resource ( mappedName = ConfiguredResourceAdapterNameTestCase . QUEUE_JNDI_NAME ) private Queue queue ; static class JmsQueueSetup implements ServerSetupTask { private JMSOperations jmsAdminOperations ; @ Override public void setup ( ManagementClient managementClient , String containerId ) throws Exception { } @ Override public void tearDown ( ManagementClient managementClient , String containerId ) throws Exception { } } @ Deployment public static Archive < JavaArchive > getDeployment ( ) { <START_BUG> final JavaArchive ejbJar = ShrinkWrap . create ( JavaArchive . class , "configured-resource-adapter-name-mdb-test.jar" ) . addClasses ( ConfiguredResourceAdapterNameMDB . class , JMSMessagingUtil . class , ConfiguredResourceAdapterNameTestCase . class , ConfiguredResourceAdapterNameTestCase . JmsQueueSetup . class ) . addPackage ( JMSOperations . class . getPackage ( ) ) . addAsManifestResource ( new StringAsset ( "Dependencies:<seq2seq4repair_space>org.jboss.as.controller-client,<seq2seq4repair_space>org.jboss.dmr<seq2seq4repair_space>\n" ) , "MANIFEST.MF" ) . addAsManifestResource ( "ejb//mdb//configuredresourceadapter//jboss-ejb3.xml" , "jboss-ejb3.xml" ) ; <END_BUG> ConfiguredResourceAdapterNameTestCase . logger . info ( ejbJar . toString ( true ) ) ; return ejbJar ; } @ Test public void testMDBWithOverriddenResourceAdapterName ( ) throws Exception { } }

Fix:
final JavaArchive ejbJar = ShrinkWrap . create ( JavaArchive . class , "configured-resource-adapter-name-mdb-test.jar" ) . addClasses ( ConfiguredResourceAdapterNameMDB . class , JMSMessagingUtil . class , ConfiguredResourceAdapterNameTestCase . class , ConfiguredResourceAdapterNameTestCase . JmsQueueSetup . class ) . addPackage ( JMSOperations . class . getPackage ( ) ) . addAsManifestResource ( new StringAsset ( "Dependencies:<seq2seq4repair_space>org.jboss.as.controller-client,<seq2seq4repair_space>org.jboss.dmr<seq2seq4repair_space>\n" ) , "MANIFEST.MF" ) . addAsManifestResource ( ConfiguredResourceAdapterNameTestCase . class . getPackage ( ) , "jboss-ejb3.xml" , "jboss-ejb3.xml" ) ;
Buggy code:
public class NodeCmd { private static final String HOST_OPT_LONG = "host" ; private static final String HOST_OPT_SHORT = "h" ; private static final String PORT_OPT_LONG = "port" ; private static final String PORT_OPT_SHORT = "p" ; private static final int defaultPort = 8080 ; private static Options options = null ; private NodeProbe probe ; public NodeCmd ( NodeProbe probe ) { } private static void printUsage ( ) { } public void printRing ( PrintStream outs ) { <START_BUG> Map < Range , List < String > > rangeMap = probe . getRangeToEndPointMap ( ) ; <END_BUG> List < Range > ranges = new ArrayList < Range > ( rangeMap . keySet ( ) ) ; Collections . sort ( ranges ) ; Set < String > liveNodes = probe . getLiveNodes ( ) ; Set < String > deadNodes = probe . getUnreachableNodes ( ) ; Map < String , String > loadMap = probe . getLoadMap ( ) ; int counter = 0 ; outs . print ( String . format ( "%-14s" , "Address" ) ) ; outs . print ( String . format ( "%-11s" , "Status" ) ) ; outs . print ( String . format ( "%-14s" , "Load" ) ) ; outs . print ( String . format ( "%-43s" , "Range" ) ) ; outs . println ( "Ring" ) ; if ( ( ranges . size ( ) ) > 1 ) { outs . println ( String . format ( "%-14s%-11s%-14s%-43s" , "" , "" , "" , ranges . get ( 0 ) . left ) ) ; } for ( Range range : ranges ) { List < String > endpoints = rangeMap . get ( range ) ; String primaryEndpoint = endpoints . get ( 0 ) ; outs . print ( String . format ( "%-14s" , primaryEndpoint ) ) ; String status = ( liveNodes . contains ( primaryEndpoint ) ) ? "Up" : deadNodes . contains ( primaryEndpoint ) ? "Down" : "?" ; outs . print ( String . format ( "%-11s" , status ) ) ; String load = ( loadMap . containsKey ( primaryEndpoint ) ) ? loadMap . get ( primaryEndpoint ) : "?" ; outs . print ( String . format ( "%-14s" , load ) ) ; outs . print ( String . format ( "%-43s" , range . right ) ) ; String asciiRingArt ; if ( counter == 0 ) { asciiRingArt = "|<--|" ; } else if ( counter == ( ( rangeMap . size ( ) ) - 1 ) ) { asciiRingArt = "|-->|" ; } else { if ( ( ( rangeMap . size ( ) ) > 4 ) && ( ( counter % 2 ) == 0 ) ) asciiRingArt = "v<seq2seq4repair_space>|" ; else if ( ( ( rangeMap . size ( ) ) > 4 ) && ( ( counter % 2 ) != 0 ) ) asciiRingArt = "|<seq2seq4repair_space>^" ; else asciiRingArt = "|<seq2seq4repair_space>|" ; } outs . println ( asciiRingArt ) ; counter ++ ; } } public void printThreadPoolStats ( PrintStream outs ) { } public void printInfo ( PrintStream outs ) { } public void printColumnFamilyStats ( PrintStream outs ) { } public static void main ( String [ ] args ) throws IOException , InterruptedException , ParseException { } }

Fix:
Map < Range , List < String > > rangeMap = probe . getRangeToEndPointMap ( null ) ;
Buggy code:
public class UTF8ZipFilesTest extends TestCase { private static final String UTF_8 = "utf-8" ; private static final String CP437 = "cp437" ; private static final String US_ASCII = "US-ASCII" ; private static final String ASCII_TXT = "ascii.txt" ; private static final String EURO_FOR_DOLLAR_TXT = "€_for_Dollar.txt" ; private static final String OIL_BARREL_TXT = "Ölfässer.txt" ; public void xtestUtf8FileRoundtrip ( ) throws IOException { } public void testUtf8FileRoundtripNoEFS ( ) throws IOException { } public void testCP437FileRoundtrip ( ) throws IOException { } public void testASCIIFileRoundtrip ( ) throws IOException { } public void testRead7ZipArchive ( ) throws IOException , URISyntaxException { } private static void testFileRoundtrip ( String encoding , boolean withEFS ) throws IOException { } private static void createTestFile ( File file , String encoding , boolean withEFS ) throws IOException , UnsupportedEncodingException { ZipArchiveOutputStream zos = null ; try { zos = new ZipArchiveOutputStream ( file ) ; zos . setEncoding ( encoding ) ; <START_BUG> zos . setUseEFS ( withEFS ) ; <END_BUG> ZipArchiveEntry ze = new ZipArchiveEntry ( UTF8ZipFilesTest . OIL_BARREL_TXT ) ; if ( ! ( ZipEncodingHelper . canEncodeName ( ze . getName ( ) , zos . getEncoding ( ) ) ) ) { ze . addExtraField ( new UnicodePathExtraField ( ze . getName ( ) , zos . getEncoding ( ) ) ) ; } zos . putNextEntry ( ze ) ; zos . write ( "Hello,<seq2seq4repair_space>world!" . getBytes ( "US-ASCII" ) ) ; zos . closeEntry ( ) ; ze = new ZipArchiveEntry ( UTF8ZipFilesTest . EURO_FOR_DOLLAR_TXT ) ; if ( ! ( ZipEncodingHelper . canEncodeName ( ze . getName ( ) , zos . getEncoding ( ) ) ) ) { ze . addExtraField ( new UnicodePathExtraField ( ze . getName ( ) , zos . getEncoding ( ) ) ) ; } zos . putNextEntry ( ze ) ; zos . write ( "Give<seq2seq4repair_space>me<seq2seq4repair_space>your<seq2seq4repair_space>money!" . getBytes ( "US-ASCII" ) ) ; zos . closeEntry ( ) ; ze = new ZipArchiveEntry ( UTF8ZipFilesTest . ASCII_TXT ) ; if ( ! ( ZipEncodingHelper . canEncodeName ( ze . getName ( ) , zos . getEncoding ( ) ) ) ) { ze . addExtraField ( new UnicodePathExtraField ( ze . getName ( ) , zos . getEncoding ( ) ) ) ; } zos . putNextEntry ( ze ) ; zos . write ( "ascii" . getBytes ( "US-ASCII" ) ) ; zos . closeEntry ( ) ; } finally { if ( zos != null ) { try { zos . close ( ) ; } catch ( IOException e ) { } } } } private static void testFile ( File file , String encoding ) throws IOException { } private static UnicodePathExtraField findUniCodePath ( ZipArchiveEntry ze ) { } private static void assertUnicodeName ( ZipArchiveEntry ze , String expectedName , String encoding ) throws IOException { } }

Fix:
zos . setUseLanguageEncodingFlag ( withEFS ) ;
Buggy code:
public class Sketch extends Activity { private ImageView plan ; private ImageView planCol ; private Button btnHome ; private OnClickListener btnListener ; private OnTouchListener imgListener ; public void onCreate ( Bundle savedInstanceState ) { } private int getColor ( int x , int y ) { } private void startActivity ( int i ) { Bundle bundle ; Intent intent ; bundle = new Bundle ( ) ; <START_BUG> bundle . putInt ( "room" , 0 ) ; <END_BUG> intent = new Intent ( this , SketchAgenda . class ) ; intent . putExtras ( bundle ) ; this . startActivity ( intent ) ; finish ( ) ; } private class ImageListener implements OnTouchListener { public boolean onTouch ( View v , MotionEvent event ) { } } private class ButtonListener implements OnClickListener { public void onClick ( View v ) { } } No newline ; at end ; of file ; }

Fix:
bundle . putInt ( "room" , i ) ;
Buggy code:
public class GenericsTests extends XMLBasedAjcTestCase { public static Test suite ( ) { } protected File getSpecFile ( ) { } public void testITDReturningParameterizedType ( ) { } public void testPR91267_1 ( ) { } public void testPR91267_2 ( ) { } public void testPR91053 ( ) { } public void testPR87282 ( ) { } public void testPR88606 ( ) { } public void testPR97763 ( ) { } public void testGenericsBang_pr95993 ( ) { } public void testPR96220_GenericAspects1 ( ) { } public void testPR96220_GenericAspects2 ( ) { } public void testPR96220_GenericAspects3 ( ) { } public void testItdNonStaticMethod ( ) { } public void testItdStaticMethod ( ) { } public void testItdCtor ( ) { } public void testItdComplexMethod ( ) { } public void testItdNonStaticMember ( ) { } public void testItdStaticMember ( ) { } public void testPR96220_GenericDecp ( ) { runTest ( "generic<seq2seq4repair_space>decp<seq2seq4repair_space>-<seq2seq4repair_space>simple" ) ; <START_BUG> verifyClassSignature ( "Basic" , "Ljava//lang//Object;LJ<Ljava//lang//Double;>;LI<Ljava//lang//Double;>;" ) ; <END_BUG> } public void testGenericDecpMultipleVariantsOfAParameterizedType1 ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType2 ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType3 ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType4 ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType1_binaryWeaving ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType2_binaryWeaving ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType3_binaryWeaving ( ) { } public void testGenericDecpMultipleVariantsOfAParameterizedType4_binaryWeaving ( ) { } public void testHandlerWithGenerics ( ) { } public void testPointcutsThatDontAllowTypeVars ( ) { } public void testParameterizedTypesInAtPCDs ( ) { } public void testStaticInitializationWithParameterizedTypes ( ) { } public void testExecutionWithRawType ( ) { } public void testExecutionWithRawSignature ( ) { } public void testExecutionWithGenericDeclaringTypeAndErasedParameterTypes ( ) { } private void verifyClassSignature ( String classname , String sig ) { } }

Fix:
verifyClassSignature ( "Basic" , "Ljava//lang//Object;PJ<Ljava//lang//Double;>;PI<Ljava//lang//Double;>;" ) ;
Buggy code:
public class JoinGroupWizardAction implements IObjectActionDelegate { private static final String CONNECT_PROJECT_MENU_TEXT = "Connect<seq2seq4repair_space>Project<seq2seq4repair_space>to<seq2seq4repair_space>Collaboration<seq2seq4repair_space>Group..." ; private static final String DISCONNECT_PROJECT_MENU_TEXT = "Disconnect<seq2seq4repair_space>Project" ; private IResource resource ; private boolean connected = false ; private IWorkbenchPart targetPart ; private ClientEntry isConnected ( IResource res ) { } private void setAction ( IAction action , IResource resource ) { if ( ( isConnected ( resource ) ) != null ) { action . setText ( JoinGroupWizardAction . DISCONNECT_PROJECT_MENU_TEXT ) ; connected = true ; } else { action . setText ( JoinGroupWizardAction . CONNECT_PROJECT_MENU_TEXT ) ; connected = false ; } <START_BUG> action . setEnabled ( resource . isAccessible ( ) ) ; <END_BUG> } public void setActivePart ( IAction action , IWorkbenchPart targetPart ) { } public void run ( IAction action ) { } public void selectionChanged ( IAction action , ISelection selection ) { } }

Fix:
action . setEnabled ( ( resource == null ? false : resource . isAccessible ( ) ) ) ;
Buggy code:
public final class LLRReducerTest extends MahoutTestCase { private static final Logger log = LoggerFactory . getLogger ( LLRReducerTest . class ) ; private Context context ; private LLCallback ll ; private LLCallback cl ; @ Override @ Before public void setUp ( ) throws Exception { } @ Test public void testReduce ( ) throws Exception { LLRReducer reducer = new LLRReducer ( ll ) ; Gram [ ] [ ] input = new Gram [ ] [ ] { new Gram [ ] { new Gram ( "the<seq2seq4repair_space>best" , 1 , Type . NGRAM ) , new Gram ( "the" , 2 , Type . HEAD ) , new Gram ( "best" , 1 , Type . TAIL ) } , new Gram [ ] { new Gram ( "best<seq2seq4repair_space>of" , 1 , Type . NGRAM ) , new Gram ( "best" , 1 , Type . HEAD ) , new Gram ( "of" , 2 , Type . TAIL ) } , new Gram [ ] { new Gram ( "of<seq2seq4repair_space>times" , 2 , Type . NGRAM ) , new Gram ( "of" , 2 , Type . HEAD ) , new Gram ( "times" , 2 , Type . TAIL ) } , new Gram [ ] { new Gram ( "times<seq2seq4repair_space>the" , 1 , Type . NGRAM ) , new Gram ( "times" , 1 , Type . HEAD ) , new Gram ( "the" , 1 , Type . TAIL ) } , new Gram [ ] { new Gram ( "the<seq2seq4repair_space>worst" , 1 , Type . NGRAM ) , new Gram ( "the" , 2 , Type . HEAD ) , new Gram ( "worst" , 1 , Type . TAIL ) } , new Gram [ ] { new Gram ( "worst<seq2seq4repair_space>of" , 1 , Type . NGRAM ) , new Gram ( "worst" , 1 , Type . HEAD ) , new Gram ( "of" , 2 , Type . TAIL ) } } ; int [ ] [ ] expectations = new int [ ] [ ] { new int [ ] { 1 , 1 , 0 , 5 } , new int [ ] { 1 , 0 , 1 , 5 } , new int [ ] { 2 , 0 , 0 , 5 } , new int [ ] { 1 , 0 , 0 , 6 } , new int [ ] { 1 , 1 , 0 , 5 } , new int [ ] { 1 , 0 , 1 , 5 } } ; <START_BUG> Configuration config = new Configuration ( ) ; <END_BUG> config . set ( NGRAM_TOTAL , "7" ) ; EasyMock . expect ( context . getConfiguration ( ) ) . andReturn ( config ) ; for ( int i = 0 ; i < ( expectations . length ) ; i ++ ) { int [ ] ee = expectations [ i ] ; context . write ( EasyMock . eq ( new org . apache . hadoop . io . Text ( input [ i ] [ 0 ] . getString ( ) ) ) , ( ( DoubleWritable ) ( EasyMock . anyObject ( ) ) ) ) ; EasyMock . expect ( ll . logLikelihoodRatio ( ee [ 0 ] , ee [ 1 ] , ee [ 2 ] , ee [ 3 ] ) ) . andDelegateTo ( cl ) ; } EasyMock . replay ( context , ll ) ; reducer . setup ( context ) ; for ( Gram [ ] ii : input ) { Collection < Gram > vv = Lists . newLinkedList ( ) ; vv . addAll ( Arrays . asList ( ii ) . subList ( 1 , ii . length ) ) ; reducer . reduce ( ii [ 0 ] , vv , context ) ; } EasyMock . verify ( ll ) ; } }

Fix:
Configuration config = getConfiguration ( ) ;
Buggy code:
public class Reservation_modified extends Reservation_confirmed { public static String TRC = new String ( ) ; public static String refund = new String ( ) ; public static String Nights = new String ( ) ; public static String penalty = new String ( ) ; private static void createReservation ( String rpID , String policy , String paymentProcessor , boolean isPrivate ) throws InterruptedException { } private static void getCharges ( String paymentProcessor , String rpID_from , String policyType , String modificationType , boolean isPrivate ) throws InterruptedException { } protected static void createReservation ( String paymentProcessor , String rpID_from , String policyType , String modificationType , boolean isPrivate ) throws InterruptedException { } protected static void cPage_verifymodifyPopupCopy ( String policyType ) throws InterruptedException { } protected static void step3_verifymodifyCharge ( String paymentProcessor , String rpID_to , String policyType , boolean hasPenalty_to , String modificationType , boolean isMissing ) throws InterruptedException { getWebBrowser ( ) . findElement ( By . cssSelector ( locator_confirm_button_modifyDatesRooms_Yes ) ) . click ( ) ; Step1_selectDates . select_stayDates ( hasPenalty_to , rpID_to ) ; Step2_showRooms . select_rooms ( paymentProcessor , rpID_to , Compute . getCurrency ( paymentProcessor ) ) ; <START_BUG> Step2_showRooms . go ( ) ; <END_BUG> Step3_payInfo . verify_penalty ( policyType , isMissing , modificationType , "step3" ) ; } protected static void step4_verifymodifyCharge ( String policyType , String modificationType , boolean isMissing ) throws InterruptedException { } protected static void step4_verifyRefund ( String policyType , String modificationType ) throws InterruptedException { } protected static void cPage_verifymodifyCharge ( String paymentProcessor , String rpID_to , String reservationType , String policyType , String modificationType , boolean isMissing , boolean isPrivate ) throws InterruptedException { } protected static void cPage_verifyRefund ( String policyType , String modificationType ) throws InterruptedException { } protected static void cPage_verifyGuestDetails ( String rpID_to , boolean isPrivate ) throws InterruptedException { } protected static void cPage_verifyStayInfo ( String rpID_to , boolean hasPenalty_to , boolean isPrivate ) throws InterruptedException { } protected static void cPage_verifyCopies ( String paymentProcessor , String rpID_to , String reservationType ) throws InterruptedException { } protected static void HE_verifyRsvsnHistory ( String paymentProcessor , String rpID_to , String reservationType , String policyType , boolean isFull , boolean isClicked , boolean isPrivate ) throws AWTException , InterruptedException { } }

Fix:
Step3_payInfo . go ( ) ;
Buggy code:
public class Utilities { public static final Point2D . Double normalize ( Point2D . Double p ) { } public static final Point2D . Double scaleTo ( Point2D . Double p , double newLength ) { double scaleFactor = newLength // ( p . distance ( 0 , 0 ) ) ; <START_BUG> return new Point2D . Double ( ( ( p . x ) // scaleFactor ) , ( ( p . y ) // scaleFactor ) ) ; <END_BUG> } public static final Point2D . Double add ( Point2D . Double p , Point2D . Double v ) { } }

Fix:
return new Point2D . Double ( ( ( p . x ) * scaleFactor ) , ( ( p . y ) * scaleFactor ) ) ;
Buggy code:
public class TestBoolean2 extends LuceneTestCase { private IndexSearcher searcher ; public static final String field = "field" ; public void setUp ( ) throws Exception { super . setUp ( ) ; RAMDirectory directory = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( directory , new WhitespaceAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; for ( int i = 0 ; i < ( docFields . length ) ; i ++ ) { Document doc = new Document ( ) ; doc . add ( new org . apache . lucene . document . Field ( TestBoolean2 . field , docFields [ i ] , Store . NO , Index . ANALYZED ) ) ; writer . addDocument ( doc ) ; } writer . close ( ) ; <START_BUG> searcher = new IndexSearcher ( directory ) ; <END_BUG> } private String [ ] docFields = new String [ ] { "w1<seq2seq4repair_space>w2<seq2seq4repair_space>w3<seq2seq4repair_space>w4<seq2seq4repair_space>w5" , "w1<seq2seq4repair_space>w3<seq2seq4repair_space>w2<seq2seq4repair_space>w3" , "w1<seq2seq4repair_space>xx<seq2seq4repair_space>w2<seq2seq4repair_space>yy<seq2seq4repair_space>w3" , "w1<seq2seq4repair_space>w3<seq2seq4repair_space>xx<seq2seq4repair_space>w2<seq2seq4repair_space>yy<seq2seq4repair_space>w3" } ; public Query makeQuery ( String queryText ) throws ParseException { } public void queriesTest ( String queryText , int [ ] expDocNrs ) throws Exception { } public void testQueries01 ( ) throws Exception { } public void testQueries02 ( ) throws Exception { } public void testQueries03 ( ) throws Exception { } public void testQueries04 ( ) throws Exception { } public void testQueries05 ( ) throws Exception { } public void testQueries06 ( ) throws Exception { } public void testQueries07 ( ) throws Exception { } public void testQueries08 ( ) throws Exception { } public void testQueries09 ( ) throws Exception { } public void testQueries10 ( ) throws Exception { } public void testRandomQueries ( ) throws Exception { } public static interface Callback { public void postCreate ( BooleanQuery q ) { } } public static BooleanQuery randBoolQuery ( Random rnd , int level , String field , String [ ] vals , TestBoolean2 . Callback cb ) { } }

Fix:
searcher = new IndexSearcher ( directory , true ) ;
Buggy code:
public class Proxy extends Thread { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String NEW_LINE = "\n" ; private static final String [ ] headersToRemove ; private static final String PROXY_HEADERS_REMOVE = "proxy.headers.remove" ; private static final String PROXY_HEADERS_REMOVE_DEFAULT = "If-Modified-Since" ; private static final String PROXY_HEADERS_REMOVE_SEPARATOR = "," ; private Socket clientSocket = null ; private ProxyControl target ; private boolean captureHttpHeaders ; private boolean httpsSpoof ; private Map pageEncodings ; private Map formEncodings ; public Proxy ( ) { } Proxy ( Socket clientSocket , ProxyControl target ) { } void configure ( Socket _clientSocket , ProxyControl _target ) { } void configure ( Socket _clientSocket , ProxyControl _target , Map _pageEncodings , Map _formEncodings ) { } public void run ( ) { } private void writeToClient ( SampleResult res , OutputStream out ) throws IOException { } private String massageResponseHeaders ( SampleResult res ) { String headers = res . getResponseHeaders ( ) ; <START_BUG> String [ ] headerLines = headers . split ( Proxy . NEW_LINE , ( - 1 ) ) ; <END_BUG> int contentLengthIndex = - 1 ; boolean fixContentLength = false ; for ( int i = 0 ; i < ( headerLines . length ) ; i ++ ) { String line = headerLines [ i ] ; String [ ] parts = line . split ( ":\\s+" , 2 ) ; if ( ( parts . length ) == 2 ) { if ( TRANSFER_ENCODING . equalsIgnoreCase ( parts [ 0 ] ) ) { headerLines [ i ] = null ; continue ; } if ( ( HEADER_CONTENT_ENCODING . equalsIgnoreCase ( parts [ 0 ] ) ) && ( ENCODING_GZIP . equalsIgnoreCase ( parts [ 1 ] ) ) ) { headerLines [ i ] = null ; fixContentLength = true ; continue ; } if ( HEADER_CONTENT_LENGTH . equalsIgnoreCase ( parts [ 0 ] ) ) { contentLengthIndex = i ; continue ; } } } if ( fixContentLength && ( contentLengthIndex >= 0 ) ) { headerLines [ contentLengthIndex ] = ( ( HTTPConstants . HEADER_CONTENT_LENGTH ) + ":<seq2seq4repair_space>" ) + ( res . getResponseData ( ) . length ) ; } StringBuffer sb = new StringBuffer ( headers . length ( ) ) ; for ( int i = 0 ; i < ( headerLines . length ) ; i ++ ) { String line = headerLines [ i ] ; if ( line != null ) { sb . append ( line ) . append ( Proxy . NEW_LINE ) ; } } return sb . toString ( ) ; } private void writeErrorToClient ( String message ) { } private String addPageEncoding ( SampleResult result ) { } private void addFormEncodings ( SampleResult result , String pageEncoding ) { } private String getContentEncoding ( SampleResult res ) { } private String getUrlWithoutQuery ( URL url ) { } }

Fix:
String [ ] headerLines = headers . split ( Proxy . NEW_LINE , 0 ) ;
Buggy code:
public final class PropertiesLoader { private static final Logger logger = Logger . getLogger ( PropertiesLoader . class . getName ( ) ) ; public static Properties indirectLoad ( String resourceLocation ) { } private final ClassLoader classLoader ; public PropertiesLoader ( ClassLoader classLoader ) { } public PropertiesLoader ( ) { } public Properties loadIndirectly ( String resourceLocation ) { } public Properties load ( String location ) { } public boolean load ( Properties properties , String location ) { } private boolean loadUsingClasspath ( String evalLocation , Properties properties ) { } private boolean loadUsingFilePath ( String evalLocation , Properties properties ) { if ( evalLocation . startsWith ( "file:" ) ) { <START_BUG> evalLocation = evalLocation . substring ( 6 ) ; <END_BUG> } File file = new File ( evalLocation ) ; if ( ! ( file . exists ( ) ) ) { return false ; } try { properties . load ( new FileReader ( file ) ) ; return true ; } catch ( IOException e ) { PropertiesLoader . logger . log ( Level . SEVERE , ( "Error<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>properties<seq2seq4repair_space>file<seq2seq4repair_space>" + evalLocation ) , e ) ; return false ; } } private List < String > getLocations ( String resourceLocations ) { } }

Fix:
evalLocation = evalLocation . substring ( 5 ) ;
Buggy code:
public class FormerBidPlayersJob extends DugoutSpringQuartzJob { private SettingsProvider settingsProvider = new SettingsProvider ( ) ; private PlayerNavigator playerNavigator = new PlayerNavigator ( driver ) ; private FormerBidPlayersContainerRepository repository ; @ Override protected void executeTask ( JobExecutionContext context ) throws ParseException { repository = settingsProvider . getFormerBidPlayersContainerRepository ( ) ; FormerBidPlayersContainer container = repository . findAll ( ) . iterator ( ) . next ( ) ; List < Player > playerList = container . getPlayerList ( ) ; List < Player > notListedPlayers = new ArrayList < > ( ) ; for ( Player player : playerList ) { if ( ( PlayerSellStatus . ALREADY_SOLD ) != ( player . getTransferStatus ( ) ) ) { playerNavigator . refreshPlayer ( player ) ; } if ( ( PlayerSellStatus . NOT_LISTED ) == ( player . getTransferStatus ( ) ) ) { notListedPlayers . add ( player ) ; } } <START_BUG> playerList . removeAll ( notListedPlayers ) ; <END_BUG> repository . save ( container ) ; } }

Fix:
container . removePlayers ( notListedPlayers ) ;
Buggy code:
public class DistributedPearsonCorrelationVectorSimilarity extends AbstractDistributedVectorSimilarity { @ Override <START_BUG> protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , int numberOfColumns ) { <END_BUG> int count = 0 ; double sumX = 0.0 ; double sumY = 0.0 ; double sumXY = 0.0 ; double sumX2 = 0.0 ; double sumY2 = 0.0 ; for ( Cooccurrence cooccurrence : cooccurrences ) { double x = cooccurrence . getValueA ( ) ; double y = cooccurrence . getValueB ( ) ; sumXY += x * y ; sumX += x ; sumX2 += x * x ; sumY += y ; sumY2 += y * y ; count ++ ; } if ( sumXY == 0.0 ) { return Double . NaN ; } double n = count ; double meanX = sumX // n ; double meanY = sumY // n ; double centeredSumXY = sumXY - ( meanY * sumX ) ; double centeredSumX2 = sumX2 - ( meanX * sumX ) ; double centeredSumY2 = sumY2 - ( meanY * sumY ) ; double denominator = ( Math . sqrt ( centeredSumX2 ) ) * ( Math . sqrt ( centeredSumY2 ) ) ; if ( denominator == 0.0 ) { return Double . NaN ; } return centeredSumXY // denominator ; } }

Fix:
protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , long numberOfColumns ) {
Buggy code:
@ RunWith ( JUnit4 . class ) public class RandomTest { @ Test public void shouldBuildRequirementsWithTwoVariables ( ) { } private LeafCount leafCount ( Requirement requirement ) { } private Requirement buildRequirement ( final int CAPACITY , final int SIZE ) { } @ Test public void resultShouldHaveTheCorrectSize ( ) { <START_BUG> final int CAPACITY = 25 ; <END_BUG> final int SIZE = 10000 ; Requirement requirement = buildRequirement ( CAPACITY , SIZE ) ; LeafCount leafCount = leafCount ( requirement ) ; assertThat ( leafCount . get ( ) , is ( equalTo ( SIZE ) ) ) ; } public static BuildRandomizer prepareBuilder ( int capacity , int size ) { } public static RandomTest . LoggedRandomizer prepareLoggedBuilder ( int capacity , int size ) { } @ Test public void testAccumulation ( ) { } @ Test public void testSpeed ( ) { } private static class LoggedRandomizer extends BuildRandomizer { private final List < Command > history ; public LoggedRandomizer ( Builder builder , Random random , int componentCount ) { } @ Override protected void execute ( Command command ) { } public String summary ( ) { } } }

Fix:
final int CAPACITY = 10000 ;
Buggy code:
public abstract class AbstractDistributedZkTestCase extends BaseDistributedSearchTestCase { protected static final String DEFAULT_COLLECTION = "collection1" ; private static final boolean DEBUG = false ; protected ZkTestServer zkServer ; private AtomicInteger homeCount = new AtomicInteger ( ) ; @ BeforeClass public static void beforeThisClass ( ) throws Exception { } @ Before @ Override public void setUp ( ) throws Exception { } @ Override protected void createServers ( int numShards ) throws Exception { } protected void waitForRecoveriesToFinish ( String collection , ZkStateReader zkStateReader , boolean verbose ) throws Exception { } protected void waitForRecoveriesToFinish ( String collection , ZkStateReader zkStateReader , boolean verbose , boolean failOnTimeout ) throws Exception { boolean cont = true ; int cnt = 0 ; while ( cont ) { if ( verbose ) System . out . println ( "-" ) ; boolean sawLiveRecovering = false ; zkStateReader . updateCloudState ( true ) ; CloudState cloudState = zkStateReader . getCloudState ( ) ; Map < String , Slice > slices = cloudState . getSlices ( collection ) ; for ( Map . Entry < String , Slice > entry : slices . entrySet ( ) ) { Map < String , ZkNodeProps > shards = entry . getValue ( ) . getShards ( ) ; for ( Map . Entry < String , ZkNodeProps > shard : shards . entrySet ( ) ) { if ( verbose ) System . out . println ( ( ( ( "rstate:" + ( shard . getValue ( ) . get ( STATE_PROP ) ) ) + "<seq2seq4repair_space>live:" ) + ( cloudState . liveNodesContain ( shard . getValue ( ) . get ( NODE_NAME_PROP ) ) ) ) ) ; String state = shard . getValue ( ) . get ( STATE_PROP ) ; if ( ( ( ( state . equals ( RECOVERING ) ) || ( state . equals ( SYNC ) ) ) || ( state . equals ( DOWN ) ) ) && ( cloudState . liveNodesContain ( shard . getValue ( ) . get ( NODE_NAME_PROP ) ) ) ) { sawLiveRecovering = true ; } } } <START_BUG> if ( ( ! sawLiveRecovering ) || ( cnt == 120 ) ) { <END_BUG> if ( ! sawLiveRecovering ) { if ( verbose ) System . out . println ( "no<seq2seq4repair_space>one<seq2seq4repair_space>is<seq2seq4repair_space>recoverying" ) ; } else { if ( failOnTimeout ) { fail ( "There<seq2seq4repair_space>are<seq2seq4repair_space>still<seq2seq4repair_space>nodes<seq2seq4repair_space>recoverying" ) ; printLayout ( ) ; return ; } if ( verbose ) System . out . println ( "gave<seq2seq4repair_space>up<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>recovery<seq2seq4repair_space>to<seq2seq4repair_space>finish.." ) ; } cont = false ; } else { Thread . sleep ( 1000 ) ; } cnt ++ ; } } protected void assertAllActive ( String collection , ZkStateReader zkStateReader ) throws InterruptedException , KeeperException { } @ Override @ After public void tearDown ( ) throws Exception { } protected void printLayout ( ) throws Exception { } }

Fix:
if ( ( ! sawLiveRecovering ) || ( cnt == 520 ) ) {
Buggy code:
public class XMLResultAggregator extends AbstractTask implements XMLConstants { public static final String DEFAULT_DIR = "." ; public static final String DEFAULT_FILENAME = "TESTS-TestSuites.xml" ; protected ArrayList filesets = new ArrayList ( ) ; protected ArrayList transformers = new ArrayList ( ) ; protected File toDir ; protected String toFile ; private static DocumentBuilder getDocumentBuilder ( ) { } public void setTodir ( File value ) { } public void setTofile ( String value ) { } public void addFileSet ( FileSet fs ) { } public AggregateTransformer createReport ( ) { <START_BUG> AggregateTransformer transformer = new AggregateTransformer ( this ) ; <END_BUG> transformers . add ( transformer ) ; return transformer ; } public void execute ( ) throws TaskException { } protected File getDestinationFile ( ) throws TaskException { } protected File [ ] getFiles ( ) throws TaskException { } protected void addTestSuite ( Element root , Element testsuite ) { } protected Element createDocument ( ) throws TaskException { } protected void writeDOMTree ( Document doc , File file ) throws IOException { } }

Fix:
AggregateTransformer transformer = new AggregateTransformer ( getContext ( ) ) ;
Buggy code:
public class CollectionDerivative extends AbstractDerivative { protected String collection ; public CollectionDerivative ( String collection , PrintStream report , Store store ) { } public void updateChecksum ( boolean force ) throws IOException { } @ Override public void check ( boolean checkBits ) throws IOException { List < String > errors = new ArrayList < > ( ) ; List < String > warnings = new ArrayList < > ( ) ; List < String > loadingErrors = new ArrayList < > ( ) ; BookCollection col = store . loadBookCollection ( collection , loadingErrors ) ; if ( col == null ) { return ; } report . println ( collection ) ; store . check ( col , checkBits , errors , warnings ) ; if ( ! ( errors . isEmpty ( ) ) ) { reportError ( "Errors:" , errors ) ; errors . clear ( ) ; } if ( ! ( warnings . isEmpty ( ) ) ) { reportError ( "Warnings:" , warnings ) ; warnings . clear ( ) ; } for ( String bookName : store . listBooks ( collection ) ) { if ( bookName . endsWith ( ".ignore" ) ) { continue ; } <START_BUG> Book book = store . loadBook ( collection , bookName , loadingErrors ) ; <END_BUG> if ( book == null ) { report . println ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>book.<seq2seq4repair_space>[" + ( collection ) ) + ":" ) + bookName ) + "]" ) ) ; continue ; } report . println ( ( "\n" + bookName ) ) ; store . check ( col , book , checkBits , errors , warnings ) ; if ( ! ( errors . isEmpty ( ) ) ) { reportError ( "Errors:<seq2seq4repair_space>" , errors ) ; errors . clear ( ) ; } if ( ! ( warnings . isEmpty ( ) ) ) { reportError ( "Warnings:<seq2seq4repair_space>" , warnings ) ; warnings . clear ( ) ; } } } }

Fix:
Book book = store . loadBook ( col , bookName , loadingErrors ) ;
Buggy code:
@ SuppressWarnings ( "javadoc" ) public class ApplicationTest { @ Test public void simpleCheck ( ) { } @ Test public void indexTemplateShouldContainTheStringThatIsPassedToIt ( ) { <START_BUG> Helpers . running ( Helpers . fakeApplication ( Helpers . inMemoryDatabase ( "etikett_test" ) ) , ( ) -> { <END_BUG> try { ObjectMapper mapper = MyController . getMapper ( ) ; mapper . setSerializationInclusion ( Include . NON_EMPTY ) ; ApplicationProfile profile = new ApplicationProfile ( ) ; profile . addJsonData ( ( ( List < Etikett > ) ( mapper . readValue ( new FileInputStream ( "test//resources//labels.json" ) , new TypeReference < List < Etikett > > ( ) { } ) ) ) ) ; Map < String , Object > actual = ApplicationProfile . getContext ( ) ; Map < String , Object > expected = mapper . setSerializationInclusion ( Include . NON_NULL ) . readValue ( new File ( "test//resources//context.json" ) , . class ) ; JsonNode actNode = mapper . convertValue ( actual , . class ) ; JsonNode expectNode = mapper . convertValue ( expected , . class ) ; Files . write ( actNode . toString ( ) , new File ( "//tmp//etikett-test.log" ) , Charsets . UTF_8 ) ; boolean result = new CompareJsonMaps ( ) . compare ( actNode , expectNode ) ; org . junit . Assert . assertTrue ( result ) ; } catch ( e ) { e . printStackTrace ( ) ; } } ) ; } }

Fix:
Helpers . running ( Helpers . fakeApplication ( Helpers . inMemoryDatabase ( ) ) , ( ) -> {
Buggy code:
public class TFIDFPartialVectorReducer extends Reducer < WritableComparable < ? > , VectorWritable , WritableComparable < ? > , VectorWritable > { private final OpenIntLongHashMap dictionary = new OpenIntLongHashMap ( ) ; private final TFIDF tfidf = new TFIDF ( ) ; private int minDf = 1 ; private long maxDf = - 1 ; private long vectorCount = 1 ; private long featureCount ; private boolean sequentialAccess ; private boolean namedVector ; @ Override protected void reduce ( WritableComparable < ? > key , Iterable < VectorWritable > values , Context context ) throws IOException , InterruptedException { Iterator < VectorWritable > it = values . iterator ( ) ; if ( ! ( it . hasNext ( ) ) ) { return ; } Vector value = it . next ( ) . get ( ) ; Iterator < Vector . Element > it1 = value . iterateNonZero ( ) ; Vector vector = new org . apache . mahout . math . RandomAccessSparseVector ( ( ( int ) ( featureCount ) ) , value . getNumNondefaultElements ( ) ) ; while ( it1 . hasNext ( ) ) { Vector . Element e = it1 . next ( ) ; if ( ! ( dictionary . containsKey ( e . index ( ) ) ) ) { continue ; } long df = dictionary . get ( e . index ( ) ) ; <START_BUG> if ( ( ( maxDf ) > ( - 1 ) ) && ( df > ( maxDf ) ) ) { <END_BUG> continue ; } if ( df < ( minDf ) ) { df = minDf ; } vector . setQuick ( e . index ( ) , tfidf . calculate ( ( ( int ) ( e . get ( ) ) ) , ( ( int ) ( df ) ) , ( ( int ) ( featureCount ) ) , ( ( int ) ( vectorCount ) ) ) ) ; } if ( sequentialAccess ) { vector = new org . apache . mahout . math . SequentialAccessSparseVector ( vector ) ; } if ( namedVector ) { vector = new org . apache . mahout . math . NamedVector ( vector , key . toString ( ) ) ; } VectorWritable vectorWritable = new VectorWritable ( vector ) ; context . write ( key , vectorWritable ) ; } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { } }

Fix:
if ( ( ( maxDf ) > ( - 1 ) ) && ( ( ( 100.0 * df ) // ( vectorCount ) ) > ( maxDf ) ) ) {
Buggy code:
public class XML11DocumentScannerImpl extends XMLDocumentScannerImpl { private String [ ] fStrings = new String [ 3 ] ; private XMLString fString = new XMLString ( ) ; private XMLStringBuffer fStringBuffer = new XMLStringBuffer ( ) ; private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer ( ) ; private XMLStringBuffer fStringBuffer3 = new XMLStringBuffer ( ) ; public XML11DocumentScannerImpl ( ) { } protected int scanContent ( ) throws IOException , XNIException { } protected void scanXMLDeclOrTextDecl ( boolean scanningTextDecl , String [ ] pseudoAttributeValues ) throws IOException , XNIException { } protected void scanAttributeValue ( XMLString value , XMLString nonNormalizedValue , String atName , XMLAttributes attributes , int attrIndex , boolean checkEntities , String eleName ) throws IOException , XNIException { } protected boolean scanPubidLiteral ( XMLString literal ) throws IOException , XNIException { } protected boolean isInvalid ( int value ) { } protected boolean isInvalidLiteral ( int value ) { } protected boolean isValidNameChar ( int value ) { } protected boolean isValidNameStartChar ( int value ) { } protected boolean versionSupported ( String version ) { <START_BUG> return version . equals ( "1.1" ) ; <END_BUG> } }

Fix:
return ( version . equals ( "1.1" ) ) || ( version . equals ( "1.0" ) ) ;
Buggy code:
public class MarkMessageAsSpamAction extends AbstractColumbaAction implements SelectionListener { public MarkMessageAsSpamAction ( FrameMediator frameMediator ) { } public void selectionChanged ( SelectionChangedEvent e ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new MarkMessageAsSpamCommand ( r ) ) ; } }

Fix:
FolderCommandReference r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class FE { public static void main ( String [ ] args ) throws FileNotFoundException , AdapterInactive , ObjectNotActive , ServantAlreadyActive , WrongPolicy { ORB orb = ORB . init ( args , null ) ; try { POA rootpoa = POAHelper . narrow ( orb . resolve_initial_references ( "RootPOA" ) ) ; <START_BUG> InetSocketAddress testaddress = new InetSocketAddress ( "localhost" , 2020 ) ; <END_BUG> functionImpl FE = new functionImpl ( ) ; FE . start_FE ( 2015 , testaddress ) ; byte [ ] id = rootpoa . activate_object ( FE ) ; Object ref = rootpoa . id_to_reference ( id ) ; String ior = orb . object_to_string ( ref ) ; System . out . println ( ref ) ; PrintWriter file = new PrintWriter ( "ior.txt" ) ; file . println ( ior ) ; file . close ( ) ; rootpoa . the_POAManager ( ) . activate ( ) ; orb . run ( ) ; } catch ( InvalidName e ) { e . printStackTrace ( ) ; } } }

Fix:
InetSocketAddress testaddress = new InetSocketAddress ( "localhost" , 2018 ) ;
Buggy code:
public class GuestbookTest extends TestCase { private static final Log log = LogFactory . getLog ( GuestbookTest . class ) ; @ Override public void setUp ( ) throws Exception { } public void test_1 ( ) throws Exception { WicketTester tester = new WicketTester ( ) ; tester . startPage ( GuestBook . class ) ; tester . assertContains ( "Wicket<seq2seq4repair_space>Examples<seq2seq4repair_space>-<seq2seq4repair_space>guestbook" ) ; tester . assertListView ( "comments" , new ArrayList < Comment > ( ) ) ; tester . assertComponent ( "commentForm" , Form . class ) ; FormTester formTester = tester . newFormTester ( "commentForm" ) ; formTester . setValue ( "text" , "test-1" ) ; formTester . submit ( ) ; tester . assertModelValue ( "comments:0:text" , "test-1" ) ; formTester = tester . newFormTester ( "commentForm" ) ; formTester . setValue ( "text" , "test-2" ) ; formTester . submit ( ) ; tester . assertModelValue ( "comments:0:text" , "test-2" ) ; tester . assertModelValue ( "comments:1:text" , "test-1" ) ; formTester = tester . newFormTester ( "commentForm" ) ; formTester . setValue ( "text" , "test-3" ) ; formTester . setValue ( "comment" , "test-3" ) ; formTester . submit ( ) ; tester . assertModelValue ( "comments:0:text" , "test-2" ) ; tester . assertModelValue ( "comments:1:text" , "test-1" ) ; <START_BUG> tester . assertErrorMessages ( new String [ ] { "Caught<seq2seq4repair_space>a<seq2seq4repair_space>spammer!!!" } ) ; <END_BUG> } }

Fix:
tester . assertErrorMessages ( "Caught<seq2seq4repair_space>a<seq2seq4repair_space>spammer!!!" ) ;
Buggy code:
class LocalOutboundConnectionAdd extends AbstractOutboundConnectionAddHandler { static final LocalOutboundConnectionAdd INSTANCE = new LocalOutboundConnectionAdd ( ) ; private LocalOutboundConnectionAdd ( ) { } @ 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 , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String connectionName = address . getLastElement ( ) . getValue ( ) ; final String outboundSocketBindingRef = OUTBOUND_SOCKET_BINDING_REF . resolveModelAttribute ( context , operation ) . asString ( ) ; final ServiceName outboundSocketBindingDependency = OUTBOUND_SOCKET_BINDING_BASE_SERVICE_NAME . append ( outboundSocketBindingRef ) ; <START_BUG> final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( fullModel . get ( PROPERTY ) ) ; <END_BUG> final LocalOutboundConnectionService outboundConnectionService = new LocalOutboundConnectionService ( connectionName , connectionCreationOptions ) ; final ServiceName serviceName = OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceName aliasServiceName = LOCAL_OUTBOUND_CONNECTION_BASE_SERVICE_NAME . append ( connectionName ) ; final ServiceBuilder < LocalOutboundConnectionService > svcBuilder = context . getServiceTarget ( ) . addService ( serviceName , outboundConnectionService ) . addAliases ( aliasServiceName ) . addDependency ( SUBSYSTEM_ENDPOINT , Endpoint . class , outboundConnectionService . getEndpointInjector ( ) ) . addDependency ( outboundSocketBindingDependency , OutboundSocketBinding . class , outboundConnectionService . getDestinationOutboundSocketBindingInjector ( ) ) ; if ( verificationHandler != null ) { svcBuilder . addListener ( verificationHandler ) ; } return svcBuilder . install ( ) ; } }

Fix:
final OptionMap connectionCreationOptions = ConnectorResource . getOptions ( context , fullModel . get ( PROPERTY ) ) ;