nus-yam/ex-repair huggingface dataset:
Buggy code:
public class PreferencesTreeItem extends GenericListItem { private Composite control ; private CLabel imageLabel ; private CLabel textLabel ; private Color gradientColor ; private Image cachedImage ; public PreferencesTreeItem ( Object wrappedElement ) { } public void dispose ( ) { } public void createControl ( Composite parent , Color color ) { IPreferenceNode node = ( ( IPreferenceNode ) ( getElement ( ) ) ) ; gradientColor = color ; control = new Composite ( parent , SWT . NONE ) ; GridLayout layout = new GridLayout ( ) ; layout . marginHeight = 0 ; layout . marginWidth = 0 ; layout . verticalSpacing = 0 ; control . setLayout ( layout ) ; control . setBackground ( color ) ; Image image ; <START_BUG> ImageDescriptor desc = ( ( WorkbenchPreferenceNode ) ( node ) ) . getDescriptor ( ) ; <END_BUG> if ( desc == null ) image = JFaceResources . getImage ( DLG_IMG_MESSAGE_INFO ) ; else { cachedImage = desc . createImage ( true ) ; image = cachedImage ; } imageLabel = new CLabel ( control , SWT . CENTER ) ; imageLabel . setImage ( image ) ; imageLabel . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; textLabel = new CLabel ( control , SWT . CENTER ) ; textLabel . setText ( node . getLabelText ( ) ) ; textLabel . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; setColors ( false ) ; } private void setColors ( boolean selected ) { } public Control getControl ( ) { } public void addMouseListener ( MouseListener listener ) { } public void clearHighlight ( ) { } public void highlightForSelection ( ) { } }

Fix:
ImageDescriptor desc = ( ( WorkbenchPreferenceNode ) ( node ) ) . getImageDescriptor ( ) ;
Buggy code:
public class SuperColumnRangeQueryRSD extends RowSourceDef { private static final Logger logger_ = Logger . getLogger ( SuperColumnRangeQueryRSD . class ) ; private CFMetaData cfMetaData_ ; private OperandDef rowKey_ ; private OperandDef superColumnKey_ ; private int offset_ ; private int limit_ ; public SuperColumnRangeQueryRSD ( CFMetaData cfMetaData , OperandDef rowKey , int offset , int limit ) { } public List < Map < String , String > > getRows ( ) { Row row = null ; try { String key = ( ( String ) ( rowKey_ . get ( ) ) ) ; <START_BUG> ReadCommand readCommand = new SliceFromReadCommand ( cfMetaData_ . tableName , key , cfMetaData_ . cfName , true , limit_ ) ; <END_BUG> row = StorageProxy . readProtocol ( readCommand , WEAK ) ; } catch ( Exception e ) { SuperColumnRangeQueryRSD . logger_ . error ( LogUtil . throwableToString ( e ) ) ; throw new RuntimeException ( GENERIC_ERROR . getMsg ( ) ) ; } List < Map < String , String > > rows = new LinkedList < Map < String , String > > ( ) ; if ( row != null ) { ColumnFamily cfamily = row . getColumnFamily ( cfMetaData_ . cfName ) ; if ( cfamily != null ) { Collection < IColumn > columns = cfamily . getAllColumns ( ) ; if ( ( columns != null ) && ( ( columns . size ( ) ) > 0 ) ) { for ( IColumn column : columns ) { Collection < IColumn > subColumns = column . getSubColumns ( ) ; for ( IColumn subColumn : subColumns ) { Map < String , String > result = new HashMap < String , String > ( ) ; result . put ( cfMetaData_ . n_superColumnKey , column . name ( ) ) ; result . put ( cfMetaData_ . n_columnKey , subColumn . name ( ) ) ; result . put ( cfMetaData_ . n_columnValue , new String ( subColumn . value ( ) ) ) ; result . put ( cfMetaData_ . n_columnTimestamp , Long . toString ( subColumn . timestamp ( ) ) ) ; rows . add ( result ) ; } } } } } return rows ; } public String explainPlan ( ) { } }

Fix:
ReadCommand readCommand = new SliceFromReadCommand ( cfMetaData_ . tableName , key , cfMetaData_ . cfName , true , offset_ , limit_ ) ;
Buggy code:
public class VariablesEvaluator extends Evaluator implements EvaluationConstants { int startPosOffset = 0 ; VariablesEvaluator ( EvaluationContext context , INameEnvironment environment , Map options , IRequestor requestor , IProblemFactory problemFactory ) { } protected void addEvaluationResultForCompilationProblem ( Map resultsByIDs , IProblem problem , char [ ] cuSource ) { } protected char [ ] getClassName ( ) { <START_BUG> return CharOperation . concat ( EvaluationContext . GLOBAL_VARS_CLASS_NAME_PREFIX , Integer . toString ( ( ( EvaluationContext . VAR_CLASS_COUNTER ) + 1 ) ) . toCharArray ( ) ) ; <END_BUG> } Compiler getCompiler ( ICompilerRequestor compilerRequestor ) { } protected char [ ] getPackageName ( ) { } protected char [ ] getSource ( ) { } private int numberOfCRs ( char [ ] source ) { } }

Fix:
return CharOperation . concat ( EvaluationConstants . GLOBAL_VARS_CLASS_NAME_PREFIX , Integer . toString ( ( ( EvaluationContext . VAR_CLASS_COUNTER ) + 1 ) ) . toCharArray ( ) ) ;
Buggy code:
public class MappingEvaluator < T > implements Evaluator < T > { private final ReduceEvaluator < T > mappingEvaluator ; private final MultiAttributeEvaluator multiAttributeEvaluator ; public MappingEvaluator ( final ReduceEvaluator < T > mappingEvaluator , final MultiAttributeEvaluator multiAttributeEval ) { } @ Override public QueryResult < T > evaluate ( final Map < String , String > attributes ) { } @ Override public ResultType getResultType ( ) { } @ Override public int getEvaluationsRemaining ( ) { } @ Override public Evaluator < ? > getSubjectEvaluator ( ) { <START_BUG> return mappingEvaluator ; <END_BUG> } }

