nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CommandContext { protected String [ ] args ; protected final Set < Character > flags = new HashSet < Character > ( ) ; private Location location = null ; private final CommandSender sender ; protected final Map < String , String > valueFlags = Maps . newHashMap ( ) ; public CommandContext ( CommandSender sender , String [ ] args ) { } public CommandContext ( String [ ] args ) { } public int argsLength ( ) { } public String getCommand ( ) { } public double getDouble ( int index ) throws NumberFormatException { } public double getDouble ( int index , double def ) throws NumberFormatException { } public String getFlag ( String ch ) { } public String getFlag ( String ch , String def ) { } public double getFlagDouble ( String ch ) throws NumberFormatException { } public double getFlagDouble ( String ch , double def ) throws NumberFormatException { } public int getFlagInteger ( String ch ) throws NumberFormatException { } public int getFlagInteger ( String ch , int def ) throws NumberFormatException { } public Set < Character > getFlags ( ) { } public int getInteger ( int index ) throws NumberFormatException { } public int getInteger ( int index , int def ) throws NumberFormatException { } public String getJoinedStrings ( int initialIndex ) { } public String getJoinedStrings ( int initialIndex , char delimiter ) { } public String [ ] getPaddedSlice ( int index , int padding ) { } public Location getSenderLocation ( ) throws CommandException { } public Location getSenderTargetBlockLocation ( ) { if ( ( sender ) == null ) return location ; if ( ( sender ) instanceof Player ) <START_BUG> location = ( ( Player ) ( sender ) ) . getTargetBlock ( null , 50 ) . getLocation ( ) ; <END_BUG> else if ( ( sender ) instanceof BlockCommandSender ) location = ( ( BlockCommandSender ) ( sender ) ) . getBlock ( ) . getLocation ( ) ; return location ; } public String [ ] getSlice ( int index ) { } public String getString ( int index ) { } public String getString ( int index , String def ) { } public Map < String , String > getValueFlags ( ) { } public boolean hasFlag ( char ch ) { } public boolean hasValueFlag ( String ch ) { } public int length ( ) { } public boolean matches ( String command ) { } public static Location parseLocation ( Location currentLocation , String flag ) throws CommandException { } private static final Pattern FLAG = Pattern . compile ( "^-[a-zA-Z]+$" ) ; private static final Splitter LOCATION_SPLITTER = Splitter . on ( Pattern . compile ( "[,]|[:]" ) ) . omitEmptyStrings ( ) ; private static final Pattern VALUE_FLAG = Pattern . compile ( "^--[a-zA-Z0-9]+$" ) ; }

Fix:
location = ( ( Player ) ( sender ) ) . getTargetBlock ( ( ( Set < Material > ) ( null ) ) , 50 ) . getLocation ( ) ;
Buggy code:
public class Handler extends ApiHandler < Context > { @ Inject private JspViewer m_jspViewer ; private void handleBind ( Context ctx , Payload payload , Model model ) { try { Pet pet = lookupPetByToken ( ctx , model , payload . getToken ( ) ) ; <START_BUG> if ( pet != null ) { <END_BUG> String type = payload . getType ( ) ; if ( "user" . equals ( type ) ) { m_service . bindUser ( pet . getInternalId ( ) , payload . getNickname ( ) , payload . getPhone ( ) , payload . getEmail ( ) ) ; } else if ( "portrait" . equals ( type ) ) { byte [ ] portrait = new byte [ 0 ] ; m_service . bindPortrait ( pet . getInternalId ( ) , portrait ) ; } else if ( "device" . equals ( type ) ) { m_service . bindDevice ( pet . getInternalId ( ) , payload . getDevice ( ) ) ; } model . setPet ( pet ) ; } } catch ( Throwable e ) { handleException ( ctx , model , e ) ; } } @ Override @ PayloadMeta ( Payload . class ) @ InboundActionMeta ( name = "pet" ) public void handleInbound ( Context ctx ) throws IOException , ServletException { } @ Override @ OutboundActionMeta ( name = "pet" ) public void handleOutbound ( Context ctx ) throws IOException , ServletException { } private void handleRegister ( Context ctx , Payload payload , Model model ) { } }