Fix:
return null ;
Buggy code:
@ Service public class TechnologyModelHooks { public void setDefaultValuesIfEmpty ( final DataDefinition dataDefinition , final Entity technology ) { } <START_BUG> private void setOperationComponentDefaults ( Entity operationComponent ) { <END_BUG> if ( ( operationComponent . getField ( "tpz" ) ) == null ) { operationComponent . setField ( "tpz" , 0 ) ; } if ( ( operationComponent . getField ( "timeNextOperation" ) ) == null ) { operationComponent . setField ( "timeNextOperation" , 0 ) ; } if ( ( operationComponent . getField ( "productionInOneCycle" ) ) == null ) { operationComponent . setField ( "productionInOneCycle" , BigDecimal . ONE ) ; } if ( ( operationComponent . getField ( "machineUtilization" ) ) == null ) { operationComponent . setField ( "machineUtilization" , BigDecimal . ONE ) ; } if ( ( operationComponent . getField ( "laborUtilization" ) ) == null ) { operationComponent . setField ( "laborUtilization" , BigDecimal . valueOf ( 1L ) ) ; } if ( ( operationComponent . getField ( "countRealized" ) ) == null ) { operationComponent . setField ( "countRealized" , "01all" ) ; } if ( ( operationComponent . getField ( "countMachine" ) ) == null ) { operationComponent . setField ( "countMachine" , BigDecimal . ZERO ) ; } operationComponent . getDataDefinition ( ) . save ( operationComponent ) ; if ( ! ( operationComponent . isValid ( ) ) ) { throw new IllegalStateException ( "Saved<seq2seq4repair_space>Technology<seq2seq4repair_space>operation<seq2seq4repair_space>component<seq2seq4repair_space>entity<seq2seq4repair_space>is<seq2seq4repair_space>invalid!" ) ; } } }

Fix:
private void setOperationComponentDefaults ( final Entity operationComponent ) {
Buggy code:
public class Cut extends AbstractAction { private static final Set < String > commands = new HashSet < String > ( ) ; @ Override public Set < String > getActionNames ( ) { } @ Override public void doAction ( ActionEvent e ) { GuiPackage guiPack = GuiPackage . getInstance ( ) ; JMeterTreeNode [ ] currentNodes = guiPack . getTreeListener ( ) . getSelectedNodes ( ) ; <START_BUG> currentNodes = Copy . filterNodes ( currentNodes ) ; <END_BUG> Copy . setCopiedNodes ( currentNodes ) ; for ( int i = 0 ; i < ( currentNodes . length ) ; i ++ ) { guiPack . getTreeModel ( ) . removeNodeFromParent ( currentNodes [ i ] ) ; } guiPack . getMainFrame ( ) . repaint ( ) ; } }

Fix:
currentNodes = Copy . keepOnlyAncestors ( currentNodes ) ;
Buggy code:
public class ContinueStatement extends Statement { private SimpleName optionalLabel = null ; ContinueStatement ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { ContinueStatement result = new ContinueStatement ( target ) ; result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <START_BUG> result . setLeadingComment ( getLeadingComment ( ) ) ; <END_BUG> result . setLabel ( ( ( SimpleName ) ( ASTNode . copySubtree ( target , getLabel ( ) ) ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public SimpleName getLabel ( ) { } public void setLabel ( SimpleName label ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . copyLeadingComment ( this ) ;
Buggy code:
public class GroupFormingBehaviour extends CyclicBehaviour { private final HashMap < AID , Double > _budgets ; private Agent _groupAgent ; private List < AID > _agents ; private ExperimentConfiguration _configuration ; private RandomGenerator _randomGenerator ; private MessageFacade _messageFacade ; private int _iteration ; public GroupFormingBehaviour ( Agent groupAgent , List < AID > agents , ExperimentConfiguration configuration , RandomGenerator randomGenerator , MessageFacade messageFacade ) { } private HashMap < AID , Double > setUpBudgets ( List < AID > _agents ) { } @ Override public void action ( ) { } private void updateAgentBudgetsAndAvailability ( List < AID > group ) { for ( AID aid : group ) { _budgets . put ( aid , ( ( _budgets . get ( aid ) ) - ( _configuration . budget ) ) ) ; <START_BUG> if ( ( _budgets . get ( aid ) ) < ( ( _configuration . budget ) + 1.0E-6 ) ) { <END_BUG> _agents . remove ( aid ) ; } } } }

Fix:
if ( ( _budgets . get ( aid ) ) < ( ( _configuration . budget ) - 1.0E-7 ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) public class ModuleAccessesBundleServiceTestCase extends AbstractXServiceTestCase { private static final String TARGET_BUNDLE_NAME = "example-xservice-target-bundle" ; private static final String CLIENT_MODULE_NAME = "example-xservice-client-module" ; @ Deployment public static JavaArchive createdeployment ( ) { } @ Inject public ServiceContainer serviceContainer ; @ ArquillianResource public Deployer deployer ; @ Inject public BundleContext systemContext ; @ Override ServiceContainer getServiceContainer ( ) { } @ Test public void moduleInvokesBundleService ( ) throws Exception { deployer . deploy ( ModuleAccessesBundleServiceTestCase . TARGET_BUNDLE_NAME ) ; try { ServiceReference sref = systemContext . getServiceReference ( PackageAdmin . class . getName ( ) ) ; PackageAdmin packageAdmin = ( ( PackageAdmin ) ( systemContext . getService ( sref ) ) ) ; Bundle [ ] bundles = packageAdmin . getBundles ( ModuleAccessesBundleServiceTestCase . TARGET_BUNDLE_NAME , null ) ; assertNotNull ( "Bundles<seq2seq4repair_space>not<seq2seq4repair_space>null" , bundles ) ; assertEquals ( "One<seq2seq4repair_space>Bundle" , 1 , bundles . length ) ; final Bundle targetBundle = bundles [ 0 ] ; if ( ( targetBundle . getState ( ) ) != ( Bundle . ACTIVE ) ) { final CountDownLatch startedLatch = new CountDownLatch ( 1 ) ; systemContext . addBundleListener ( new BundleListener ( ) { public void bundleChanged ( BundleEvent event ) { Bundle auxBundle = event . getBundle ( ) ; if ( ( targetBundle . equals ( auxBundle ) ) && ( ( BundleEvent . STARTED ) == ( event . getType ( ) ) ) ) { startedLatch . countDown ( ) ; } } } ) ; <START_BUG> startedLatch . await ( 2000 , TimeUnit . MILLISECONDS ) ; <END_BUG> } OSGiTestHelper . assertBundleState ( Bundle . ACTIVE , targetBundle . getState ( ) ) ; deployer . deploy ( ModuleAccessesBundleServiceTestCase . CLIENT_MODULE_NAME ) ; try { ServiceName clientService = ServiceName . parse ( "jboss.osgi.example.invoker.service" ) ; assertServiceState ( clientService , UP , 5000 ) ; } finally { deployer . undeploy ( ModuleAccessesBundleServiceTestCase . CLIENT_MODULE_NAME ) ; } } finally { deployer . undeploy ( ModuleAccessesBundleServiceTestCase . TARGET_BUNDLE_NAME ) ; } } @ Deployment ( name = ModuleAccessesBundleServiceTestCase . CLIENT_MODULE_NAME , managed = false , testable = false ) public static JavaArchive getClientModuleArchive ( ) { } @ Deployment ( name = ModuleAccessesBundleServiceTestCase . TARGET_BUNDLE_NAME , managed = false , testable = false ) public static JavaArchive getTargetBundleArchive ( ) { } }

Fix:
startedLatch . await ( 5 , TimeUnit . SECONDS ) ;
Buggy code:
public abstract class CommitteeRole { public CommitteeRole ( ConferenceInstance ci ) { } public ConferenceInstance getConferenceInstance ( ) { } public String toString ( ) { } public String toJson ( int indent ) { <START_BUG> return ( ( ( ( ( ( ( Util . repeat ( "<seq2seq4repair_space>" , indent ) ) + "{<seq2seq4repair_space>" ) + "\"role\"<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( getRoleJson ( ) ) ) + ",<seq2seq4repair_space>" ) + "\"conference\"<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( conferenceInstance . toJson ( ) ) ) + "<seq2seq4repair_space>}," ; <END_BUG> } public abstract String getRoleJson ( ) { } private final ConferenceInstance conferenceInstance ; }

Fix:
return ( ( ( ( ( ( ( Util . repeat ( "<seq2seq4repair_space>" , indent ) ) + "{<seq2seq4repair_space>" ) + "\"role\"<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( getRoleJson ( ) ) ) + ",<seq2seq4repair_space>" ) + "\"conference\"<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( conferenceInstance . toJson ( ) ) ) + "<seq2seq4repair_space>}" ;
Buggy code:
public class GenerateKey extends AbstractTask { private String m_alias ; private String m_dname ; private DistinguishedName m_expandedDname ; private String m_keyalg ; private String m_keypass ; private int m_keysize ; private String m_keystore ; private String m_sigalg ; private String m_storepass ; private String m_storetype ; private int m_validity ; private boolean m_verbose ; public void setAlias ( final String alias ) { } public void setDname ( final String dname ) throws TaskException { } public void setKeyalg ( final String keyalg ) { } public void setKeypass ( final String keypass ) { } public void setKeysize ( final int keysize ) { } public void setKeystore ( final String keystore ) { } public void setSigalg ( final String sigalg ) { } public void setStorepass ( final String storepass ) { } public void setStoretype ( final String storetype ) { } public void setValidity ( final int validity ) throws TaskException { } public void setVerbose ( final boolean verbose ) { } public void addDname ( final DistinguishedName distinguishedName ) throws TaskException { } public void execute ( ) throws TaskException { validate ( ) ; final String message = "Generating<seq2seq4repair_space>Key<seq2seq4repair_space>for<seq2seq4repair_space>" + ( m_alias ) ; getLogger ( ) . info ( message ) ; final Commandline cmd = createCommand ( ) ; final Execute2 exe = new Execute2 ( ) ; exe . setWorkingDirectory ( getBaseDirectory ( ) ) ; <START_BUG> exe . setCommandline ( cmd . getCommandline ( ) ) ; <END_BUG> try { exe . execute ( ) ; } catch ( final IOException ioe ) { throw new TaskException ( ioe . getMessage ( ) , ioe ) ; } } private Commandline createCommand ( ) { } private void validate ( ) throws TaskException { } }

Fix:
exe . setCommandline ( cmd ) ;
Buggy code:
public class ManagementUtil { static boolean isSecurityRealmReloadRequired ( final OperationContext context , final ModelNode operation ) { } static boolean isSecurityRealmReloadRequired ( final OperationContext context , final ServiceController < ? > controller ) { } static ServiceController < ? > getSecurityRealmService ( final OperationContext context , final ModelNode operation , final boolean forUpdate ) { } static String getSecurityRealmName ( final ModelNode operation ) { } static void updateUserDomainCallbackHandler ( final OperationContext context , final ModelNode operation , final boolean forRollback ) { UserDomainCallbackHandler cbh = ManagementUtil . getUserDomainCallbackHandler ( context , operation ) ; if ( cbh != null ) { PathAddress authAddress = ManagementUtil . getXmlAuthenticationAddress ( operation ) ; <START_BUG> Resource root = ( forRollback ) ? context . getOriginalRootResource ( ) : context . readResourceFromRoot ( EMPTY_ADDRESS ) ; <END_BUG> ModelNode userMap ; try { Resource authResource = root . navigate ( authAddress ) ; userMap = context . resolveExpressions ( Tools . readModel ( authResource ) ) ; } catch ( Exception e ) { userMap = new ModelNode ( ) . setEmptyObject ( ) ; } cbh . setUserDomain ( userMap ) ; } } private static PathAddress getXmlAuthenticationAddress ( ModelNode operation ) { } private static UserDomainCallbackHandler getUserDomainCallbackHandler ( final OperationContext context , final ModelNode operation ) { } private ManagementUtil ( ) { } }

Fix:
Resource root = ( forRollback ) ? context . getOriginalRootResource ( ) : context . getRootResource ( ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_main ) ; RecyclerView recyclerView = ( ( RecyclerView ) ( findViewById ( recyclerView ) ) ) ; recyclerView . setAdapter ( new DemoAdapter ( this ) ) ; recyclerView . setLayoutManager ( new LinearLayoutManager ( this ) ) ; <START_BUG> new com . turingtechnologies . materialscrollbar . MaterialScrollBar ( this , recyclerView , true ) . addIndicator ( new AlphabetIndicator ( this ) ) ; <END_BUG> } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } No newline ; at end ; of file ; }

Fix:
new com . turingtechnologies . materialscrollbar . MaterialScrollBar ( this , recyclerView , true ) . addIndicator ( new AlphabetIndicator ( this ) , true ) ;
Buggy code:
public class TestCompositeCollection extends AbstractTestCollection { public TestCompositeCollection ( String name ) { } public static Test suite ( ) { } public static void main ( String [ ] args ) { } public boolean isAddSupported ( ) { } public boolean isRemoveSupported ( ) { } public Collection makeCollection ( ) { } public Collection makeConfirmedCollection ( ) { } public Object [ ] getFullElements ( ) { } public Collection makeFullCollection ( ) { } public Collection makeConfirmedFullCollection ( ) { } public void testUnsupportedRemove ( ) { } protected CompositeCollection c ; protected Collection one ; protected Collection two ; protected void setUpTest ( ) { } protected void setUpMutatorTest ( ) { } public void testSize ( ) { } public void testMultipleCollectionsSize ( ) { } public void testIsEmpty ( ) { } public void testIterator ( ) { } public void testClear ( ) { } public void testContainsAll ( ) { } public void testRetainAll ( ) { } public void testAddAllMutator ( ) { } public void testAddMutator ( ) { } public void testToCollection ( ) { } public void testAddAllToCollection ( ) { } public void testRemove ( ) { } public void testRemoveAll ( ) { } public void testRemoveComposited ( ) { setUpMutatorTest ( ) ; one . add ( "1" ) ; two . add ( "2" ) ; two . add ( "1" ) ; c . addComposited ( one , two ) ; c . removeComposited ( one ) ; assertTrue ( c . contains ( "1" ) ) ; <START_BUG> assertEquals ( c . size ( ) , 2 ) ; <END_BUG> } }

Fix:
assertEquals ( 2 , c . size ( ) ) ;
Buggy code:
public class DigestUtilsTest { private final byte [ ] testData = new byte [ 1024 * 1024 ] ; private byte [ ] getBytesUtf8 ( String hashMe ) { } protected void setUp ( ) throws Exception { } @ Test public void testConstructable ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testInternalNoSuchAlgorithmException ( ) { } @ Test public void testMd2Hex ( ) throws IOException { } @ Test public void testMd5Hex ( ) throws IOException { } @ Test public void testMd2HexLength ( ) { } @ Test public void testMd5HexLength ( ) { } @ Test public void testMd2Length ( ) { } @ Test public void testMd5Length ( ) { } @ Test public void testSha256 ( ) throws IOException { } @ Test public void testSha384 ( ) throws IOException { } @ Test public void testSha512 ( ) throws IOException { } @ Test public void testShaHex ( ) throws IOException { } @ Test public void testSha1Hex ( ) throws IOException { assertEquals ( "a9993e364706816aba3e25717850c26c9cd0d89d" , DigestUtils . sha1Hex ( "abc" ) ) ; assertEquals ( "a9993e364706816aba3e25717850c26c9cd0d89d" , DigestUtils . sha1Hex ( getBytesUtf8 ( "abc" ) ) ) ; assertEquals ( "84983e441c3bd26ebaae4aa1f95129e5e54670f1" , DigestUtils . shaHex ( ( "abcdbcdecdefdefgefghfghighij" + "hijkijkljklmklmnlmnomnopnopq" ) ) ) ; <START_BUG> assertEquals ( DigestUtils . shaHex ( testData ) , DigestUtils . shaHex ( new ByteArrayInputStream ( testData ) ) ) ; <END_BUG> } @ Test public void testSha1UpdateWithByteArray ( ) { } @ Test public void testShaUpdateWithByteArray ( ) { } @ Test public void testSha1UpdateWithString ( ) { } @ Test public void testShaUpdateWithString ( ) { } }

Fix:
assertEquals ( DigestUtils . shaHex ( testData ) , DigestUtils . sha1Hex ( new ByteArrayInputStream ( testData ) ) ) ;
Buggy code:
public class Zip { private static final int BUF_SIZE = 16384 ; public void zip ( File inputDir , File output ) throws IOException { } public String zip ( File inputDir ) throws IOException { } public String zipFile ( File baseDir , File fileToCompress ) throws IOException { } private void zip ( File inputDir , OutputStream writeTo ) throws IOException { } private void addToZip ( String basePath , ZipOutputStream zos , File toAdd ) throws IOException { if ( toAdd . isDirectory ( ) ) { File [ ] files = toAdd . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { addToZip ( basePath , zos , file ) ; } } } else { FileInputStream fis = new FileInputStream ( toAdd ) ; String name = toAdd . getAbsolutePath ( ) . substring ( ( ( basePath . length ( ) ) + 1 ) ) ; <START_BUG> ZipEntry entry = new ZipEntry ( name ) ; <END_BUG> zos . putNextEntry ( entry ) ; int len ; byte [ ] buffer = new byte [ 4096 ] ; while ( ( len = fis . read ( buffer ) ) != ( - 1 ) ) { zos . write ( buffer , 0 , len ) ; } fis . close ( ) ; zos . closeEntry ( ) ; } } public void unzip ( String source , File outputDir ) throws IOException { } public void unzip ( File source , File outputDir ) throws IOException { } public void unzip ( InputStream source , File outputDir ) throws IOException { } public void unzipFile ( File output , InputStream zipStream , String name ) throws IOException { } }

Fix:
ZipEntry entry = new ZipEntry ( name . replace ( '\\' , '//' ) ) ;
Buggy code:
@ Component ( "fhirTestOrderMapper" ) public class TestOrderMapper implements EmrOrderResourceHandler { private static final int TEST_TYPE_POSITION_IN_SPLITED_CONCEPT_REF_TERM = 3 ; @ Autowired private IdMappingsRepository idMappingsRepository ; @ Autowired private CodableConceptService codableConceptService ; private List < FHIRResource > resources ; @ Override public boolean canHandle ( Order order ) { } @ Override public List < FHIRResource > map ( Order order , Encounter fhirEncounter , AtomFeed feed , SystemProperties systemProperties ) { } private void addItemsToDiagnosticOrder ( Order order , DiagnosticOrder diagnosticOrder , AtomFeed feed , SystemProperties systemProperties ) { } private void addSpecimenToDiagnosticOrder ( Order order , DiagnosticOrder diagnosticOrder , DiagnosticOrder . DiagnosticOrderItemComponent orderItem , AtomFeed feed , SystemProperties systemProperties ) { } private Specimen getIfSpecimenExists ( AtomFeed feed , List < ResourceReference > specimenList , Order order , SystemProperties systemProperties ) { } private boolean shouldUseSameSpecimen ( Order order , Specimen specimenResource , String type , String specimen , SystemProperties systemProperties ) { } private String findLoincReferenceTerm ( Order order ) { } private boolean isSyncedFromTrAndLoincSource ( ConceptReferenceTerm conceptReferenceTerm ) { } private Specimen createSpecimen ( Order order , DiagnosticOrder diagnosticOrder , SystemProperties systemProperties ) { } private CodeableConcept findOrderName ( Order order ) { } private DiagnosticOrder createDiagnosticOrder ( Order order , Encounter fhirEncounter , SystemProperties systemProperties ) { } private ResourceReference getOrdererReference ( Encounter encounter ) { List < Encounter . EncounterParticipantComponent > participants = encounter . getParticipant ( ) ; <START_BUG> if ( ( participants != null ) && ( ! ( participants . isEmpty ( ) ) ) ) { <END_BUG> return participants . get ( 0 ) . getIndividual ( ) ; } return null ; } No newline ; at end ; of file ; }

Fix:
if ( ! ( CollectionUtils . isEmpty ( participants ) ) ) {
Buggy code:
public class SimpleCommandLinePropertySourceTests { @ Test public void withDefaultName ( ) { PropertySource < ? > ps = new SimpleCommandLinePropertySource ( ) ; <START_BUG> assertThat ( ps . getName ( ) , equalTo ( DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME ) ) ; <END_BUG> } @ Test public void withCustomName ( ) { } @ Test public void withNoArgs ( ) { } @ Test public void withOptionArgsOnly ( ) { } @ Test public void withDefaultNonOptionArgsNameAndNoNonOptionArgsPresent ( ) { } @ Test public void withDefaultNonOptionArgsNameAndNonOptionArgsPresent ( ) { } @ Test public void withCustomNonOptionArgsNameAndNoNonOptionArgsPresent ( ) { } @ Test public void covertNonOptionArgsToStringArrayAndList ( ) { } }

Fix:
assertThat ( ps . getName ( ) , equalTo ( COMMAND_LINE_PROPERTY_SOURCE_NAME ) ) ;
Buggy code:
public interface Node { public Node newNode ( Tag tag , Source source , long spos , long epos , int objectSize ) { } public void setValue ( Object value ) { } <START_BUG> public void link ( int index , Node logCommit ) ; <END_BUG> public Node commit ( ) { } public Tag getTag ( ) { } public void setTag ( Tag tag ) { } public void setEndingPosition ( long pos ) { } public void expandAstToSize ( int newSize ) { } }

Fix:
public void link ( int index , Node child ) ;
Buggy code:
@ RequestScoped public class OgnlParametersProvider implements ParametersProvider { private final ParameterNameProvider provider ; private static final Logger logger = LoggerFactory . getLogger ( OgnlParametersProvider . class ) ; private final HttpServletRequest request ; private final Container container ; private final OgnlFacade ognl ; public OgnlParametersProvider ( ParameterNameProvider provider , HttpServletRequest request , Container container , OgnlFacade ognl ) { } public Object [ ] getParametersFor ( ResourceMethod method , List < Message > errors , ResourceBundle bundle ) { } private static class Parameter { public Type type ; public Class clazz ; public String name ; public ResourceMethod method ; public Parameter ( Type type , Class clazz , String name , ResourceMethod method ) { } public Class actualType ( ) { } } private Object createParameter ( OgnlParametersProvider . Parameter param , Map < String , String [ ] > requestNames , ResourceBundle bundle , List < Message > errors ) { } private Object createRoot ( OgnlParametersProvider . Parameter param , Map < String , String [ ] > requestNames , ResourceBundle bundle , List < Message > errors ) { } private void setProperty ( String name , String key , String [ ] values , List < Message > errors ) { } private Object createSimpleParameter ( OgnlParametersProvider . Parameter param , String [ ] values , ResourceBundle bundle ) { } private Object convert ( Class clazz , String value , ResourceBundle bundle ) { } private List createList ( Type type , ResourceBundle bundle , String [ ] values ) { } private Object createArray ( Class clazz , String [ ] values , ResourceBundle bundle ) { } private Class getActualType ( Type type ) { } private Map < String , String [ ] > parametersThatStartWith ( String name ) { Map < String , String [ ] > requestNames = Maps . filterKeys ( request . getParameterMap ( ) , Predicates . containsPattern ( ( "^" + name ) ) ) ; <START_BUG> return requestNames ; <END_BUG> } }

Fix:
return new TreeMap < String , String [ ] > ( requestNames ) ;
Buggy code:
public class RaAdd extends AbstractAddStepHandler { static final RaAdd INSTANCE = new RaAdd ( ) ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override public void performRuntime ( final OperationContext context , ModelNode operation , ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { final ModelNode address = operation . require ( OP_ADDR ) ; final String name = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; String archiveOrModuleName ; if ( ( ! ( model . hasDefined ( Constants . ARCHIVE . getName ( ) ) ) ) && ( ! ( model . hasDefined ( Constants . MODULE . getName ( ) ) ) ) ) { throw MESSAGES . archiveOrModuleRequired ( ) ; } if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { archiveOrModuleName = model . get ( Constants . ARCHIVE . getName ( ) ) . asString ( ) ; } else { archiveOrModuleName = model . get ( Constants . MODULE . getName ( ) ) . asString ( ) ; } <START_BUG> ModifiableResourceAdapter resourceAdapter = RaOperationUtil . buildResourceAdaptersObject ( context , operation , archiveOrModuleName ) ; <END_BUG> if ( model . get ( Constants . ARCHIVE . getName ( ) ) . isDefined ( ) ) { RaOperationUtil . installRaServices ( context , verificationHandler , name , resourceAdapter , newControllers ) ; } else { RaOperationUtil . installRaServicesAndDeployFromModule ( context , verificationHandler , name , resourceAdapter , archiveOrModuleName , newControllers ) ; } } }

Fix:
ModifiableResourceAdapter resourceAdapter = RaOperationUtil . buildResourceAdaptersObject ( name , context , operation , archiveOrModuleName ) ;
Buggy code:
public class mod_MineFactory extends BaseModMp { private static mod_MineFactory instance ; public mod_MineFactory ( ) { } @ Override public String Version ( ) { } @ Override public void ModsLoaded ( ) { } public static void registerPlantable ( IFactoryPlantable plantable ) { } public static void registerHarvestable ( IFactoryHarvestable harvestable ) { } public static void registerFertilizable ( IFactoryFertilizable fertilizable ) { } public static void registerFertilizerItem ( int itemId ) { } public static void registerRanchable ( IFactoryRanchable ranchable ) { } public class ServerProxy implements IMFRProxy { @ Override public boolean isClient ( World world ) { } @ Override public boolean isServer ( ) { } @ Override public void movePlayerToCoordinates ( EntityPlayer e , double x , double y , double z ) { } @ Override public int getBlockDamageDropped ( Block block , int metadata ) { } @ Override public int getRenderId ( ) { } @ Override public boolean fertilizeGiantMushroom ( World world , int x , int y , int z ) { int blockId = world . getBlockId ( x , y , z ) ; <START_BUG> return ( ( BlockMushroom ) ( Block . blocksList [ blockId ] ) ) . fertilizeMushrom ( world , x , y , z , world . rand ) ; <END_BUG> } @ Override public void fertilizeStemPlant ( World world , int x , int y , int z ) { } @ Override public String getConfigPath ( ) { } @ Override public Packet getTileEntityPacket ( TileEntity te , int [ ] dataInt , float [ ] dataFloat , String [ ] dataString ) { } @ Override public void sendPacketToAll ( Packet230ModLoader p ) { } @ Override public int calcItemStackEnchantability ( Random random , int i , int j , ItemStack itemstack ) { } @ Override public List < ? > buildEnchantmentList ( Random random , ItemStack itemstack , int i ) { } @ Override public Enchantment getEnchantment ( EnchantmentData ed ) { } @ Override public int getLevel ( EnchantmentData ed ) { } @ Override public void applyEnchantment ( EnchantmentData ed , ItemStack stack ) { } @ Override public void setInLove ( EntityAnimal animal , int value ) { } @ Override public void setEntityToAttack ( EntityCreature entity , Entity target ) { } } }

Fix:
return ( ( BlockMushroom ) ( Block . blocksList [ blockId ] ) ) . fertilizeMushroom ( world , x , y , z , world . rand ) ;
Buggy code:
public class ColumnRangeQueryRSD extends RowSourceDef { private static final Logger logger_ = Logger . getLogger ( ColumnRangeQueryRSD . class ) ; private CFMetaData cfMetaData_ ; private OperandDef rowKey_ ; private OperandDef superColumnKey_ ; private int offset_ ; private int limit_ ; public ColumnRangeQueryRSD ( CFMetaData cfMetaData , OperandDef rowKey , int offset , int limit ) { } public ColumnRangeQueryRSD ( CFMetaData cfMetaData , ConstantOperand rowKey , ConstantOperand superColumnKey , int offset , int limit ) { } public List < Map < String , String > > getRows ( ) { String columnFamily_column ; String superColumnKey = null ; if ( ( superColumnKey_ ) != null ) { superColumnKey = ( ( String ) ( superColumnKey_ . get ( ) ) ) ; columnFamily_column = ( ( cfMetaData_ . cfName ) + ":" ) + superColumnKey ; } else { columnFamily_column = cfMetaData_ . cfName ; } Row row = null ; try { String key = ( ( String ) ( rowKey_ . get ( ) ) ) ; <START_BUG> ReadCommand readCommand = new SliceFromReadCommand ( cfMetaData_ . tableName , key , columnFamily_column , true , limit_ ) ; <END_BUG> row = StorageProxy . readProtocol ( readCommand , WEAK ) ; } catch ( Exception e ) { ColumnRangeQueryRSD . logger_ . error ( LogUtil . throwableToString ( e ) ) ; throw new RuntimeException ( GENERIC_ERROR . getMsg ( ) ) ; } List < Map < String , String > > rows = new LinkedList < Map < String , String > > ( ) ; if ( row != null ) { ColumnFamily cfamily = row . getColumnFamily ( cfMetaData_ . cfName ) ; if ( cfamily != null ) { Collection < IColumn > columns = null ; if ( ( superColumnKey_ ) != null ) { IColumn column = cfamily . getColumn ( superColumnKey ) ; if ( column != null ) columns = column . getSubColumns ( ) ; } else { columns = cfamily . getAllColumns ( ) ; } if ( ( columns != null ) && ( ( columns . size ( ) ) > 0 ) ) { for ( IColumn column : columns ) { Map < String , String > result = new HashMap < String , String > ( ) ; result . put ( cfMetaData_ . n_columnKey , column . name ( ) ) ; result . put ( cfMetaData_ . n_columnValue , new String ( column . value ( ) ) ) ; result . put ( cfMetaData_ . n_columnTimestamp , Long . toString ( column . timestamp ( ) ) ) ; rows . add ( result ) ; } } } } return rows ; } public String explainPlan ( ) { } }

Fix:
ReadCommand readCommand = new SliceFromReadCommand ( cfMetaData_ . tableName , key , columnFamily_column , true , offset_ , limit_ ) ;
Buggy code:
public class GetPageRule extends AbstractPageRule implements Rule { public boolean execute ( Object ... objects ) throws Exception { Map < String , Object > inputMap = ( ( Map < String , Object > ) ( objects [ 0 ] ) ) ; Map < String , Object > data = ( ( Map < String , Object > ) ( inputMap . get ( "data" ) ) ) ; String pageId = ( ( String ) ( data . get ( "pageId" ) ) ) ; OrientGraph graph = ServiceLocator . getInstance ( ) . getGraph ( ) ; String json = null ; try { json = getPageById ( graph , pageId ) ; } catch ( Exception e ) { logger . error ( "Exception:" , e ) ; throw e ; } finally { graph . shutdown ( ) ; } if ( json != null ) { inputMap . put ( "result" , json ) ; return true ; } else { <START_BUG> inputMap . put ( "result" , ( ( "Page<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>" + pageId ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>found." ) ) ; <END_BUG> inputMap . put ( "responseCode" , 404 ) ; return false ; } } }

Fix:
inputMap . put ( "error" , ( ( "Page<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>" + pageId ) + "<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>found." ) ) ;
Buggy code:
@ Transactional ( propagation = Propagation . REQUIRED ) public class TierDaoJpaImpl extends AbstractBaseDao < Tier , String > implements TierDao { private static Logger log = LoggerFactory . getLogger ( TierDaoJpaImpl . class ) ; public List < Tier > findAll ( ) { } public Tier load ( String name ) throws EntityNotFoundException { } public Tier load ( String name , String vdc , String environmentName ) throws EntityNotFoundException { } private Tier findByNameAndVdcAndEnvironment ( String name , String vdc , String environmentname ) throws EntityNotFoundException { } private Tier findByNameAndVdcAndEnvironmentNoProduct ( String name , String vdc , String environmentname ) throws EntityNotFoundException { } @ SuppressWarnings ( "unchecked" ) public List < Tier > findByCriteria ( TierSearchCriteria criteria ) throws EntityNotFoundException { } private List < Tier > filterByEnvironment ( List < Tier > tiers , Environment environment ) throws EntityNotFoundException { } @ Override public Tier loadTierWithProductReleaseAndMetadata ( String tierName , String vdc , String environmentName ) throws EntityNotFoundException { } @ Override public Tier loadTierWithNetworks ( String name , String vdc , String environmentname ) throws EntityNotFoundException { } @ Override public String findRegionBySecurityGroup ( String idSecurityGroup ) throws EntityNotFoundException { } public List < Tier > findAllWithNetwork ( String networkName ) { } @ Override public Tier loadComplete ( Tier newTier ) throws EntityNotFoundException { Query query = getEntityManager ( ) . createQuery ( "select<seq2seq4repair_space>p<seq2seq4repair_space>from<seq2seq4repair_space>Tier<seq2seq4repair_space>p<seq2seq4repair_space>fetch<seq2seq4repair_space>all<seq2seq4repair_space>properties<seq2seq4repair_space>where<seq2seq4repair_space>p.name<seq2seq4repair_space>=<seq2seq4repair_space>:name<seq2seq4repair_space>and<seq2seq4repair_space>p.vdc<seq2seq4repair_space>=:vdc<seq2seq4repair_space>and<seq2seq4repair_space>p.environmentname=<seq2seq4repair_space>:environmentname" ) ; query . setParameter ( "name" , newTier . getName ( ) ) ; query . setParameter ( "vdc" , newTier . getVdc ( ) ) ; query . setParameter ( "environmentname" , newTier . getEnviromentName ( ) ) ; Tier tier = null ; try { tier = ( ( Tier ) ( query . getResultList ( ) . get ( 0 ) ) ) ; tier . getNetworks ( ) . size ( ) ; tier . getProductReleases ( ) . size ( ) ; tier . getSecurityGroup ( ) ; } catch ( Exception e ) { <START_BUG> String message = "<seq2seq4repair_space>Tier<seq2seq4repair_space>don't<seq2seq4repair_space>exist<seq2seq4repair_space>in<seq2seq4repair_space>database<seq2seq4repair_space>" ; <END_BUG> throw new EntityNotFoundException ( Tier . class , message , newTier . getName ( ) ) ; } return tier ; } }

Fix:
String message = "<seq2seq4repair_space>Tier<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist<seq2seq4repair_space>in<seq2seq4repair_space>database<seq2seq4repair_space>" ;
Buggy code:
public class GlobalModuleDependencyProcessor implements DeploymentUnitProcessor { private volatile ModelNode globalModules = new ModelNode ( ) ; public GlobalModuleDependencyProcessor ( ) { } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; final ModelNode globalMods = this . globalModules ; if ( globalMods . isDefined ( ) ) { for ( final ModelNode module : globalMods . asList ( ) ) { final String name = module . get ( NAME ) . asString ( ) ; String slot = ( module . hasDefined ( SLOT ) ) ? module . get ( SLOT ) . asString ( ) : GlobalModulesDefinition . DEFAULT_SLOT ; final ModuleIdentifier identifier = ModuleIdentifier . create ( name , slot ) ; <START_BUG> moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( Module . getBootModuleLoader ( ) , identifier , false , false , true ) ) ; <END_BUG> } } } @ Override public void undeploy ( final DeploymentUnit context ) { } public void setGlobalModules ( final ModelNode globalModules ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( Module . getBootModuleLoader ( ) , identifier , false , false , true , false ) ) ;
Buggy code:
public class HtmlExtractor extends AbstractScopedTestElement implements Serializable , PostProcessor { public static final String EXTRACTOR_JSOUP = "JSOUP" ; public static final String EXTRACTOR_JODD = "JODD" ; public static String [ ] getImplementations ( ) { } public static final String DEFAULT_EXTRACTOR = "" ; private static final long serialVersionUID = 3978073849365558131L ; private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String EXPRESSION = "HtmlExtractor.expr" ; private static final String ATTRIBUTE = "HtmlExtractor.attribute" ; private static final String REFNAME = "HtmlExtractor.refname" ; private static final String MATCH_NUMBER = "HtmlExtractor.match_number" ; private static final String DEFAULT = "HtmlExtractor.default" ; private static final String EXTRACTOR_IMPL = "HtmlExtractor.extractor_impl" ; private static final String REF_MATCH_NR = "_matchNr" ; private static final String UNDERSCORE = "_" ; private Extractor extractor ; @ Override public void process ( ) { } private String getCorrectMatch ( List < String > matches , int entry ) { } private List < String > extractMatchingStrings ( JMeterVariables vars , String expression , String attribute , int matchNumber , SampleResult previousResult ) { } private Extractor getExtractorImpl ( ) { if ( ( extractor ) == null ) { boolean useDefaultExtractor = HtmlExtractor . DEFAULT_EXTRACTOR . equals ( getExtractor ( ) ) ; if ( useDefaultExtractor || ( HtmlExtractor . EXTRACTOR_JSOUP . equals ( getExtractor ( ) ) ) ) { extractor = new JSoupExtractor ( ) ; } else if ( HtmlExtractor . EXTRACTOR_JODD . equals ( getExtractor ( ) ) ) { <START_BUG> extractor = new JSoupExtractor ( ) ; <END_BUG> } else { throw new IllegalArgumentException ( ( ( "Extractor<seq2seq4repair_space>implementation:" + ( getExtractor ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>unknown" ) ) ; } } return extractor ; } public void setExtractor ( String attribute ) { } public String getExtractor ( ) { } public void setAttribute ( String attribute ) { } public String getAttribute ( ) { } public void setExpression ( String regex ) { } public String getExpression ( ) { } public void setRefName ( String refName ) { } public String getRefName ( ) { } public void setMatchNumber ( int matchNumber ) { } public void setMatchNumber ( String matchNumber ) { } public int getMatchNumber ( ) { } public String getMatchNumberAsString ( ) { } public void setDefaultValue ( String defaultValue ) { } public String getDefaultValue ( ) { } }

Fix:
extractor = new JoddExtractor ( ) ;
Buggy code:
public class SlideViewerComponent extends AbstractSlideViewerComponent { private PresentableComponentAdapter _slide ; private Font labelFont = null ; private IPresentable presentation = null ; private JFrame frame = null ; private int _currentSlideNumber ; private AnnotationItem _currentlyRecordingAnnotationItem = null ; private static final long serialVersionUID = 227L ; private static final Color BGCOLOR = Color . white ; private static final Color COLOR = Color . black ; private static final String FONTNAME = "Dialog" ; private static final int FONTSTYLE = Font . BOLD ; private static final int FONTHEIGHT = 10 ; private static final int XPOS = 1100 ; private static final int YPOS = 20 ; public SlideViewerComponent ( IPresentable pres , JFrame frame ) { } @ Override public Dimension getPreferredSize ( ) { } private void addMouseListeners ( ) { } public void update ( IPresentable presentableComponent , int slideNumber ) { } @ Override public void clear ( ) { } @ Override public void paintComponent ( Graphics g ) { } private class AnnotationRecorder extends MouseInputAdapter { @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseDragged ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { <START_BUG> if ( ( _presentationMode . isInAnnotationMode ( ) ) && ( SwingUtilities . isLeftMouseButton ( e ) ) ) { <END_BUG> this . addMouseMovement ( e ) ; _slide . addChild ( new PresentableComponentAdapter ( new SlideItemAdapter ( _currentlyRecordingAnnotationItem ) ) ) ; _currentlyRecordingAnnotationItem = null ; } } private void addMouseMovement ( MouseEvent e ) { } } private class ColorPickerListener extends MouseInputAdapter { @ Override public void mousePressed ( MouseEvent e ) { } } private class AnnotationThicknessScroller implements MouseWheelListener { @ Override public void mouseWheelMoved ( MouseWheelEvent e ) { } } }

Fix:
if ( ( ( _presentationMode . isInAnnotationMode ( ) ) && ( SwingUtilities . isLeftMouseButton ( e ) ) ) && ( ( _slide ) != null ) ) {
Buggy code:
public class RestaurantEditController { private final Controller mainController ; private List < Restaurant > existingRestaurants = new ArrayList < Restaurant > ( ) ; private Restaurant temporaryRestaurant ; private RestaurantEditView restaurantEditView ; private RestaurantFactory rFactory = new RestaurantFactory ( ) ; public RestaurantEditController ( Controller mainController ) { } private void buildPersistentData ( ) { } public void loadView ( ) { } public void initialView ( ) { } public void setRestaurantDetailsEnabled ( boolean enabled ) { } public void clearRestaurantDetails ( ) { } private Component [ ] getDaysComponents ( ) { } public void updateRestaurantList ( ) { } public void updateButtons ( String s ) { } public void updateRestaurant ( ) { } public void loadMessage ( ArrayList < String > messages ) { } public void loadMessage ( String msg ) { } public void deleteRestaurant ( ) { } public void createTemporaryRestaurant ( ) { } public void selectTemporaryRestaurant ( ) { } public void saveNewRestaurant ( ) { } public void loadDetailsAndSchedule ( Restaurant r ) { } public void addResetActionListener ( Component cb ) { } public void resetAllScheduleFieldState ( ) { } public void closeView ( ) { this . restaurantEditView . setVisible ( false ) ; <START_BUG> mainController . queryView . setVisible ( true ) ; <END_BUG> } public void removeTemporaryRestaurant ( ) { } }

Fix:
mainController . queryView . loadView ( ) ;
Buggy code:
public final class ComponentTypeInjectionSource extends InjectionSource { private final String typeName ; public ComponentTypeInjectionSource ( final String typeName ) { } public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEApplicationDescription applicationDescription = deploymentUnit . getAttachment ( Attachments . EE_APPLICATION_DESCRIPTION ) ; final Set < ViewDescription > componentsForViewName = applicationDescription . getComponentsForViewName ( typeName ) ; final Iterator < ViewDescription > iterator = componentsForViewName . iterator ( ) ; if ( ! ( iterator . hasNext ( ) ) ) { throw new DeploymentUnitProcessingException ( ( ( "No<seq2seq4repair_space>component<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>'" + ( typeName ) ) + "'" ) ) ; } final ViewDescription description = iterator . next ( ) ; if ( iterator . hasNext ( ) ) { throw new DeploymentUnitProcessingException ( ( ( "Multiple<seq2seq4repair_space>components<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>'" + ( typeName ) ) + "'" ) ) ; } <START_BUG> serviceBuilder . addDependency ( description . getServiceName ( ) , ManagedReferenceFactory . class , injector ) ; <END_BUG> } public boolean equals ( final Object injectionSource ) { } private boolean equals ( final ComponentTypeInjectionSource configuration ) { } public int hashCode ( ) { } }

Fix:
serviceBuilder . addDependency ( description . getServiceName ( ) , ComponentView . class , new ViewManagedReferenceFactory . Injector ( injector ) ) ;