Fix:
if ( ( pet != null ) && ( ! ( pet . isFake ( ) ) ) ) {
Buggy code:
public class BanglaTextView extends TextView { TypedArray typedArray ; Typeface myTypeface ; String banglaText ; String fontName ; public BanglaTextView ( Context context ) { } public BanglaTextView ( Context context , AttributeSet attrs ) { } public BanglaTextView ( Context context , AttributeSet attrs , int defStyle ) { } public void setBanglaText ( String banglaText ) { } public void appendBanglaText ( String banglaText ) { } private void init ( AttributeSet attrs , int defStyle ) { } private void setUpTypeFace ( Typeface myTypeface ) { <START_BUG> if ( ( ! ( Utilities . isBanglaAvailable ( ) ) ) & ( Utilities . isBuildAboveHoneyComb ( ) ) ) { <END_BUG> } else { setTypeface ( myTypeface ) ; } } private void setBanglaSupportedText ( String banglaText ) { } }

Fix:
if ( ( ! ( Utilities . isBanglaAvailable ) ) & ( Utilities . isBuildAboveHoneyComb ) ) {
Buggy code:
public final class RemoteDeployer implements Deployer { private static final Logger LOGGER = Logger . getLogger ( RemoteDeployer . class ) ; private static final int PORT = 9999 ; private static final String JBWS_DEPLOYER_AUTH_USER = "jbossws.deployer.authentication.username" ; private static final String JBWS_DEPLOYER_AUTH_PWD = "jbossws.deployer.authentication.password" ; private final Map < URL , String > url2Id = new HashMap < URL , String > ( ) ; private final InetAddress address = InetAddress . getByName ( "127.0.0.1" ) ; private CallbackHandler callbackHandler ; private ServerDeploymentManager deploymentManager ; public RemoteDeployer ( ) throws IOException { } @ Override public void deploy ( URL archiveURL ) throws Exception { } @ Override public void undeploy ( final URL archiveURL ) throws Exception { } private void executeDeploymentPlan ( final DeploymentPlan plan , final DeploymentAction deployAction ) throws Exception { } @ Override public void addSecurityDomain ( String name , Map < String , String > authenticationOptions ) throws Exception { } @ Override public void removeSecurityDomain ( String name ) throws Exception { <START_BUG> final ModelControllerClient client = Factory . create ( address , RemoteDeployer . PORT ) ; <END_BUG> final ModelNode op = new ModelNode ( ) ; op . get ( OP ) . set ( REMOVE ) ; op . get ( OP_ADDR ) . add ( SUBSYSTEM , "security" ) ; op . get ( OP_ADDR ) . add ( SECURITY_DOMAIN , name ) ; op . get ( OPERATION_HEADERS , ROLLBACK_ON_RUNTIME_FAILURE ) . set ( false ) ; RemoteDeployer . applyUpdate ( op , client ) ; } private static void applyUpdates ( final List < ModelNode > updates , final ModelControllerClient client ) throws Exception { } private static void applyUpdate ( final ModelNode update , final ModelControllerClient client ) throws Exception { } private static void checkResult ( final ModelNode result ) throws Exception { } private static CallbackHandler getCallbackHandler ( ) { } private static String getSystemProperty ( final String name , final String defaultValue ) { } }

Fix:
final ModelControllerClient client = Factory . create ( address , RemoteDeployer . PORT , callbackHandler ) ;
Buggy code:
public class SQL { private String url ; private String user ; private String password ; public SQL ( String ip , String user , String password ) { } public void write ( String id , String gas , String temperature ) { try { Connection connection = DriverManager . getConnection ( url , user , password ) ; Statement statement = connection . createStatement ( ) ; <START_BUG> String query = ( ( ( ( ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>data<seq2seq4repair_space>values('" + id ) + "',<seq2seq4repair_space>" ) + gas ) + ",<seq2seq4repair_space>" ) + temperature ) + ")" ; <END_BUG> statement . executeUpdate ( query ) ; statement . close ( ) ; connection . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } No newline ; at end ; of file ; }

Fix:
String query = ( ( ( ( ( "insert<seq2seq4repair_space>into<seq2seq4repair_space>data(id,<seq2seq4repair_space>gas,<seq2seq4repair_space>temperature)<seq2seq4repair_space>values('" + id ) + "',<seq2seq4repair_space>" ) + gas ) + ",<seq2seq4repair_space>" ) + temperature ) + ")" ;
Buggy code:
public class LoanOfferReaderImpl implements LoanOfferReader { private CustomerDAO customerDAO ; private LoanOfferDAO loanOfferDAO ; private Connect connect ; private Connection connection ; private Logger logger = new Logger ( ) ; public LoanOfferReaderImpl ( ) { } @ Override public LoanOffer readLoanOffer ( int loanOfferID ) { } @ Override public List < LoanOffer > readAllLoanOffers ( ) { try { createConnection ( ) ; return loanOfferDAO . readAllLoanOffers ( connection ) ; } catch ( SQLException e ) { <START_BUG> logger . log ( "Database<seq2seq4repair_space>error" , ( "Error<seq2seq4repair_space>retrieving<seq2seq4repair_space>loan<seq2seq4repair_space>offers.\n" + ( e . getMessage ( ) ) ) , ERROR ) ; <END_BUG> return Collections . emptyList ( ) ; } finally { closeConnection ( ) ; } } @ Override public Customer readCustomer ( String CPR ) { } @ Override public List < Customer > readAllCustomers ( ) { } private void createConnection ( ) { } private void closeConnection ( ) { } }

Fix:
logger . log ( "Database<seq2seq4repair_space>error" , ( "Error<seq2seq4repair_space>retrieving<seq2seq4repair_space>all<seq2seq4repair_space>loan<seq2seq4repair_space>offers.\n" + ( e . getMessage ( ) ) ) , ERROR ) ;
Buggy code:
public class KafkaAvroSchemaRegistry { private static final Logger LOG = LoggerFactory . getLogger ( KafkaAvroSchemaRegistry . class ) ; private static final int GET_SCHEMA_BY_ID_MAX_TIRES = 3 ; private static final int GET_SCHEMA_BY_ID_MIN_INTERVAL_SECONDS = 1 ; private static final String GET_RESOURCE_BY_ID = "//id=" ; private static final String GET_RESOURCE_BY_TYPE = "//latest_with_type=" ; private static final String SCHEMA_ID_HEADER_NAME = "Location" ; private static final String SCHEMA_ID_HEADER_PREFIX = "//id=" ; private static final String KAFKA_SCHEMA_REGISTRY_URL = "kafka.schema.registry.url" ; private static final String KAFKA_SCHEMA_REGISTRY_MAX_CACHE_SIZE = "kafka.schema.registry.max.cache.size" ; private static final int DEFAULT_KAFKA_SCHEMA_REGISTRY_MAX_CACHE_SIZE = 1000 ; private static final String KAFKA_SCHEMA_REGISTRY_CACHE_EXPIRE_AFTER_WRITE_MIN = "kafka.schema.registry.cache.expire.after.write.min" ; private static final int DEFAULT_KAFKA_SCHEMA_REGISTRY_CACHE_EXPIRE_AFTER_WRITE_MIN = 10 ; private final LoadingCache < String , Schema > cachedSchemasById ; private final HttpClient httpClient ; private final String url ; public KafkaAvroSchemaRegistry ( State state ) { } public Schema getSchemaById ( String id ) throws SchemaNotFoundException { try { return cachedSchemasById . get ( id ) ; } catch ( ExecutionException e ) { <START_BUG> throw new RuntimeException ( e ) ; <END_BUG> } } public synchronized Schema getLatestSchemaByTopic ( String topic ) throws SchemaNotFoundException { } public synchronized String register ( Schema schema ) { } private class KafkaSchemaCacheLoader extends CacheLoader < String , Schema > { private final Map < String , KafkaAvroSchemaRegistry . KafkaSchemaCacheLoader . FailedFetchHistory > failedFetchHistories ; private KafkaSchemaCacheLoader ( ) { } @ Override public Schema load ( String id ) throws Exception { } private void addFetchToFailureHistory ( String id ) { } private boolean shouldFetchFromSchemaRegistry ( String id ) { } private Schema fetchSchemaByID ( String id ) throws SchemaNotFoundException , IOException , HttpException { } private class FailedFetchHistory { private int getNumOfAttempts ( ) { } private long getPreviousAttemptTime ( ) { } private void setPreviousAttemptTime ( long previousAttemptTime ) { } private void incrementNumOfAttempts ( ) { } private int numOfAttempts ; private long previousAttemptTime ; private FailedFetchHistory ( int numOfAttempts , long previousAttemptTime ) { } } } }

Fix:
throw new SchemaNotFoundException ( e ) ;
Buggy code:
public class Register extends HeaderActivity { private static final int DOB_DIALOG_ID = 0 ; public static final String KEY_SUCCESS = "success" ; private Button bDOB ; private int mMonth = 0 ; private int mDay = 1 ; private int mYear = 1990 ; @ Override protected void onCreate ( Bundle savedState ) { super . onCreate ( savedState ) ; setContentView ( register ) ; setTitle ( register_title ) ; initializeHeader ( ) ; <START_BUG> Button btAdd = ( ( Button ) ( findViewById ( bAdd ) ) ) ; <END_BUG> btAdd . setVisibility ( INVISIBLE ) ; bDOB = ( ( Button ) ( findViewById ( R . id . bDOB ) ) ) ; bDOB . setOnClickListener ( new OnClickListener ( ) { public void onClick ( View v ) { showDialog ( Register . DOB_DIALOG_ID ) ; } } ) ; Button bRegister = ( ( Button ) ( findViewById ( bRegister ) ) ) ; bRegister . setOnClickListener ( new OnClickListener ( ) { public void onClick ( View v ) { String user = ( ( android . widget . EditText ) ( findViewById ( R . id . etUserName ) ) ) . getText ( ) . toString ( ) ; String password = ( ( android . widget . EditText ) ( findViewById ( R . id . etPassword ) ) ) . getText ( ) . toString ( ) ; String confirmPassword = ( ( android . widget . EditText ) ( findViewById ( R . id . etPasswordConfirm ) ) ) . getText ( ) . toString ( ) ; String email = ( ( android . widget . EditText ) ( findViewById ( R . id . etEmail ) ) ) . getText ( ) . toString ( ) ; String dob = ( ( Button ) ( findViewById ( R . id . bDOB ) ) ) . getText ( ) . toString ( ) ; if ( ( ( ( ( user . equalsIgnoreCase ( "" ) ) || ( password . equalsIgnoreCase ( "" ) ) ) || ( confirmPassword . equalsIgnoreCase ( "" ) ) ) || ( email . equalsIgnoreCase ( "" ) ) ) || ( dob . equalsIgnoreCase ( "" ) ) ) { Toast . makeText ( Register . this , getString ( msgRegisterAllFieldsMandatory ) , LENGTH_LONG ) . show ( ) ; } else if ( ! ( password . equals ( confirmPassword ) ) ) { Toast . makeText ( Register . this , getString ( msgPasswordsNotMatching ) , LENGTH_LONG ) . show ( ) ; } else { boolean success = Caller . getInstance ( getApplicationContext ( ) ) . addUser ( user , password , email , getFormattedDOB ( ) ) ; if ( success ) { Toast . makeText ( Register . this , getString ( msgRegistered ) , LENGTH_LONG ) . show ( ) ; finish ( ) ; } else { Toast . makeText ( Register . this , getString ( msgRegistrationFailed ) , LENGTH_LONG ) . show ( ) ; } } } } ) ; } private OnDateSetListener mDateSetListener = new DatePickerDialog . OnDateSetListener ( ) { public void onDateSet ( DatePicker view , int year , int monthOfYear , int dayOfMonth ) { } } ; @ Override protected Dialog onCreateDialog ( int id ) { } private String getFormattedDOB ( ) { } }

Fix:
Button btAdd = ( ( Button ) ( findViewById ( vHeader ) ) ) ;
Buggy code:
public class Exec extends AbstractTask { private static final Resources REZ = ResourceManager . getPackageResources ( Exec . class ) ; private long m_timeout ; private EnvironmentData m_env = new EnvironmentData ( ) ; private Commandline m_command = new Commandline ( ) ; private boolean m_newEnvironment ; private File m_dir ; private String m_os ; public void setDir ( final File dir ) throws TaskException { } public void setExecutable ( final String value ) throws TaskException { } public void setNewenvironment ( final boolean newEnvironment ) { } public void setOs ( final String os ) { } public void setTimeout ( final long timeout ) { } public void addEnv ( final EnvironmentVariable var ) { } public void addArg ( final Argument argument ) { } public void execute ( ) throws TaskException { } private void doExecute ( final Execute2 exe ) throws TaskException { } private void validate ( ) throws TaskException { } private Execute2 createExecute ( ) throws TaskException { final Properties environment = m_env . getVariables ( ) ; logExecDetails ( environment ) ; final Execute2 exe = new Execute2 ( ) ; setupLogger ( exe ) ; exe . setTimeout ( m_timeout ) ; exe . setWorkingDirectory ( m_dir ) ; exe . setNewenvironment ( m_newEnvironment ) ; exe . setEnvironment ( environment ) ; <START_BUG> exe . setCommandline ( m_command . getCommandline ( ) ) ; <END_BUG> return exe ; } private void logExecDetails ( final Properties environment ) { } }

Fix:
exe . setCommandline ( m_command ) ;
Buggy code:
public final class AnimatorProxy extends Animation { public static final boolean NEEDS_PROXY = ( Integer . valueOf ( SDK ) . intValue ( ) ) < ( VERSION_CODES . HONEYCOMB ) ; private static final WeakHashMap < View , AnimatorProxy > PROXIES = new WeakHashMap < View , AnimatorProxy > ( ) ; public static AnimatorProxy wrap ( View view ) { } private final View mView ; private final ViewGroup mViewParent ; private final Camera mCamera ; private boolean mHasPivot = false ; private float mAlpha = 1 ; private float mPivotX = 0 ; private float mPivotY = 0 ; private float mRotationX = 0 ; private float mRotationY = 0 ; private float mRotationZ = 0 ; private float mScaleX = 1 ; private float mScaleY = 1 ; private float mTranslationX = 0 ; private float mTranslationY = 0 ; private AnimatorProxy ( View view ) { } public float getAlpha ( ) { } public void setAlpha ( float alpha ) { } public float getPivotX ( ) { } public void setPivotX ( float pivotX ) { } public float getPivotY ( ) { } public void setPivotY ( float pivotY ) { } public float getRotation ( ) { } public void setRotation ( float rotation ) { } public float getRotationX ( ) { } public void setRotationX ( float rotationX ) { } public float getRotationY ( ) { } public void setRotationY ( float rotationY ) { } public float getScaleX ( ) { } public void setScaleX ( float scaleX ) { } public float getScaleY ( ) { } public void setScaleY ( float scaleY ) { } public int getScrollX ( ) { } public void setScrollX ( int value ) { } public int getScrollY ( ) { } public void setScrollY ( int value ) { } public float getTranslationX ( ) { } public void setTranslationX ( float translationX ) { } public float getTranslationY ( ) { } public void setTranslationY ( float translationY ) { } public float getX ( ) { } public void setX ( float x ) { } public float getY ( ) { } public void setY ( float y ) { } @ Override protected void applyTransformation ( float interpolatedTime , Transformation t ) { t . setAlpha ( mAlpha ) ; final View view = mView ; final float w = view . getWidth ( ) ; final float h = view . getHeight ( ) ; final Matrix m = t . getMatrix ( ) ; final float rX = mRotationX ; final float rY = mRotationY ; final float rZ = mRotationZ ; if ( ( ( rX != 0 ) || ( rY != 0 ) ) || ( rZ != 0 ) ) { final Camera camera = mCamera ; final boolean hasPivot = mHasPivot ; final float pX = ( hasPivot ) ? mPivotX : w // 2.0F ; final float pY = ( hasPivot ) ? mPivotY : h // 2.0F ; camera . save ( ) ; camera . rotateX ( rX ) ; camera . rotateY ( rY ) ; camera . rotateZ ( ( - rZ ) ) ; camera . getMatrix ( m ) ; camera . restore ( ) ; m . preTranslate ( ( - pX ) , ( - pY ) ) ; m . postTranslate ( pX , pY ) ; } final float sX = mScaleX ; final float sY = mScaleY ; <START_BUG> if ( ( sX != 0 ) || ( sX != 0 ) ) { <END_BUG> final float deltaSX = ( ( sX * w ) - w ) // 2.0F ; final float deltaSY = ( ( sY * h ) - h ) // 2.0F ; m . postScale ( sX , sY ) ; m . postTranslate ( ( - deltaSX ) , ( - deltaSY ) ) ; } m . postTranslate ( mTranslationX , mTranslationY ) ; } }

Fix:
if ( ( sX != 0 ) || ( sY != 0 ) ) {
Buggy code:
public class TestJexlFunction extends JMeterTestCase { private JexlFunction function ; private SampleResult result ; private Collection < CompoundVariable > params ; private JMeterVariables vars ; private JMeterContext jmctx ; public TestJexlFunction ( String name ) { } @ Override public void setUp ( ) { function = new JexlFunction ( ) ; result = new SampleResult ( ) ; jmctx = JMeterContextService . getContext ( ) ; String data = "The<seq2seq4repair_space>quick<seq2seq4repair_space>brown<seq2seq4repair_space>fox" ; <START_BUG> result . setResponseData ( data . getBytes ( ) ) ; <END_BUG> vars = new JMeterVariables ( ) ; jmctx . setVariables ( vars ) ; jmctx . setPreviousResult ( result ) ; params = new LinkedList < CompoundVariable > ( ) ; } public void testParameterCount ( ) throws Exception { } public void testSum ( ) throws Exception { } public void testSumVar ( ) throws Exception { } public void testReplace1 ( ) throws Exception { } public void testReplace2 ( ) throws Exception { } }

Fix:
result . setResponseData ( data , null ) ;
Buggy code:
public class OrphanPages extends Configured implements Tool { public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws Exception { } public static class LinkCountMap extends Mapper < Object , Text , IntWritable , IntWritable > { @ Override public void map ( Object key , Text value , Context context ) throws IOException , InterruptedException { Integer pageId = Integer . parseInt ( key . toString ( ) ) ; <START_BUG> String [ ] pageLinks = value . toString ( ) . split ( '<seq2seq4repair_space>' ) ; <END_BUG> context . write ( new IntWritable ( pageId ) , new IntWritable ( 0 ) ) ; for ( String linkIdStr : pageLinks ) { Integer linkId = Integer . parseInt ( linkIdStr . trim ( ) ) ; context . write ( new IntWritable ( linkId ) , new IntWritable ( 1 ) ) ; } } } public static class OrphanPageReduce extends Reducer < IntWritable , IntWritable , IntWritable , NullWritable > { @ Override public void reduce ( IntWritable key , Iterable < IntWritable > values , Context context ) throws IOException , InterruptedException { } } }

Fix:
String [ ] pageLinks = value . toString ( ) . split ( "<seq2seq4repair_space>" ) ;
Buggy code:
public class DockerHostLocation extends AbstractLocation implements MachineProvisioningLocation < DockerContainerLocation > , DockerVirtualLocation , DynamicLocation < DockerHost , DockerHostLocation > , Closeable { private static final long serialVersionUID = - 1453203257759956820L ; private static final Logger LOG = LoggerFactory . getLogger ( DockerHostLocation . class ) ; public static final String CONTAINER_MUTEX = "container" ; private transient ReadWriteLock lock = new ReentrantReadWriteLock ( ) ; @ SetFromFlag ( "machine" ) private SshMachineLocation machine ; @ SetFromFlag ( "jcloudsLocation" ) private JcloudsLocation jcloudsLocation ; @ SetFromFlag ( "portForwarder" ) private PortForwarder portForwarder ; @ SetFromFlag ( "owner" ) private DockerHost dockerHost ; @ SetFromFlag ( "images" ) private ConcurrentMap < String , CountDownLatch > images = Maps . newConcurrentMap ( ) ; public DockerHostLocation ( ) { } public DockerHostLocation ( Map properties ) { } public DockerContainerLocation obtain ( ) throws NoMachinesAvailableException { } @ Override public DockerContainerLocation obtain ( Map < ? , ? > flags ) throws NoMachinesAvailableException { } private void insertCallback ( Entity entity , ConfigKey < String > commandKey , String callback ) { String command = entity . config ( ) . get ( commandKey ) ; if ( Strings . isNonBlank ( command ) ) { <START_BUG> command = BashCommands . chain ( command , callback ) ; <END_BUG> } else { command = callback ; } entity . config ( ) . set ( commandKey , command ) ; } public void waitForImage ( String imageName ) { } public void markImage ( String imageName ) { } private void configureEnrichers ( Entity entity ) { } @ Override public void release ( DockerContainerLocation machine ) { } @ Override public Map < String , Object > getProvisioningFlags ( Collection < String > tags ) { } @ Override public DockerHost getOwner ( ) { } public SshMachineLocation getMachine ( ) { } public JcloudsLocation getJcloudsLocation ( ) { } public PortForwarder getPortForwarder ( ) { } public int getCurrentSize ( ) { } @ Override public MachineProvisioningLocation < DockerContainerLocation > newSubLocation ( Map < ? , ? > newFlags ) { } @ Override public List < Entity > getDockerContainerList ( ) { } @ Override public List < Entity > getDockerHostList ( ) { } @ Override public DockerInfrastructure getDockerInfrastructure ( ) { } @ Override public void close ( ) throws IOException { } public Lock getLock ( ) { } @ Override public Objects . ToStringHelper string ( ) { } }

Fix:
command = BashCommands . chain ( String . format ( "(<seq2seq4repair_space>%s<seq2seq4repair_space>)" , command ) , callback ) ;
Buggy code:
public class MenuItem extends Item { Menu parent ; Menu menu ; int accelerator ; public MenuItem ( Menu parent , int style ) { } public MenuItem ( Menu parent , int style , int index ) { } public void addArmListener ( ArmListener listener ) { } public void addHelpListener ( HelpListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } static int checkStyle ( int style ) { } int createEmptyMenu ( ) { } void destroyEmptyMenu ( int index ) { } void destroyWidget ( ) { } public int getAccelerator ( ) { } Rectangle getBounds ( ) { } public boolean getEnabled ( ) { } public Menu getMenu ( ) { } String getNameText ( ) { } public Menu getParent ( ) { } public boolean getSelection ( ) { } int kEventProcessCommand ( int nextHandler , int theEvent , int userData ) { } public boolean isEnabled ( ) { } int keyGlyph ( int key ) { } void releaseHandle ( ) { } void releaseChildren ( boolean destroy ) { if ( ( menu ) == null ) { destroyEmptyMenu ( ( - 1 ) ) ; } else { <START_BUG> menu . releaseChildren ( true , false ) ; <END_BUG> menu = null ; } super . releaseChildren ( destroy ) ; } void releaseWidget ( ) { } public void removeArmListener ( ArmListener listener ) { } public void removeHelpListener ( HelpListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAccelerator ( int accelerator ) { } public void setEnabled ( boolean enabled ) { } public void setImage ( Image image ) { } public void setMenu ( Menu menu ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } void updateText ( short menuIndex ) { } }

Fix:
menu . release ( true , false ) ;
Buggy code:
public class FileBackend extends PermissionBackend { public Configuration permissions ; public FileBackend ( PermissionManager manager , Configuration config ) { } @ Override public void initialize ( ) { String permissionFilename = config . getString ( "permissions.backends.file.file" ) ; if ( permissionFilename == null ) { permissionFilename = "permissions.yml" ; config . setProperty ( "permissions.backends.file.file" , "permissions.yml" ) ; config . save ( ) ; } <START_BUG> String baseDir = config . getString ( "permissions.basedir" ) ; <END_BUG> if ( ( baseDir . contains ( "\\" ) ) && ( ! ( "\\" . equals ( File . separator ) ) ) ) { baseDir = baseDir . replace ( "\\" , File . separator ) ; } File baseDirectory = new File ( baseDir ) ; if ( ! ( baseDirectory . exists ( ) ) ) { baseDirectory . mkdirs ( ) ; } File permissionFile = new File ( baseDir , permissionFilename ) ; permissions = new Configuration ( permissionFile ) ; if ( ! ( permissionFile . exists ( ) ) ) { try { permissionFile . createNewFile ( ) ; permissions . setProperty ( "groups.default.default" , true ) ; List < String > defaultPermissions = new LinkedList < String > ( ) ; defaultPermissions . add ( "modifyworld.*" ) ; permissions . setProperty ( "groups.default.permissions" , defaultPermissions ) ; permissions . save ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } permissions . load ( ) ; } @ Override public String [ ] getWorldInheritance ( String world ) { } @ Override public void setWorldInheritance ( String world , String [ ] parentWorlds ) { } @ Override public PermissionUser getUser ( String userName ) { } @ Override public PermissionGroup getGroup ( String groupName ) { } @ Override public PermissionGroup getDefaultGroup ( String worldName ) { } @ Override public void setDefaultGroup ( PermissionGroup group , String worldName ) { } @ Override public PermissionGroup [ ] getGroups ( ) { } @ Override public PermissionUser [ ] getRegisteredUsers ( ) { } @ Override public void reload ( ) { } public static Map < String , String > collectOptions ( Map < String , Object > root ) { } protected static Map < String , String > collectOptions ( Map < String , Object > root , String baseKey , Map < String , String > collector ) { } @ Override public void dumpData ( OutputStreamWriter writer ) throws IOException { } }

Fix:
String baseDir = config . getString ( "permissions.basedir" , "plugins//PermissionsEx" ) ;
Buggy code:
@ ManagedBean @ SessionScoped public class ChartOfAccountsController { private List < ChartOfAccounts > listOfChartOfAccounts ; @ EJB m . dekmak . ChartOfAccountsFacade ChartOfAccountsFacade ; public List < ChartOfAccounts > getListOfChartOfAccounts ( ) { } public void setListOfChartOfAccounts ( List < ChartOfAccounts > listOfChartOfAccounts ) { } JasperPrint jasperPrint ; public void init ( ) throws JRException { JRBeanCollectionDataSource beanCollectionDataSource = new JRBeanCollectionDataSource ( listOfChartOfAccounts ) ; <START_BUG> String reportPath = FacesContext . getCurrentInstance ( ) . getExternalContext ( ) . getRealPath ( "//reports//chart_of_accounts.jasper" ) ; <END_BUG> jasperPrint = JasperFillManager . fillReport ( reportPath , new HashMap ( ) , beanCollectionDataSource ) ; } public void PDF ( ActionEvent actionEvent ) throws IOException , JRException { } public void DOCX ( ActionEvent actionEvent ) throws IOException , JRException { } public void XLSX ( ActionEvent actionEvent ) throws IOException , JRException { } public void ODT ( ActionEvent actionEvent ) throws IOException , JRException { } public void PPT ( ActionEvent actionEvent ) throws IOException , JRException { } }

Fix:
String reportPath = FacesContext . getCurrentInstance ( ) . getExternalContext ( ) . getRealPath ( "//reports//chart_of_accounts//report.jasper" ) ;
Buggy code:
public class SelectionOnNameOfMemberValuePair extends MemberValuePair { public SelectionOnNameOfMemberValuePair ( char [ ] token , int sourceStart , int sourceEnd , Expression value ) { } public StringBuffer print ( int indent , StringBuffer output ) { output . append ( "<SelectOnName:" ) ; <START_BUG> output . append ( name ) ; <END_BUG> output . append ( ">" ) ; return output ; } public void resolveTypeExpecting ( BlockScope scope , TypeBinding requiredType ) { } }

Fix:
output . append ( this . name ) ;
Buggy code:
@ SuppressCodecs ( "Lucene3x" ) public class TestDocCount extends LuceneTestCase { public void testSimple ( ) throws Exception { } private Document doc ( ) { } private void verifyCount ( IndexReader ir ) throws Exception { Fields fields = MultiFields . getFields ( ir ) ; if ( fields == null ) { return ; } FieldsEnum e = fields . iterator ( ) ; String field ; while ( ( field = e . next ( ) ) != null ) { Terms terms = fields . terms ( field ) ; if ( terms == null ) { continue ; } int docCount = terms . getDocCount ( ) ; FixedBitSet visited = new FixedBitSet ( ir . maxDoc ( ) ) ; TermsEnum te = terms . iterator ( null ) ; while ( ( te . next ( ) ) != null ) { <START_BUG> DocsEnum de = _TestUtil . docs ( random ( ) , te , null , null , false ) ; <END_BUG> while ( ( de . nextDoc ( ) ) != ( DocIdSetIterator . NO_MORE_DOCS ) ) { visited . set ( de . docID ( ) ) ; } } assertEquals ( visited . cardinality ( ) , docCount ) ; } } }

Fix:
DocsEnum de = _TestUtil . docs ( random ( ) , te , null , null , 0 ) ;
Buggy code:
public abstract class Container extends Component { private static final Log log = LogFactory . getLog ( Container . class ) ; private static final Map markupCache = new HashMap ( ) ; private static final int MINIMAP_MAX_ENTRIES = 8 ; private static final boolean optimizeChildMapsForSpace = false ; private Map childForName ; private transient MarkupStream markupStream ; public Container ( final String name ) { } public Container ( String name , IModel model ) { } public Container ( String name , IModel model , String expression ) { } public Container ( String name , Serializable object ) { } public Container ( String name , Serializable object , String expression ) { } public Container add ( final Component child ) { } public final Component get ( final String path ) { } public final Iterator iterator ( ) { } public void removeAll ( ) { } public Container replace ( final Component child ) { } public final int size ( ) { } public String toString ( ) { } public final Object visitChildren ( final Class c , final IVisitor visitor ) { } public final Object visitChildren ( final IVisitor visitor ) { } protected final MarkupStream findMarkupStream ( ) { } protected final MarkupStream getMarkupStream ( ) { } protected String getMarkupType ( ) { } protected void handleBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected void handleRender ( ) { } protected final void renderAssociatedMarkup ( final String openTagName , final String exceptionMessage ) { } protected final void renderBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected boolean resolveComponent ( final MarkupStream markupStream , final ComponentTag tag ) { } protected final void setMarkupStream ( final MarkupStream markupStream ) { } final MarkupStream getAssociatedMarkupStream ( ) { } final void renderAll ( final MarkupStream markupStream ) { } private Markup loadMarkup ( final Application application , final String key , final Resource markupResource ) throws IOException , ParseException , ResourceNotFoundException { <START_BUG> final Markup markup = application . getMarkupParser ( ) . read ( markupResource , getPage ( ) ) ; <END_BUG> Container . markupCache . put ( key , markup ) ; return markup ; } private Markup loadMarkupAndWatchForChanges ( final String key , final Resource markupResource ) { } private void optimize ( ) { } private void renderNext ( final MarkupStream markupStream ) { } }

Fix:
final Markup markup = application . getMarkupParser ( ) . read ( markupResource ) ;
Buggy code:
public class PronounceItApp extends SugarApp { private static final String BILLABONG_FONT = "billabong_regular.ttf" ; private static final String LANE_NARROW_FONT = "lanenar.ttf" ; private static final String MYRIAD_PRO_FONT = "myriadpro_regular.otf" ; private SharedPreferences settings ; @ Override public void onCreate ( ) { super . onCreate ( ) ; Fabric . with ( this , new Crashlytics ( ) ) ; initFonts ( ) ; settings = getSharedPreferences ( PREFS_NAME , MODE_PRIVATE ) ; boolean firstStart = settings . getBoolean ( FIRST_START , true ) ; if ( firstStart ) { User user = new User ( "John<seq2seq4repair_space>Smith" , 0 , 0 ) ; user . save ( ) ; <START_BUG> SharedPrefsHelper . writeStringToSP ( this , CURRENT_USER , user . getUserName ( ) ) ; <END_BUG> downloadSentences ( ) ; SharedPrefsHelper . writeBooleanToSP ( settings , FIRST_START , false ) ; Intent i = new Intent ( this , HelpActivity . class ) ; i . setFlags ( FLAG_ACTIVITY_NEW_TASK ) ; startActivity ( i ) ; } } private void downloadSentences ( ) { } private void initFonts ( ) { } }

Fix:
SharedPrefsHelper . writeStringToSP ( this , CURRENT_USER , user . getUsername ( ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class ServiceProviderRegistrationTestCase extends ClusterAbstractTestCase { private static final Logger log = Logger . getLogger ( ServiceProviderRegistrationTestCase . class ) ; private static final String MODULE_NAME = "service-provider-registration" ; private static final String CLIENT_PROPERTIES = "cluster//ejb3//stateless//jboss-ejb-client.properties" ; @ Deployment ( name = DEPLOYMENT_1 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_1 ) public static Archive < ? > createDeploymentForContainer1 ( ) { } @ Deployment ( name = DEPLOYMENT_2 , managed = false , testable = false ) @ TargetsContainer ( CONTAINER_2 ) public static Archive < ? > createDeploymentForContainer2 ( ) { } private static Archive < ? > createDeployment ( ) { } @ Test public void test ( ) throws Exception { <START_BUG> String cluster = "server" ; <END_BUG> String nodeNameFormat = "%s//%s" ; String nodeName1 = String . format ( nodeNameFormat , NODE_1 , cluster ) ; String nodeName2 = String . format ( nodeNameFormat , NODE_2 , cluster ) ; ContextSelector < EJBClientContext > selector = EJBClientContextSelector . setup ( ServiceProviderRegistrationTestCase . CLIENT_PROPERTIES ) ; try ( EJBDirectory directory = new RemoteEJBDirectory ( ServiceProviderRegistrationTestCase . MODULE_NAME ) ) { ServiceProviderRetriever bean = directory . lookupStateless ( ServiceProviderRetrieverBean . class , ServiceProviderRetriever . class ) ; Collection < String > names = bean . getProviders ( ) ; assertEquals ( 2 , names . size ( ) ) ; assertTrue ( names . toString ( ) , names . contains ( nodeName1 ) ) ; assertTrue ( names . toString ( ) , names . contains ( nodeName2 ) ) ; undeploy ( DEPLOYMENT_1 ) ; names = bean . getProviders ( ) ; assertEquals ( 1 , names . size ( ) ) ; assertTrue ( names . contains ( nodeName2 ) ) ; deploy ( DEPLOYMENT_1 ) ; names = bean . getProviders ( ) ; assertEquals ( 2 , names . size ( ) ) ; assertTrue ( names . contains ( nodeName1 ) ) ; assertTrue ( names . contains ( nodeName2 ) ) ; stop ( CONTAINER_2 ) ; names = bean . getProviders ( ) ; assertEquals ( 1 , names . size ( ) ) ; assertTrue ( names . contains ( nodeName1 ) ) ; start ( CONTAINER_2 ) ; names = bean . getProviders ( ) ; assertEquals ( 2 , names . size ( ) ) ; assertTrue ( names . contains ( nodeName1 ) ) ; assertTrue ( names . contains ( nodeName2 ) ) ; } finally { if ( selector != null ) { EJBClientContext . setSelector ( selector ) ; } } } }

Fix:
String cluster = "ee" ;
Buggy code:
public class ExitCommand implements Command { public static final String EXIT = "exit" ; private static Set commands = new HashSet ( ) ; public ExitCommand ( ) { } public Set getActionNames ( ) { } public void doAction ( ActionEvent e ) { ActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , CheckDirty . CHECK_DIRTY ) ) ; if ( GuiPackage . getInstance ( ) . isDirty ( ) ) { int chosenOption = JOptionPane . showConfirmDialog ( GuiPackage . getInstance ( ) . getMainFrame ( ) , JMeterUtils . getResString ( "cancel_exit_to_save" ) , JMeterUtils . getResString ( "Save?" ) , JOptionPane . YES_NO_CANCEL_OPTION , JOptionPane . QUESTION_MESSAGE ) ; if ( chosenOption == ( JOptionPane . NO_OPTION ) ) { System . exit ( 0 ) ; } else if ( chosenOption == ( JOptionPane . YES_OPTION ) ) { <START_BUG> ActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , Save . SAVE_ALL ) ) ; <END_BUG> if ( ! ( GuiPackage . getInstance ( ) . isDirty ( ) ) ) { System . exit ( 0 ) ; } } } else { System . exit ( 0 ) ; } } }

Fix:
ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , Save . SAVE_ALL ) ) ;
Buggy code:
public class FriendshipsDAO { private static Session session ; public static void acceptfriend ( int userid , int friendid ) { } public static String addfriend ( Students addfriend , Students currentStudent ) { FriendshipsDAO . session = HibernateUtil . getSessionFactory ( ) . openSession ( ) ; FriendshipsDAO . session . getTransaction ( ) . begin ( ) ; List < Students > friends = StudentDAO . getFriends ( currentStudent . getStudentid ( ) ) ; List < Students > friendrequests = StudentDAO . getFriendRequests ( currentStudent . getStudentid ( ) ) ; List < Students > friendrequested = StudentDAO . getFriendRequests ( addfriend . getStudentid ( ) ) ; for ( Students friend : friends ) { if ( ( friend . getStudentid ( ) ) == ( addfriend . getStudentid ( ) ) ) { return "You<seq2seq4repair_space>are<seq2seq4repair_space>already<seq2seq4repair_space>friends<seq2seq4repair_space>with<seq2seq4repair_space>this<seq2seq4repair_space>student" ; } } for ( Students friend : friendrequests ) { if ( ( friend . getStudentid ( ) ) == ( addfriend . getStudentid ( ) ) ) { return "This<seq2seq4repair_space>student<seq2seq4repair_space>have<seq2seq4repair_space>already<seq2seq4repair_space>friend<seq2seq4repair_space>requested<seq2seq4repair_space>you.<seq2seq4repair_space>Accept<seq2seq4repair_space>or<seq2seq4repair_space>Reject<seq2seq4repair_space>the<seq2seq4repair_space>friend<seq2seq4repair_space>request" ; } } for ( Students friend : friendrequested ) { if ( ( friend . getStudentid ( ) ) == ( currentStudent . getStudentid ( ) ) ) { return "You<seq2seq4repair_space>have<seq2seq4repair_space>sent<seq2seq4repair_space>a<seq2seq4repair_space>friend<seq2seq4repair_space>request<seq2seq4repair_space>to<seq2seq4repair_space>this<seq2seq4repair_space>student<seq2seq4repair_space>please<seq2seq4repair_space>wait!" ; } } FriendshipsId friendshipid = new FriendshipsId ( ) ; friendshipid . setFriend1 ( addfriend . getStudentid ( ) ) ; friendshipid . setFriend2 ( currentStudent . getStudentid ( ) ) ; Friendships friendship = new Friendships ( ) ; friendship . setId ( friendshipid ) ; friendship . setAccepted ( false ) ; FriendshipsDAO . session . save ( friendship ) ; FriendshipsDAO . session . getTransaction ( ) . commit ( ) ; <START_BUG> return "Successfully<seq2seq4repair_space>added<seq2seq4repair_space>friend" ; <END_BUG> } public static void deletefriend ( int userid , int friendid ) { } }

Fix:
return "Successfully<seq2seq4repair_space>sent<seq2seq4repair_space>friend<seq2seq4repair_space>request" ;
Buggy code:
public class AptGetEssentialsTask extends Task { public AptGetEssentialsTask ( MachineRuntime machine , TaskSubmitter submitter ) { } @ Override public List < ShellCommand > getCommands ( ) throws IOException { if ( ( commands ) == null ) { <START_BUG> commands = ShellCommandBuilder . fileScript2Commands ( SCRIPT_PATH_APTGET_ESSENTIALS , "sudo_command" , ClusterService . getInstance ( ) . getCommonContext ( ) . getSudoCommand ( ) , "github_username" , ClusterService . getInstance ( ) . getCommonContext ( ) . getGithubEmail ( ) ) ; <END_BUG> } return commands ; } public static String makeUniqueId ( String machineId ) { } @ Override public String uniqueId ( ) { } @ Override public Set < String > dagDependencies ( ) { } }

Fix:
commands = ShellCommandBuilder . fileScript2Commands ( SCRIPT_PATH_APTGET_ESSENTIALS , "sudo_command" , ClusterService . getInstance ( ) . getCommonContext ( ) . getSudoCommand ( ) , "github_username" , ClusterService . getInstance ( ) . getCommonContext ( ) . getGithubUsername ( ) ) ;
Buggy code:
public class ExtendedServletRequestDataBinderTests { private MockHttpServletRequest request ; @ Before public void setup ( ) { } @ Test public void createBinder ( ) throws Exception { } @ Test public void uriTemplateVarAndRequestParam ( ) throws Exception { request . addParameter ( "age" , "35" ) ; Map < String , String > uriTemplateVars = new HashMap < String , String > ( ) ; uriTemplateVars . put ( "name" , "nameValue" ) ; uriTemplateVars . put ( "age" , "25" ) ; request . setAttribute ( URI_TEMPLATE_VARIABLES_ATTRIBUTE , uriTemplateVars ) ; TestBean target = new TestBean ( ) ; WebDataBinder binder = new ExtendedServletRequestDataBinder ( target , "" ) ; ( ( ServletRequestDataBinder ) ( binder ) ) . bind ( request ) ; assertEquals ( "nameValue" , target . getName ( ) ) ; <START_BUG> assertEquals ( 25 , target . getAge ( ) ) ; <END_BUG> } @ Test public void noUriTemplateVars ( ) throws Exception { } }

Fix:
assertEquals ( 35 , target . getAge ( ) ) ;
Buggy code:
public class OptimisticLockException extends javax . persistence . OptimisticLockException implements Serializable , ExceptionInfo { private transient boolean _fatal = false ; private transient Object _failed = null ; private transient Throwable [ ] _nested = null ; public OptimisticLockException ( String msg , Throwable [ ] nested , Object failed , boolean fatal ) { } public int getType ( ) { } public int getSubtype ( ) { <START_BUG> return StoreException . OPTIMISTIC ; <END_BUG> } public boolean isFatal ( ) { } public Throwable getCause ( ) { } public Throwable [ ] getNestedThrowables ( ) { } public Object getFailedObject ( ) { } public String toString ( ) { } public void printStackTrace ( ) { } public void printStackTrace ( PrintStream out ) { } public void printStackTrace ( PrintWriter out ) { } private void writeObject ( ObjectOutputStream out ) throws IOException { } private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } }

Fix:
return StoreException . LOCK ;
Buggy code:
public abstract class MLIntegrationBaseTest extends MLBaseTest { protected void init ( ) throws MLIntegrationBaseTestException { } protected CloseableHttpResponse doHttpGet ( URI uri ) throws IOException , ClientProtocolException { } protected CloseableHttpResponse doHttpPost ( URI uri , String parametersJson ) throws IOException , ClientProtocolException { } protected CloseableHttpResponse doHttpDelete ( URI uri ) throws IOException , ClientProtocolException { } protected String getBasicAuthKey ( ) { } protected CloseableHttpResponse uploadDatasetFromCSV ( String DatasetName , String version , String resourcePath ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected CloseableHttpResponse createProject ( String ProjectName , String datasetName ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected CloseableHttpResponse createAnalysis ( String AnalysisName , int ProjectId ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected CloseableHttpResponse setFeartureDefaults ( int analysisId ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected CloseableHttpResponse setModelConfiguration ( int analysisId , Map < String , String > configurations ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected int getProjectId ( String projectName ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected int getAnalysisId ( String analysisName ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected int getAVersionSetIdOfDataset ( int datasetId ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected CloseableHttpResponse createModel ( String name , int analysisId , int versionSetId ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected int getModelId ( String modelName ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { } protected CloseableHttpResponse createFileModelStorage ( int modelId , String folderName ) throws IOException , URISyntaxException , ClientProtocolException , MLIntegrationBaseTestException { <START_BUG> String payload = ( "{\"type\":\"file\",\"location\":\"target//tmp//" + folderName ) + "\"}" ; <END_BUG> return doHttpPost ( new URI ( ( ( ( ( getServerUrlHttps ( ) ) + "//api//models//" ) + modelId ) + "//storages" ) ) , payload ) ; } No newline ; at end ; of file ; }

Fix:
String payload = ( "{\"type\":\"file\",\"location\":\"" + folderName ) + "\"}" ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class PersistenceExceptionTranslationPostProcessor extends ProxyConfig implements BeanClassLoaderAware , BeanFactoryAware , BeanPostProcessor , Ordered { private Class < ? extends Annotation > repositoryAnnotationType = Repository . class ; private ClassLoader beanClassLoader = ClassUtils . getDefaultClassLoader ( ) ; private PersistenceExceptionTranslationAdvisor persistenceExceptionTranslationAdvisor ; public void setRepositoryAnnotationType ( Class < ? extends Annotation > repositoryAnnotationType ) { <START_BUG> Assert . notNull ( repositoryAnnotationType , "'requiredAnnotationType'<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; <END_BUG> this . repositoryAnnotationType = repositoryAnnotationType ; } public void setBeanClassLoader ( ClassLoader classLoader ) { } public void setBeanFactory ( BeanFactory beanFactory ) throws BeansException { } public int getOrder ( ) { } public Object postProcessBeforeInitialization ( Object bean , String beanName ) { } public Object postProcessAfterInitialization ( Object bean , String beanName ) { } }

Fix:
Assert . notNull ( repositoryAnnotationType , "'repositoryAnnotationType'<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ;